ctkDashboardScript.EXAMPLE.cmake 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. # File name: ctkDashboardDriverScript.cmake
  2. #
  3. # OS: Ubuntu 9.04 2.6.28-18-generic
  4. # Hardware: x86_64 GNU/Linux
  5. # GPU: NA
  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,
  11. # See http://github.com/pieper/CTK/raw/master/CMake/ctkDashboardScript.EXAMPLE.cmake
  12. # See http://github.com/pieper/CTK/raw/master/CMake/ctkDashboardDriverScript.cmake
  13. #
  14. #
  15. # Dashboard properties
  16. #
  17. set(MY_OPERATING_SYSTEM "Linux") # Windows, Linux, Darwin...
  18. set(MY_COMPILER "g++4.3.3")
  19. set(MY_QT_VERSION "4.6.2")
  20. set(QT_QMAKE_EXECUTABLE "$ENV{HOME}/Projects/qtsdk-2010.02/qt/bin/qmake")
  21. set(CTEST_SITE "sagarmatha.kitware") # for example: mymachine.kitware, mymachine.dkfz, ...
  22. set(CTEST_DASHBOARD_ROOT "$ENV{HOME}/Projects/")
  23. set(CTEST_CMAKE_COMMAND "$ENV{HOME}/Projects/cmake-trunk-build/bin/cmake")
  24. set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
  25. #
  26. # Dashboard options
  27. #
  28. set(WITH_KWSTYLE FALSE)
  29. set(WITH_MEMCHECK FALSE)
  30. set(WITH_COVERAGE TRUE)
  31. set(WITH_DOCUMENTATION FALSE)
  32. #set(DOCUMENTATION_ARCHIVES_OUTPUT_DIRECTORY ) # for example: $ENV{HOME}/Projects/Doxygen
  33. set(CTEST_BUILD_CONFIGURATION "Release")
  34. set(CTEST_TEST_TIMEOUT 500)
  35. set(CTEST_BUILD_FLAGS "-j4") # Use multiple CPU cores to build
  36. # experimental:
  37. # - run_ctest() macro will be called *ONE* time
  38. # - binary directory will *NOT* be cleaned
  39. # continuous:
  40. # - run_ctest() macro will be called EVERY 5 minutes ...
  41. # - binary directory will *NOT* be cleaned
  42. # - configure/build will be executed *ONLY* if the repository has been updated
  43. # nightly:
  44. # - run_ctest() macro will be called *ONE* time
  45. # - binary directory *WILL BE* cleaned
  46. set(SCRIPT_MODE "experimental") # "experimental", "continuous", "nightly"
  47. #
  48. # Project specific properties
  49. #
  50. set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/CTK")
  51. set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/CTK-Superbuild-${CTEST_BUILD_CONFIGURATION}-${SCRIPT_MODE}")
  52. # Additionnal CMakeCache options - For example:
  53. # CTK_LIB_Widgets:BOOL=ON
  54. # CTK_APP_ctkDICOM:BOOL=ON
  55. set(ADDITIONNAL_CMAKECACHE_OPTION "
  56. #CTK_LIB_Scripting/Python/Widgets:BOOL=ON
  57. ")
  58. # List of test that should be explicitly disabled on this machine
  59. set(TEST_TO_EXCLUDE_REGEX "")
  60. # set any extra environment variables here
  61. set(ENV{DISPLAY} ":0")
  62. set(ENV{CXX} "/usr/bin/g++")
  63. set(ENV{CC} "/usr/bin/gcc")
  64. find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
  65. find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
  66. find_program(CTEST_GIT_COMMAND NAMES git)
  67. #
  68. # Git repository - Overwrite the default value provided by the driver script
  69. #
  70. # set(GIT_REPOSITORY http://github.com/YOURUSERNAME/CTK.git)
  71. ##########################################
  72. # WARNING: DO NOT EDIT BEYOND THIS POINT #
  73. ##########################################
  74. set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
  75. #
  76. # Project specific properties
  77. #
  78. set(CTEST_PROJECT_NAME "CTK")
  79. set(CTEST_BUILD_NAME "${MY_OPERATING_SYSTEM}-${MY_COMPILER}-QT${MY_QT_VERSION}-${CTEST_BUILD_CONFIGURATION}")
  80. #
  81. # Display build info
  82. #
  83. message("site name: ${CTEST_SITE}")
  84. message("build name: ${CTEST_BUILD_NAME}")
  85. message("script mode: ${SCRIPT_MODE}")
  86. message("coverage: ${WITH_COVERAGE}, memcheck: ${WITH_MEMCHECK}")
  87. #
  88. # Convenient macro allowing to download a file
  89. #
  90. MACRO(downloadFile url dest)
  91. FILE(DOWNLOAD ${url} ${dest} STATUS status)
  92. LIST(GET status 0 error_code)
  93. LIST(GET status 1 error_msg)
  94. IF(error_code)
  95. MESSAGE(FATAL_ERROR "error: Failed to download ${url} - ${error_msg}")
  96. ENDIF()
  97. ENDMACRO()
  98. #
  99. # Download and include dashboard driver script
  100. #
  101. set(url http://github.com/pieper/CTK/raw/master/CMake/ctkDashboardDriverScript.cmake)
  102. set(dest ${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}.driver)
  103. downloadFile(${url} ${dest})
  104. INCLUDE(${dest})