cmake: drop CURL_DISABLE_TESTS option

curl builds tests with CMake when explicitly building the `testdeps`
target. It's not built by default. It seems overkill to have
a curl-specific variant of this (over CMake's `BUILD_TESTING`)
to disable generating this target.

Its history also doesn't make it obvious why this was necessary,
and there was a long debate how to do it, by the time the original
submitter abandoned CMake. The option also remained uninitialized
and thus undocumented.

Let me know if I missed something.

Ref: #6036
Ref: 3a1e798009 #6072
Closes #16134
This commit is contained in:
Viktor Szakats 2025-01-30 16:38:18 +01:00
parent 2cc90a679a
commit bf823397ba
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -2009,7 +2009,7 @@ set(_project_config "${_generated_dir}/${PROJECT_NAME}Config.cmake")
set(_version_config "${_generated_dir}/${PROJECT_NAME}ConfigVersion.cmake")
option(BUILD_TESTING "Build tests" ON)
if(BUILD_TESTING AND PERL_FOUND AND NOT CURL_DISABLE_TESTS)
if(BUILD_TESTING AND PERL_FOUND)
set(CURL_BUILD_TESTING ON)
else()
set(CURL_BUILD_TESTING OFF)