summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/load_cache/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorCharles Barto <chbarto@microsoft.com>2019-11-13 01:17:17 (GMT)
committerBrad King <brad.king@kitware.com>2019-11-19 19:39:00 (GMT)
commit5e9ecaae0e191aba8b02243cb94a68983d6ce3f0 (patch)
treefcc019812b0735542892afe2ae611375f056c893 /Tests/RunCMake/load_cache/RunCMakeTest.cmake
parent7e62ffc028cbaea17d5dc19d5dd4c2f5fcbfa137 (diff)
downloadCMake-5e9ecaae0e191aba8b02243cb94a68983d6ce3f0.zip
CMake-5e9ecaae0e191aba8b02243cb94a68983d6ce3f0.tar.gz
CMake-5e9ecaae0e191aba8b02243cb94a68983d6ce3f0.tar.bz2
load_cache: Allow READ_WITH_PREFIX mode in cmake scripts
Diffstat (limited to 'Tests/RunCMake/load_cache/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/load_cache/RunCMakeTest.cmake13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/load_cache/RunCMakeTest.cmake b/Tests/RunCMake/load_cache/RunCMakeTest.cmake
new file mode 100644
index 0000000..a0d54ea
--- /dev/null
+++ b/Tests/RunCMake/load_cache/RunCMakeTest.cmake
@@ -0,0 +1,13 @@
+include(RunCMake)
+
+file(WRITE ${RunCMake_BINARY_DIR}/test_project/CMakeCache.txt [[
+CACHE_STRING:STRING=cache string
+CACHE_BOOL:BOOL=ON
+CACHE_INTERNAL:INTERNAL=cache internal
+]])
+
+run_cmake(NewForm_Project)
+run_cmake_command(NewForm_Script ${CMAKE_COMMAND} -DRunCMake_BINARY_DIR=${RunCMake_BINARY_DIR}
+ -P "${RunCMake_SOURCE_DIR}/NewForm_Script.cmake")
+run_cmake_command(OldForm_Script ${CMAKE_COMMAND} -DRunCMake_BINARY_DIR=${RunCMake_BINARY_DIR}
+ -P "${RunCMake_SOURCE_DIR}/OldForm_Script.cmake")