diff options
author | Sergei Nikulov <sergey.nikulov@gmail.com> | 2020-10-13 23:37:15 +0300 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-10-29 09:34:30 +0100 |
commit | 3a1e798009799be1e9fad30666351b66f250befb (patch) | |
tree | ebb9908610832d95a333f37bcc786fc78a9f681a /CMakeLists.txt | |
parent | 9a844625c414c5abb89b82c5c017ff25b098ada7 (diff) | |
download | curl-3a1e798009799be1e9fad30666351b66f250befb.tar.gz |
CMake: make BUILD_TESTING dependent option
CMake will now handle BUILD_TESTING depending on PERL_FOUND and
CURL_DISABLE_TESTING
Ref: #6036
Closes #6072
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f3d0a5614..b25488fe4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1324,10 +1324,10 @@ if(BUILD_CURL_EXE) add_subdirectory(src) endif() -option(BUILD_TESTING "Build tests" "${PERL_FOUND}") -if(NOT PERL_FOUND) - message(STATUS "Perl not found, testing disabled.") -elseif(BUILD_TESTING) +cmake_dependent_option(BUILD_TESTING "Build tests" + ON "PERL_FOUND;NOT CURL_DISABLE_TESTS" + OFF) +if(BUILD_TESTING) add_subdirectory(tests) endif() |