Dart.cmake 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. # Dart.cmake
  2. #
  3. # This file configures a project to use the Dart testing/dashboard process.
  4. # It is broken into 3 sections.
  5. #
  6. # Section #1: Locate programs on the client and determine site and build name
  7. # Section #2: Configure or copy Tcl scripts from the source tree to build tree
  8. # Section #3: Custom targets for performing dashboard builds.
  9. #
  10. #
  11. OPTION(BUILD_TESTING "Build the testing tree." "On")
  12. IF(BUILD_TESTING)
  13. INCLUDE(${CMAKE_ROOT}/Modules/FindDart.cmake)
  14. IF (DART_ROOT)
  15. #
  16. # Section #1:
  17. #
  18. # CMake commands that will not vary from project to project. Locates programs
  19. # on the client and configure site name and build name.
  20. #
  21. # the project must have a DartConfig.cmake file
  22. INCLUDE(${PROJECT_SOURCE_DIR}/DartConfig.cmake)
  23. # find programs used by testing
  24. # look for the make program
  25. IF(NOT UNIX)
  26. FIND_PROGRAM(MAKEPROGRAM msdev )
  27. ENDIF(NOT UNIX)
  28. FIND_PROGRAM(MAKEPROGRAM NAMES gmake make )
  29. FIND_PROGRAM(CVSCOMMAND cvs )
  30. FIND_PROGRAM(COMPRESSIONCOMMAND NAMES gzip compress zip )
  31. FIND_PROGRAM(GUNZIPCOMMAND gunzip )
  32. FIND_PROGRAM(JAVACOMMAND java )
  33. FIND_PROGRAM(PURIFYCOMMAND purify )
  34. # find a tcl shell command
  35. IF (UNIX)
  36. FIND_PROGRAM(TCL_TCLSH cygtclsh80 )
  37. ENDIF(UNIX)
  38. FIND_PROGRAM(TCL_TCLSH
  39. NAMES tclsh tclsh83 tclsh8.3 tclsh82 tclsh8.2 tclsh80 tclsh8.0
  40. )
  41. FIND_PROGRAM(HOSTNAME hostname /usr/bsd /usr/sbin /usr/bin /bin /sbin)
  42. FIND_PROGRAM(NSLOOKUP nslookup /usr/bin /usr/sbin /usr/local/bin)
  43. # set the site name
  44. SITE_NAME(SITE)
  45. # set the build name
  46. BUILD_NAME(BUILDNAME)
  47. # set the build command
  48. BUILD_COMMAND(MAKECOMMAND ${MAKEPROGRAM} )
  49. #
  50. # Section #2:
  51. #
  52. # Make necessary directories and configure testing scripts
  53. #
  54. # make directories in the binary tree
  55. MAKE_DIRECTORY(${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Dashboard)
  56. MAKE_DIRECTORY(${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Sites/${SITE}/${BUILDNAME})
  57. # configure files
  58. CONFIGURE_FILE(
  59. ${DART_ROOT}/Source/Client/Utility.conf.in
  60. ${PROJECT_BINARY_DIR}/DartConfiguration.tcl )
  61. #
  62. # Section 3:
  63. #
  64. # Custom targets to perform dashboard builds and submissions.
  65. # These should NOT need to be modified from project to project.
  66. #
  67. # add testing targets
  68. IF(TCL_TCLSH)
  69. ADD_CUSTOM_TARGET(Experimental
  70. ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Start Build Test)
  71. ADD_CUSTOM_TARGET(ExperimentalSubmit
  72. ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Submit)
  73. IF (UNIX)
  74. ADD_CUSTOM_TARGET(Nightly
  75. ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Start Build Test Submit)
  76. ADD_CUSTOM_TARGET(NightlyBuild
  77. ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Start Build)
  78. ADD_CUSTOM_TARGET(NightlyTest
  79. ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Test)
  80. ADD_CUSTOM_TARGET(NightlySubmit
  81. ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Submit)
  82. ADD_CUSTOM_TARGET(NightlyDashboardStart
  83. ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly DashboardStart)
  84. ADD_CUSTOM_TARGET(NightlyDashboardEnd
  85. ${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly DashboardEnd)
  86. ENDIF (UNIX)
  87. ELSE(TCL_TCLSH)
  88. MESSAGE("Could not find TCL_TCLSH, disabling testing." "Error")
  89. ENDIF(TCL_TCLSH)
  90. ENABLE_TESTING()
  91. ENDIF (DART_ROOT)
  92. ENDIF(BUILD_TESTING)
  93. #
  94. # End of Dart.cmake
  95. #