summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-06-13 14:54:47 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-06-13 14:54:57 (GMT)
commit37b4eda1000a8a4d9ec73021d0c912dbb68d4843 (patch)
tree859720d61952582cc93894f490a7d5e209f2c93b /Tests
parent4dbf9b0c41c05e4d9498ad2cd1c74f2c902dd46c (diff)
parent15d9d591bd8560284ec8b82b022ba0135ae58f82 (diff)
downloadCMake-37b4eda1000a8a4d9ec73021d0c912dbb68d4843.zip
CMake-37b4eda1000a8a4d9ec73021d0c912dbb68d4843.tar.gz
CMake-37b4eda1000a8a4d9ec73021d0c912dbb68d4843.tar.bz2
Merge topic 'test-no-git'
15d9d591bd Tests: Require git to enable RunCMake.CMP0150 test 0c2610bd30 Tests: Find GIT_EXECUTABLE early enough to use in all tests Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8556
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLists.txt7
-rw-r--r--Tests/RunCMake/CMakeLists.txt5
2 files changed, 7 insertions, 5 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 5ef77fd..53bb1e6 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -142,6 +142,9 @@ if(BUILD_TESTING)
)
endif()
+ # Look for git to use for tests.
+ find_program(GIT_EXECUTABLE NAMES git)
+
# Look for rpmbuild to use for tests.
# The tool does not work with spaces in the path.
if(NOT CMAKE_CURRENT_BINARY_DIR MATCHES " ")
@@ -2688,10 +2691,6 @@ if(BUILD_TESTING)
endif()
# Test CTest Update with GIT
- if(NOT DEFINED CMake_TEST_CTestUpdate_GIT OR CMake_TEST_CTestUpdate_GIT)
- find_program(GIT_EXECUTABLE NAMES git)
- mark_as_advanced(GIT_EXECUTABLE)
- endif()
if(NOT DEFINED CMake_TEST_CTestUpdate_GIT AND GIT_EXECUTABLE
AND (UNIX OR NOT "${GIT_EXECUTABLE}" MATCHES "cygwin"))
set(CMake_TEST_CTestUpdate_GIT 1)
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index d4f3341..f089a96 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -160,7 +160,10 @@ endif()
add_RunCMake_test(CMP0132)
add_RunCMake_test(CMP0135)
add_RunCMake_test(CMP0139)
-add_RunCMake_test(CMP0150)
+
+if(GIT_EXECUTABLE)
+ add_RunCMake_test(CMP0150)
+endif()
# The test for Policy 65 requires the use of the
# CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS variable, which both the VS and Xcode