| 1 |
function(compare_build_to_expected) |
| 2 |
cmake_parse_arguments(_comp "" "" "FILES" ${ARGN}) |
| 3 |
set(missing) |
| 4 |
foreach(file ${_comp_FILES}) |
| 5 |
if(NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/${file}") |
| 6 |
list(APPEND missing "${file}") |
| 7 |
endif() |
| 8 |
endforeach() |
| 9 |
if(missing) |
| 10 |
string(APPEND RunCMake_TEST_FAILED "Missing files:\n ${missing}") |
| 11 |
set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE) |
| 12 |
endif() |
| 13 |
endfunction() |
| 14 |
|
| 15 |
function(check_for_setup_test) |
| 16 |
file(STRINGS "${RunCMake_TEST_BINARY_DIR}/CTestTestfile.cmake" output_var REGEX "add_test\\(setup_test.*") |
| 17 |
if(NOT output_var) |
| 18 |
set(RunCMake_TEST_FAILED "Could not find the test: setup_test" PARENT_SCOPE) |
| 19 |
endif() |
| 20 |
endfunction() |