2009-12-04 20:09:01 +03:00
|
|
|
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}
|
2013-02-06 01:10:36 +04:00
|
|
|
${arg}
|
|
|
|
-G "@CMAKE_TEST_GENERATOR@"
|
|
|
|
-T "@CMAKE_TEST_GENERATOR_TOOLSET@"
|
|
|
|
${CTEST_SOURCE_DIRECTORY}
|
2009-12-04 20:09:01 +03:00
|
|
|
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)
|