Selaa lähdekoodia

Merge topic 'fix-no-testing'

a834bcaa91 Tests: Add missing BUILD_TESTING conditions

Acked-by: Kitware Robot <[email protected]>
Acked-by: Dan Ibanez <[email protected]>
Merge-request: !2520
Brad King 7 vuotta sitten
vanhempi
sitoutus
89ab893469
2 muutettua tiedostoa jossa 5 lisäystä ja 4 poistoa
  1. 4 3
      CMakeLists.txt
  2. 1 1
      Utilities/cmcurl/CMakeLists.txt

+ 4 - 3
CMakeLists.txt

@@ -791,9 +791,10 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE)
   endif()
 endif()
 
-# add a test
-add_test(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
-  --system-information  -G "${CMAKE_GENERATOR}" )
+if(BUILD_TESTING)
+  add_test(SystemInformationNew "${CMAKE_CMAKE_COMMAND}"
+    --system-information  -G "${CMAKE_GENERATOR}" )
+endif()
 
 if(NOT CMake_TEST_EXTERNAL_CMAKE)
   # Install license file as it requires.

+ 1 - 1
Utilities/cmcurl/CMakeLists.txt

@@ -1289,7 +1289,7 @@ endif()
 add_executable(LIBCURL curltest.c)
 target_link_libraries(LIBCURL cmcurl)
 
-if(CMAKE_CURL_TEST_URL)
+if(BUILD_TESTING AND CMAKE_CURL_TEST_URL)
   add_test(curl LIBCURL ${CMAKE_CURL_TEST_URL})
 endif()