| 1 |
cmake_minimum_required(VERSION 3.12) |
| 2 |
|
| 3 |
if(TEST_NAME STREQUAL "ctest_read_custom_files") |
| 4 |
set(x 2) |
| 5 |
ctest_read_custom_files("@RunCMake_SOURCE_DIR@") |
| 6 |
elseif(TEST_NAME STREQUAL "ctest_run_script") |
| 7 |
foreach(LEVEL_CURRENT RANGE 2 15) |
| 8 |
math(EXPR LEVEL_NEXT "${LEVEL_CURRENT} + 1") |
| 9 |
configure_file("@RunCMake_SOURCE_DIR@/ctest_run_script.cmake.in" "@RunCMake_BINARY_DIR@/ctest_run_script_${LEVEL_CURRENT}.cmake" @ONLY) |
| 10 |
endforeach() |
| 11 |
|
| 12 |
ctest_run_script("@RunCMake_BINARY_DIR@/ctest_run_script_2.cmake" RETURN_VALUE val) |
| 13 |
if(NOT val EQUAL 0) |
| 14 |
message(FATAL_ERROR "Nested script failed") |
| 15 |
endif() |
| 16 |
endif() |