You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.5 KiB

  1. set(CTEST_SOURCE_DIRECTORY "@CMAKE_SOURCE_DIR@")
  2. set(CTEST_BINARY_DIRECTORY "@CMAKE_BINARY_DIR@")
  3. set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@")
  4. set(CTEST_BUILD_NAME "@BUILDNAME@")
  5. set(CTEST_SITE "@SITE@")
  6. set(MODEL Experimental)
  7. if(${CTEST_SCRIPT_ARG} MATCHES Nightly)
  8. set(MODEL Nightly)
  9. elseif(${CTEST_SCRIPT_ARG} MATCHES Continuous)
  10. set(MODEL Continuous)
  11. endif()
  12. find_program(CTEST_HG_COMMAND NAMES hg)
  13. set(CTEST_UPDATE_COMMAND "${CTEST_HG_COMMAND}")
  14. ctest_start(${MODEL} ${CTEST_SOURCE_DIRECTORY} ${CTEST_BINARY_DIRECTORY})
  15. ctest_update(SOURCE "${CTEST_SOURCE_DIRECTORY}")
  16. ctest_submit(PARTS Update Notes)
  17. # to get CTEST_PROJECT_SUBPROJECTS definition:
  18. include("${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake")
  19. foreach(subproject ${CTEST_PROJECT_SUBPROJECTS})
  20. message("")
  21. message("Process ${subproject}")
  22. set_property(GLOBAL PROPERTY SubProject ${subproject})
  23. set_property(GLOBAL PROPERTY Label ${subproject})
  24. ctest_configure(BUILD ${CTEST_BINARY_DIRECTORY} SOURCE ${CTEST_SOURCE_DIRECTORY} )
  25. ctest_submit(PARTS Configure)
  26. set(CTEST_BUILD_TARGET "Build${subproject}")
  27. message("Build ${CTEST_BUILD_TARGET}")
  28. ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" APPEND)
  29. # builds target ${CTEST_BUILD_TARGET}
  30. ctest_submit(PARTS Build)
  31. ctest_test(BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE_LABEL "${subproject}" )
  32. # runs only tests that have a LABELS property matching "${subproject}"
  33. ctest_coverage(BUILD "${CTEST_BINARY_DIRECTORY}" LABELS "${subproject}" )
  34. ctest_submit(PARTS Test)
  35. endforeach()