blob: 4c2c107647e345e621a78aad0387a20ddd80c6fb (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
include(RunCMake)
set(RunCMake_TEST_OPTIONS -DNoProject=1)
run_cmake(BeforeProject)
unset(RunCMake_TEST_OPTIONS)
run_cmake(NotOn)
run_cmake(Site)
function(run_CMakeCTestArguments)
run_cmake_with_options(CMakeCTestArguments "-DCMAKE_CTEST_ARGUMENTS=--quiet\\;--output-log\\;output-log.txt")
set(RunCMake_TEST_NO_CLEAN 1)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMakeCTestArguments-build)
if(RunCMake_GENERATOR MATCHES "Make|Ninja")
set(test "test")
else()
set(test "RUN_TESTS")
endif()
run_cmake_command(CMakeCTestArguments-test ${CMAKE_COMMAND} --build . --config Debug --target "${test}")
endfunction()
run_CMakeCTestArguments()
function(run_TestfileErrors)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/TestfileErrors-build)
run_cmake(TestfileErrors)
set(RunCMake_TEST_NO_CLEAN 1)
run_cmake_command(TestfileErrors-build ${CMAKE_COMMAND} --build . --config Debug)
run_cmake_command(TestfileErrors-test ${CMAKE_CTEST_COMMAND} -C Debug)
endfunction()
run_TestfileErrors()
function(run_SingleConfig)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/SingleConfig-build)
run_cmake(SingleConfig)
set(RunCMake_TEST_NO_CLEAN 1)
run_cmake_command(SingleConfig-build ${CMAKE_COMMAND} --build .)
run_cmake_command(SingleConfig-test ${CMAKE_CTEST_COMMAND}) # No -C Debug required for single-config.
endfunction()
if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
run_SingleConfig()
endif()
run_cmake(CMP0145-Dart-OLD)
run_cmake(CMP0145-Dart-WARN)
run_cmake(CMP0145-Dart-NEW)
run_cmake(CMP0145-FindDart-OLD)
run_cmake(CMP0145-FindDart-WARN)
run_cmake(CMP0145-FindDart-NEW)
|