ctkTravisDashboardScript.cmake 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. #
  2. # OS: Travis CI Linux
  3. # Hardware: x86_64 GNU/Linux VM
  4. # GPU: NA
  5. #
  6. # Note: The specific version and processor type of this machine should be reported in the
  7. # header above. Indeed, this file will be send to the dashboard as a NOTE file.
  8. cmake_minimum_required(VERSION 2.8)
  9. #
  10. # For additional information, see http://www.commontk.org/index.php/Dashboard_setup
  11. #
  12. #
  13. # Dashboard properties
  14. #
  15. set(MY_COMPILER "gcc")
  16. #set(MY_QT_VERSION "4.6.2")
  17. set(QT_QMAKE_EXECUTABLE "/usr/bin/qmake")
  18. set(CTEST_SITE "travis-ci") # for example: mymachine.kitware, mymachine.dkfz, ...
  19. set(CTEST_DASHBOARD_ROOT "/tmp")
  20. set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
  21. #
  22. # Dashboard options
  23. #
  24. set(WITH_KWSTYLE FALSE)
  25. set(WITH_MEMCHECK FALSE)
  26. set(WITH_COVERAGE TRUE)
  27. set(WITH_DOCUMENTATION FALSE)
  28. #set(DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY ) # for example: $ENV{HOME}/Projects/Doxygen
  29. set(CTEST_BUILD_CONFIGURATION "Release")
  30. set(CTEST_TEST_TIMEOUT 500)
  31. set(CTEST_BUILD_FLAGS "-j4") # Use multiple CPU cores to build
  32. # experimental:
  33. # - run_ctest() macro will be called *ONE* time
  34. # - binary directory will *NOT* be cleaned
  35. # continuous:
  36. # - run_ctest() macro will be called EVERY 5 minutes ...
  37. # - binary directory will *NOT* be cleaned
  38. # - configure/build will be executed *ONLY* if the repository has been updated
  39. # nightly:
  40. # - run_ctest() macro will be called *ONE* time
  41. # - binary directory *WILL BE* cleaned
  42. set(SCRIPT_MODE "experimental") # "experimental", "continuous", "nightly"
  43. #
  44. # Project specific properties
  45. #
  46. set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/CTK")
  47. set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/CTK-Superbuild-${CTEST_BUILD_CONFIGURATION}-${SCRIPT_MODE}")
  48. # Additionnal CMakeCache options - For example:
  49. # CTK_LIB_Widgets:BOOL=ON
  50. # CTK_APP_ctkDICOM:BOOL=ON
  51. set(ADDITIONNAL_CMAKECACHE_OPTION "
  52. #CTK_LIB_Scripting/Python/Widgets:BOOL=ON
  53. ")
  54. # List of test that should be explicitly disabled on this machine
  55. set(TEST_TO_EXCLUDE_REGEX "")
  56. # set any extra environment variables here
  57. set(ENV{DISPLAY} ":0")
  58. find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
  59. find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
  60. find_program(CTEST_GIT_COMMAND NAMES git)
  61. #
  62. # Git repository - Overwrite the default value provided by the driver script
  63. #
  64. # set(GIT_REPOSITORY http://github.com/YOURUSERNAME/CTK.git)
  65. ##########################################
  66. # WARNING: DO NOT EDIT BEYOND THIS POINT #
  67. ##########################################
  68. set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
  69. #
  70. # Project specific properties
  71. #
  72. set(CTEST_PROJECT_NAME "CTK")
  73. set(CTEST_BUILD_NAME "${MY_OPERATING_SYSTEM}-${MY_COMPILER}-QT${MY_QT_VERSION}-${CTEST_BUILD_CONFIGURATION}")
  74. #
  75. # Display build info
  76. #
  77. message("site name: ${CTEST_SITE}")
  78. message("build name: ${CTEST_BUILD_NAME}")
  79. message("script mode: ${SCRIPT_MODE}")
  80. message("coverage: ${WITH_COVERAGE}, memcheck: ${WITH_MEMCHECK}")
  81. #
  82. # Convenient macro allowing to download a file
  83. #
  84. macro(downloadFile url dest)
  85. file(DOWNLOAD ${url} ${dest} STATUS status)
  86. list(GET status 0 error_code)
  87. list(GET status 1 error_msg)
  88. if(error_code)
  89. message(FATAL_ERROR "error: Failed to download ${url} - ${error_msg}")
  90. endif()
  91. endmacro()
  92. #
  93. # Download and include dashboard driver script
  94. #
  95. set(url http://commontk.org/ctkDashboardDriverScript.cmake)
  96. set(dest ${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}.driver)
  97. downloadfile(${url} ${dest})
  98. include(${dest})