Tests: Add RunCMake helper to run a plain script

Many tests covering CMake scripting commands can work without
initializing a full generator.
This commit is contained in:
Brad King
2021-03-03 16:35:16 -05:00
parent 7eb867b255
commit adc351db8f

View File

@@ -214,6 +214,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})