summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ctest_start/RunCMakeTest.cmake
blob: bf4725676a5c9e95748847c7d89e146109abcfe8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
include(RunCTest)

set(CASE_CTEST_START_ARGS "")

function(run_ctest_start CASE_NAME)
  set(CASE_CTEST_START_ARGS "${ARGN}")
  run_ctest(${CASE_NAME})
endfunction()

run_ctest_start(StartQuiet Experimental QUIET)

run_ctest_start(ConfigInSource Experimental)

run_ctest_start(FunctionScope Experimental QUIET)

function(run_ConfigInBuild)
  set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ConfigInBuild-build)
  set(RunCMake_TEST_NO_CLEAN 1)
  file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
  file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
  configure_file(${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in
                 ${RunCMake_BINARY_DIR}/ConfigInBuild-build/CTestConfig.cmake @ONLY)
  run_ctest_start(ConfigInBuild Experimental)
endfunction()
run_ConfigInBuild()