summaryrefslogtreecommitdiff
path: root/Tests/CTestConfig/dashboard.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CTestConfig/dashboard.cmake.in')
-rw-r--r--Tests/CTestConfig/dashboard.cmake.in43
1 files changed, 43 insertions, 0 deletions
diff --git a/Tests/CTestConfig/dashboard.cmake.in b/Tests/CTestConfig/dashboard.cmake.in
new file mode 100644
index 000000000..c7ac21023
--- /dev/null
+++ b/Tests/CTestConfig/dashboard.cmake.in
@@ -0,0 +1,43 @@
+set(CMAKE_CONFIGURATION_TYPES "@CMAKE_CONFIGURATION_TYPES@")
+set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestConfig")
+set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestConfig/@cfg@-dashboard")
+
+file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
+
+get_filename_component(dir "${CMAKE_COMMAND}" PATH)
+set(CMAKE_CTEST_COMMAND "${dir}/ctest")
+
+message("CMAKE_COMMAND='${CMAKE_COMMAND}'")
+message("CMAKE_CTEST_COMMAND='${CMAKE_CTEST_COMMAND}'")
+
+set(arg "")
+if(NOT CMAKE_CONFIGURATION_TYPES)
+ set(arg "-DCMAKE_BUILD_TYPE:STRING=@cfg@")
+endif()
+
+message("cmake initial configure")
+execute_process(COMMAND ${CMAKE_COMMAND}
+ ${arg} -G "@CMAKE_TEST_GENERATOR@" ${CTEST_SOURCE_DIRECTORY}
+ WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
+ RESULT_VARIABLE rv)
+if(NOT rv STREQUAL 0)
+ message(FATAL_ERROR "error calling cmake: rv='${rv}'")
+endif()
+
+
+function(call_ctest arg)
+ message("call_ctest ${arg}")
+ execute_process(COMMAND ${CMAKE_CTEST_COMMAND}
+ -C "@cfg@" -D ${arg} -VV
+ WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
+ RESULT_VARIABLE rv)
+ if(NOT rv STREQUAL 0)
+ message(FATAL_ERROR "error calling ctest: rv='${rv}'")
+ endif()
+endfunction()
+
+
+call_ctest(ExperimentalStart)
+call_ctest(ExperimentalConfigure)
+call_ctest(ExperimentalBuild)
+call_ctest(ExperimentalTest)