mirror of
https://github.com/reactos/CMake.git
synced 2024-11-28 05:50:42 +00:00
Tests: Add missing BUILD_TESTING conditions
We should not call `add_test` unless `BUILD_TESTING` is enabled. Fixes: #18500
This commit is contained in:
parent
ec13ba36b5
commit
a834bcaa91
@ -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.
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user