]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: drop `CURL_DISABLE_TESTS` option
authorViktor Szakats <commit@vsz.me>
Thu, 30 Jan 2025 15:38:18 +0000 (16:38 +0100)
committerViktor Szakats <commit@vsz.me>
Fri, 21 Feb 2025 11:05:54 +0000 (12:05 +0100)
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: 3a1e798009799be1e9fad30666351b66f250befb #6072
Closes #16134

CMakeLists.txt

index 0f42fd8f4cac5de642210117fe82041fb1c3bc3d..764b6fcc0b6c355284dc809b2f85ecb59895eb1f 100644 (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)