summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-22 19:20:33 (GMT)
committerBrad King <brad.king@kitware.com>2019-08-23 15:12:07 (GMT)
commit4b8a864d52fa7501af915b3f94dfbd55fe9065b8 (patch)
treeb0c08536246b22c379d339d07e2c9371fbc66050 /CMakeLists.txt
parent19612dffd27d90d73e3b7cff9cbba241294c17e9 (diff)
downloadCMake-4b8a864d52fa7501af915b3f94dfbd55fe9065b8.zip
CMake-4b8a864d52fa7501af915b3f94dfbd55fe9065b8.tar.gz
CMake-4b8a864d52fa7501af915b3f94dfbd55fe9065b8.tar.bz2
Add option to test CMake itself against its hosting CMake
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e3d39d..3daebee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,6 +18,10 @@ if(CMAKE_BOOTSTRAP)
unset(CMAKE_BOOTSTRAP CACHE)
endif()
+if(CMake_TEST_HOST_CMAKE)
+ get_filename_component(CMake_TEST_EXTERNAL_CMAKE "${CMAKE_COMMAND}" DIRECTORY)
+endif()
+
if(NOT CMake_TEST_EXTERNAL_CMAKE)
if(CMAKE_SYSTEM_NAME STREQUAL "HP-UX")
message(FATAL_ERROR