| 1 |
include(RunCMake) |
| 2 |
|
| 3 |
function(run_ATU case target) |
| 4 |
# Use a single build tree for a few tests without cleaning. |
| 5 |
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build) |
| 6 |
set(RunCMake_TEST_NO_CLEAN 1) |
| 7 |
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") |
| 8 |
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") |
| 9 |
if(target) |
| 10 |
set(build_args --target ${target}) |
| 11 |
else() |
| 12 |
set(build_args) |
| 13 |
endif() |
| 14 |
run_cmake(${case}) |
| 15 |
run_cmake_command(${case}Build ${CMAKE_COMMAND} --build . --config Debug ${build_args}) |
| 16 |
endfunction() |
| 17 |
|
| 18 |
run_ATU(SetupTest1 "") |
| 19 |
run_ATU(SetupTest2 "tests") |
| 20 |
run_ATU(SetupTest3 "tests") |
| 21 |
run_ATU(SetupTest4 "") |