diff options
author | Brad King <brad.king@kitware.com> | 2021-03-03 21:35:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-03-31 16:00:09 (GMT) |
commit | fc9c1d83bf23852bfeb280aac2890b5b3fc94414 (patch) | |
tree | ec5d7bef923c27282e26a33a857f611f2ce09ff8 /Tests | |
parent | d421274e3e11a0e6480358faa8a8e5cf48d7b3c2 (diff) | |
download | CMake-fc9c1d83bf23852bfeb280aac2890b5b3fc94414.zip CMake-fc9c1d83bf23852bfeb280aac2890b5b3fc94414.tar.gz CMake-fc9c1d83bf23852bfeb280aac2890b5b3fc94414.tar.bz2 |
Tests: Add RunCMake helper to run a plain script
Many tests covering CMake scripting commands can work without
initializing a full generator.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/RunCMake.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index cb20fb1..042770c 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -205,6 +205,11 @@ function(run_cmake_command test) run_cmake(${test}) endfunction() +function(run_cmake_script test) + set(RunCMake_TEST_COMMAND ${CMAKE_COMMAND} ${ARGN} -P ${RunCMake_SOURCE_DIR}/${test}.cmake) + run_cmake(${test}) +endfunction() + function(run_cmake_with_options test) set(RunCMake_TEST_OPTIONS "${ARGN}") run_cmake(${test}) |