diff options
author | makise-homura <akemi_homura@kurisa.ch> | 2022-06-23 20:09:33 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-06-28 15:12:04 (GMT) |
commit | b05d297964b4352b81f7ed4aab247609b6a4b0b7 (patch) | |
tree | 35a4dff1240ed28571907a159b7bf619d3dc4acd /Tests/ExternalProject/CMakeLists.txt | |
parent | 2faabab644571b84b485f6fe101d09af0759d3a2 (diff) | |
download | CMake-b05d297964b4352b81f7ed4aab247609b6a4b0b7.zip CMake-b05d297964b4352b81f7ed4aab247609b6a4b0b7.tar.gz CMake-b05d297964b4352b81f7ed4aab247609b6a4b0b7.tar.bz2 |
Tests: handle a case when hg executable is broken
OS Elbrus 6.0-rc1 to rc3 have hg executable broken
because of python2 and python3 module directories conflict.
Here, we avoid hg related tests if such case is detected.
Diffstat (limited to 'Tests/ExternalProject/CMakeLists.txt')
-rw-r--r-- | Tests/ExternalProject/CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt index e4c6c66..81d31e7 100644 --- a/Tests/ExternalProject/CMakeLists.txt +++ b/Tests/ExternalProject/CMakeLists.txt @@ -45,7 +45,11 @@ if(NOT DEFINED EP_TEST_HG OR EP_TEST_HG) find_package(Hg) endif() if(NOT DEFINED EP_TEST_HG AND Hg_FOUND) - set(EP_TEST_HG 1) + # Check if hg executable is working + execute_process(COMMAND "${HG_EXECUTABLE}" --version OUTPUT_QUIET ERROR_QUIET RESULT_VARIABLE HG_RV) + if(HG_RV EQUAL 0) + set(EP_TEST_HG 1) + endif() endif() message(STATUS "EP_TEST_CVS='${EP_TEST_CVS}' CVS_EXECUTABLE='${CVS_EXECUTABLE}'") |