2001-06-11 23:28:59 +04:00
|
|
|
# Dart.cmake
|
|
|
|
#
|
|
|
|
# This file configures a project to use the Dart testing/dashboard process.
|
|
|
|
# It is broken into 3 sections.
|
|
|
|
#
|
|
|
|
# Section #1: Locate programs on the client and determine site and build name
|
|
|
|
# Section #2: Configure or copy Tcl scripts from the source tree to build tree
|
|
|
|
# Section #3: Custom targets for performing dashboard builds.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
OPTION(BUILD_TESTING "Build the testing tree." "On")
|
|
|
|
|
|
|
|
IF(BUILD_TESTING)
|
2001-06-18 21:16:47 +04:00
|
|
|
INCLUDE(${CMAKE_ROOT}/Modules/FindDart.cmake)
|
|
|
|
|
|
|
|
IF (DART_ROOT)
|
2001-06-11 23:28:59 +04:00
|
|
|
#
|
|
|
|
# Section #1:
|
|
|
|
#
|
|
|
|
# CMake commands that will not vary from project to project. Locates programs
|
|
|
|
# on the client and configure site name and build name.
|
|
|
|
#
|
|
|
|
|
2001-06-18 21:16:47 +04:00
|
|
|
# the project must have a DartConfig.cmake file
|
|
|
|
INCLUDE(${PROJECT_SOURCE_DIR}/DartConfig.cmake)
|
|
|
|
|
2001-11-16 01:11:26 +03:00
|
|
|
# make program just needs to use CMAKE_MAKE_PROGRAM which is required
|
|
|
|
# to be defined by cmake
|
|
|
|
SET(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM})
|
2001-06-11 23:28:59 +04:00
|
|
|
FIND_PROGRAM(CVSCOMMAND cvs )
|
2001-11-27 02:28:27 +03:00
|
|
|
FIND_PROGRAM(COMPRESSIONCOMMAND NAMES gzip compress zip
|
|
|
|
DOC "Path to program used to compress files for transfer to the dart server")
|
|
|
|
FIND_PROGRAM(GUNZIPCOMMAND gunzip DOC "Path to gunzip executable")
|
|
|
|
FIND_PROGRAM(JAVACOMMAND java DOC "Path to java command, used by the Dart server to create html.")
|
|
|
|
FIND_PROGRAM(PURIFYCOMMAND purify DOC "Path to Rational purify command, used for memory error detection.")
|
2001-06-11 23:28:59 +04:00
|
|
|
|
|
|
|
# find a tcl shell command
|
|
|
|
IF (UNIX)
|
2001-09-10 23:11:43 +04:00
|
|
|
FIND_PROGRAM(TCL_TCLSH cygtclsh80 )
|
2001-06-11 23:28:59 +04:00
|
|
|
ENDIF(UNIX)
|
2001-09-10 23:11:43 +04:00
|
|
|
FIND_PROGRAM(TCL_TCLSH
|
2001-06-11 23:28:59 +04:00
|
|
|
NAMES tclsh tclsh83 tclsh8.3 tclsh82 tclsh8.2 tclsh80 tclsh8.0
|
|
|
|
)
|
|
|
|
FIND_PROGRAM(HOSTNAME hostname /usr/bsd /usr/sbin /usr/bin /bin /sbin)
|
|
|
|
FIND_PROGRAM(NSLOOKUP nslookup /usr/bin /usr/sbin /usr/local/bin)
|
|
|
|
|
|
|
|
# set the site name
|
|
|
|
SITE_NAME(SITE)
|
|
|
|
# set the build name
|
|
|
|
BUILD_NAME(BUILDNAME)
|
|
|
|
# set the build command
|
|
|
|
BUILD_COMMAND(MAKECOMMAND ${MAKEPROGRAM} )
|
|
|
|
|
2001-11-27 23:20:18 +03:00
|
|
|
MARK_AS_ADVANCED(
|
|
|
|
SITE
|
|
|
|
BUILDNAME
|
|
|
|
MAKECOMMAND
|
|
|
|
HOSTNAME
|
|
|
|
NSLOOKUP
|
|
|
|
JAVACOMMAND
|
|
|
|
PURIFYCOMMAND
|
|
|
|
GUNZIPCOMMAND
|
|
|
|
COMPRESSIONCOMMAND
|
|
|
|
CVSCOMMAND
|
|
|
|
)
|
|
|
|
|
2001-06-11 23:28:59 +04:00
|
|
|
#
|
|
|
|
# Section #2:
|
|
|
|
#
|
|
|
|
# Make necessary directories and configure testing scripts
|
|
|
|
#
|
|
|
|
|
|
|
|
# make directories in the binary tree
|
2001-06-12 03:14:31 +04:00
|
|
|
MAKE_DIRECTORY(${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Dashboard)
|
2001-06-11 23:28:59 +04:00
|
|
|
MAKE_DIRECTORY(${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Sites/${SITE}/${BUILDNAME})
|
|
|
|
|
|
|
|
# configure files
|
|
|
|
CONFIGURE_FILE(
|
2001-06-18 21:16:47 +04:00
|
|
|
${DART_ROOT}/Source/Client/Utility.conf.in
|
|
|
|
${PROJECT_BINARY_DIR}/DartConfiguration.tcl )
|
2001-06-11 23:28:59 +04:00
|
|
|
|
|
|
|
#
|
|
|
|
# Section 3:
|
|
|
|
#
|
|
|
|
# Custom targets to perform dashboard builds and submissions.
|
|
|
|
# These should NOT need to be modified from project to project.
|
|
|
|
#
|
|
|
|
|
|
|
|
# add testing targets
|
2001-09-10 23:11:43 +04:00
|
|
|
IF(TCL_TCLSH)
|
2001-09-11 22:43:25 +04:00
|
|
|
ADD_CUSTOM_TARGET(Experimental
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Start Build Test)
|
2001-07-10 19:56:26 +04:00
|
|
|
ADD_CUSTOM_TARGET(ExperimentalSubmit
|
2001-09-10 23:11:43 +04:00
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Submit)
|
2001-09-13 22:45:32 +04:00
|
|
|
|
|
|
|
IF (UNIX)
|
2001-11-02 23:26:15 +03:00
|
|
|
# Make targets for Experimental builds
|
2001-11-15 22:54:26 +03:00
|
|
|
ADD_CUSTOM_TARGET(ExperimentalStart
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Start)
|
2001-11-02 23:26:15 +03:00
|
|
|
ADD_CUSTOM_TARGET(ExperimentalBuild
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Start Build)
|
|
|
|
ADD_CUSTOM_TARGET(ExperimentalTest
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Test)
|
|
|
|
ADD_CUSTOM_TARGET(ExperimentalCoverage
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental Coverage)
|
2001-11-25 02:47:48 +03:00
|
|
|
ADD_CUSTOM_TARGET(ExperimentalDashboardStart
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental DashboardStart)
|
|
|
|
ADD_CUSTOM_TARGET(ExperimentalDashboardEnd
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Experimental DashboardEnd)
|
2001-11-02 23:26:15 +03:00
|
|
|
|
2001-11-15 22:54:26 +03:00
|
|
|
# Continuous
|
|
|
|
ADD_CUSTOM_TARGET(Continuous
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Start Update Build Test Submit)
|
|
|
|
ADD_CUSTOM_TARGET(ContinuousStart
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Start)
|
|
|
|
ADD_CUSTOM_TARGET(ContinuousUpdate
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Update)
|
|
|
|
ADD_CUSTOM_TARGET(ContinuousBuild
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Build)
|
|
|
|
ADD_CUSTOM_TARGET(ContinuousTest
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Test)
|
|
|
|
ADD_CUSTOM_TARGET(ContinuousCoverage
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Coverage)
|
|
|
|
ADD_CUSTOM_TARGET(ContinuousSubmit
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Continuous Submit)
|
|
|
|
|
2001-11-02 23:26:15 +03:00
|
|
|
# Nightly
|
2001-09-13 22:45:32 +04:00
|
|
|
ADD_CUSTOM_TARGET(Nightly
|
2001-11-15 22:54:26 +03:00
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Start Update Build Test Submit)
|
|
|
|
ADD_CUSTOM_TARGET(NightlyStart
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Start)
|
|
|
|
ADD_CUSTOM_TARGET(NightlyUpdate
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Update)
|
2001-09-13 22:45:32 +04:00
|
|
|
ADD_CUSTOM_TARGET(NightlyBuild
|
2001-11-15 22:54:26 +03:00
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Build)
|
2001-09-13 22:45:32 +04:00
|
|
|
ADD_CUSTOM_TARGET(NightlyTest
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Test)
|
2001-09-17 20:07:24 +04:00
|
|
|
ADD_CUSTOM_TARGET(NightlyCoverage
|
2001-09-27 00:23:56 +04:00
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Coverage)
|
2001-09-13 22:45:32 +04:00
|
|
|
ADD_CUSTOM_TARGET(NightlySubmit
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly Submit)
|
|
|
|
ADD_CUSTOM_TARGET(NightlyDashboardStart
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly DashboardStart)
|
|
|
|
ADD_CUSTOM_TARGET(NightlyDashboardEnd
|
|
|
|
${TCL_TCLSH} ${DART_ROOT}/Source/Client/DashboardManager.tcl ${PROJECT_BINARY_DIR}/DartConfiguration.tcl Nightly DashboardEnd)
|
|
|
|
ENDIF (UNIX)
|
|
|
|
|
2001-09-10 23:11:43 +04:00
|
|
|
ELSE(TCL_TCLSH)
|
|
|
|
MESSAGE("Could not find TCL_TCLSH, disabling testing." "Error")
|
|
|
|
ENDIF(TCL_TCLSH)
|
2001-07-18 18:17:17 +04:00
|
|
|
ENABLE_TESTING()
|
2001-06-11 23:28:59 +04:00
|
|
|
|
2001-06-18 21:16:47 +04:00
|
|
|
ENDIF (DART_ROOT)
|
2001-06-11 23:28:59 +04:00
|
|
|
ENDIF(BUILD_TESTING)
|
|
|
|
|
|
|
|
#
|
|
|
|
# End of Dart.cmake
|
|
|
|
#
|
|
|
|
|