dashboard.cmake.in 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. set(_isMultiConfig "@_isMultiConfig@")
  2. set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestConfig")
  3. set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestConfig/@cfg@-dashboard")
  4. file(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}")
  5. get_filename_component(dir "${CMAKE_COMMAND}" PATH)
  6. set(CMAKE_CTEST_COMMAND "${dir}/ctest")
  7. message("CMAKE_COMMAND='${CMAKE_COMMAND}'")
  8. message("CMAKE_CTEST_COMMAND='${CMAKE_CTEST_COMMAND}'")
  9. set(arg "")
  10. if(NOT _isMultiConfig)
  11. set(arg "-DCMAKE_BUILD_TYPE:STRING=@cfg@")
  12. endif()
  13. message("cmake initial configure")
  14. execute_process(COMMAND ${CMAKE_COMMAND}
  15. ${arg}
  16. -G "@CMAKE_GENERATOR@"
  17. -A "@CMAKE_GENERATOR_PLATFORM@"
  18. -T "@CMAKE_GENERATOR_TOOLSET@"
  19. ${CTEST_SOURCE_DIRECTORY}
  20. WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
  21. RESULT_VARIABLE rv)
  22. if(NOT rv STREQUAL 0)
  23. message(FATAL_ERROR "error calling cmake: rv='${rv}'")
  24. endif()
  25. function(call_ctest arg)
  26. message("call_ctest ${arg}")
  27. execute_process(COMMAND ${CMAKE_CTEST_COMMAND}
  28. -C "@cfg@" -D ${arg} -VV
  29. WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY}
  30. RESULT_VARIABLE rv)
  31. if(NOT rv STREQUAL 0)
  32. message(FATAL_ERROR "error calling ctest: rv='${rv}'")
  33. endif()
  34. endfunction()
  35. call_ctest(ExperimentalStart)
  36. call_ctest(ExperimentalConfigure)
  37. call_ctest(ExperimentalBuild)
  38. call_ctest(ExperimentalTest)