cmake: add _CURL_SKIP_BUILD_CERTS internal option

To disable automatically building certs with the testdeps target.
To improve performance when testing builds.
This commit is contained in:
Viktor Szakats 2025-07-18 18:56:54 +02:00
parent 72b2f990cf
commit 674f2a37ec
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -31,7 +31,11 @@ add_custom_command(OUTPUT ${GENERATEDCERTS}
VERBATIM
)
add_custom_target(build-certs DEPENDS ${GENERATEDCERTS})
add_dependencies(testdeps build-certs)
option(_CURL_SKIP_BUILD_CERTS "Skip building certs with testdeps" OFF) # Internal option to increase perf for build tests
if(NOT _CURL_SKIP_BUILD_CERTS)
add_dependencies(testdeps build-certs)
endif()
add_custom_target(clean-certs
COMMAND ${CMAKE_COMMAND} -E remove ${GENERATEDCERTS}