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 )
2004-10-13 02:29:04 +04:00
ENABLE_TESTING ( )
2001-06-18 21:16:47 +04:00
INCLUDE ( ${ CMAKE_ROOT } /Modules/FindDart.cmake )
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
2003-02-21 01:38:16 +03:00
IF ( EXISTS ${ PROJECT_SOURCE_DIR } /DartConfig.cmake )
INCLUDE ( ${ PROJECT_SOURCE_DIR } /DartConfig.cmake )
ELSE ( EXISTS ${ PROJECT_SOURCE_DIR } /DartConfig.cmake )
# Dashboard is opened for submissions for a 24 hour period starting at
2005-06-21 00:31:34 +04:00
# the specified NIGHTLY_START_TIME. Time is specified in 24 hour format.
2005-07-18 19:46:45 +04:00
MACRO ( SET_IF_NOT_SET var val )
IF ( NOT "${${var}}" )
SET ( "${var}" "${val}" )
ENDIF ( NOT "${${var}}" )
ENDMACRO ( SET_IF_NOT_SET )
SET_IF_NOT_SET ( NIGHTLY_START_TIME "00:00:00 EDT" )
2003-02-21 01:38:16 +03:00
# Dart server to submit results (used by client)
2004-10-13 02:29:04 +04:00
# There should be an option to specify submit method, but I will leave it
# commented until we decide what to do with it.
# SET(DROP_METHOD "http" CACHE STRING "Set the CTest submit method. Valid options are http and ftp")
IF ( DROP_METHOD MATCHES http )
2005-07-18 19:46:45 +04:00
SET_IF_NOT_SET ( DROP_SITE "public.kitware.com" )
SET_IF_NOT_SET ( DROP_LOCATION "/cgi-bin/HTTPUploadDartFile.cgi" )
2004-10-13 02:29:04 +04:00
ELSE ( DROP_METHOD MATCHES http )
2005-07-18 19:46:45 +04:00
SET_IF_NOT_SET ( DROP_SITE "public.kitware.com" )
SET_IF_NOT_SET ( DROP_LOCATION "/incoming" )
SET_IF_NOT_SET ( DROP_SITE_USER "anonymous" )
SET_IF_NOT_SET ( DROP_SITE_PASSWORD "random@ringworld" )
SET_IF_NOT_SET ( DROP_SITE_MODE "active" )
2004-10-13 02:29:04 +04:00
ENDIF ( DROP_METHOD MATCHES http )
2005-07-18 19:46:45 +04:00
SET_IF_NOT_SET ( TRIGGER_SITE "http://${DROP_SITE}/cgi-bin/Submit-Random-TestingResults.cgi" )
SET_IF_NOT_SET ( COMPRESS_SUBMISSION ON )
2003-02-21 01:38:16 +03:00
# Project Home Page
SET ( PROJECT_URL "http://www.kitware.com" )
# Dart server configuration
SET ( ROLLUP_URL "http://${DROP_SITE}/cgi-bin/random-rollup-dashboard.sh" )
#SET (CVS_WEB_URL "")
#SET (CVS_WEB_CVSROOT "")
#SET (USE_DOXYGEN "Off")
#SET (DOXYGEN_URL "" )
ENDIF ( EXISTS ${ PROJECT_SOURCE_DIR } /DartConfig.cmake )
2001-06-18 21:16:47 +04:00
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 } )
2003-05-02 21:57:25 +04:00
OPTION ( DART_VERBOSE_BUILD "Show the actual output of the build, or if off show a . for each 1024 bytes."
O F F )
2003-03-03 17:32:45 +03:00
OPTION ( DART_BUILD_ERROR_REPORT_LIMIT "Limit of reported errors, -1 reports all." -1 )
OPTION ( DART_BUILD_WARNING_REPORT_LIMIT "Limit of reported warnings, -1 reports all." -1 )
SET ( VERBOSE_BUILD ${ DART_VERBOSE_BUILD } )
SET ( BUILD_ERROR_REPORT_LIMIT ${ DART_BUILD_ERROR_REPORT_LIMIT } )
SET ( BUILD_WARNING_REPORT_LIMIT ${ DART_BUILD_WARNING_REPORT_LIMIT } )
2002-01-22 22:15:15 +03:00
2001-06-11 23:28:59 +04:00
FIND_PROGRAM ( CVSCOMMAND cvs )
2002-01-22 22:15:15 +03:00
SET ( CVS_UPDATE_OPTIONS "-d -A -P" CACHE STRING "Options passed to the cvs update command." )
2005-02-16 21:30:17 +03:00
FIND_PROGRAM ( SVNCOMMAND svn )
2005-06-21 00:31:34 +04:00
#SET(SVN_UPDATE_OPTIONS "-d -A -P" CACHE STRING "Options passed to the svn update command.")
2005-02-16 21:30:17 +03:00
IF ( NOT UPDATE_TYPE )
IF ( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS" )
SET ( UPDATE_TYPE cvs )
ELSE ( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS" )
IF ( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn" )
SET ( UPDATE_TYPE svn )
ENDIF ( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn" )
ENDIF ( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS" )
ENDIF ( NOT UPDATE_TYPE )
IF ( NOT UPDATE_TYPE )
2005-03-01 22:30:10 +03:00
MESSAGE ( STATUS "Cannot determine repository type. Please set UPDATE_TYPE to 'cvs' or 'svn'. CTest update will not work." )
2005-02-16 21:30:17 +03:00
ENDIF ( NOT UPDATE_TYPE )
IF ( UPDATE_TYPE MATCHES "[Cc][Vv][Ss]" )
2005-02-16 21:36:07 +03:00
MESSAGE ( STATUS "This is a CVS repository" )
2005-02-16 21:30:17 +03:00
SET ( UPDATE_COMMAND "${CVSCOMMAND}" )
SET ( UPDATE_OPTIONS "${CVS_UPDATE_OPTIONS}" )
ELSE ( UPDATE_TYPE MATCHES "[Cc][Vv][Ss]" )
IF ( UPDATE_TYPE MATCHES "[Ss][Vv][Nn]" )
2005-02-16 21:36:07 +03:00
MESSAGE ( STATUS "This is a SVN repository" )
2005-02-16 21:30:17 +03:00
SET ( UPDATE_COMMAND "${SVNCOMMAND}" )
SET ( UPDATE_OPTIONS "${SVN_UPDATE_OPTIONS}" )
ENDIF ( UPDATE_TYPE MATCHES "[Ss][Vv][Nn]" )
ENDIF ( UPDATE_TYPE MATCHES "[Cc][Vv][Ss]" )
2002-01-22 22:15:15 +03:00
SET ( DART_TESTING_TIMEOUT 1500 CACHE STRING "Time alloted for a test before Dart will kill the test." )
2001-11-27 02:28:27 +03:00
FIND_PROGRAM ( COMPRESSIONCOMMAND NAMES gzip compress zip
2003-05-02 21:57:25 +04:00
D O C " P a t h t o p r o g r a m u s e d t o c o m p r e s s f i l e s f o r t r a n s f e r t o t h e d a r t s e r v e r " )
2001-11-27 02:28:27 +03:00
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." )
2003-12-16 01:26:00 +03:00
FIND_PROGRAM ( MEMORYCHECK_COMMAND
N A M E S p u r i f y v a l g r i n d b o u n d s c h e c k
P A T H S
2002-04-05 19:51:14 +04:00
" [ H K E Y _ L O C A L _ M A C H I N E \ \ S O F T W A R E \ \ R a t i o n a l S o f t w a r e \ \ P u r i f y \ \ S e t u p ; I n s t a l l F o l d e r ] "
D O C " P a t h t o R a t i o n a l p u r i f y c o m m a n d , u s e d f o r m e m o r y e r r o r d e t e c t i o n . "
)
2005-04-07 00:53:55 +04:00
SET ( MEMORYCHECK_SUPPRESSIONS_FILE "" CACHE FILEPATH "File that contains suppressions for the memory checker" )
2002-01-22 22:15:15 +03:00
FIND_PROGRAM ( SCPCOMMAND scp DOC "Path to scp command, used by some Dart clients for submitting results to a Dart server (when not using ftp for submissions)" )
2003-12-08 19:23:46 +03:00
FIND_PROGRAM ( COVERAGE_COMMAND gcov DOC "Path to the coverage program that Dart client uses for performing coverage inspection" )
2001-06-11 23:28:59 +04:00
# set the site name
SITE_NAME ( SITE )
# set the build name
2003-02-27 19:54:03 +03:00
IF ( NOT BUILDNAME )
SET ( DART_COMPILER "${CMAKE_CXX_COMPILER}" )
IF ( NOT DART_COMPILER )
SET ( DART_COMPILER "${CMAKE_C_COMPILER}" )
ENDIF ( NOT DART_COMPILER )
IF ( NOT DART_COMPILER )
SET ( DART_COMPILER "unknown" )
ENDIF ( NOT DART_COMPILER )
2003-03-06 23:32:40 +03:00
IF ( WIN32 )
SET ( DART_NAME_COMPONENT "NAME_WE" )
ELSE ( WIN32 )
SET ( DART_NAME_COMPONENT "NAME" )
ENDIF ( WIN32 )
2004-07-27 16:48:08 +04:00
IF ( NOT BUILD_NAME_SYSTEM_NAME )
SET ( BUILD_NAME_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}" )
ENDIF ( NOT BUILD_NAME_SYSTEM_NAME )
2003-12-16 01:26:00 +03:00
IF ( WIN32 )
SET ( BUILD_NAME_SYSTEM_NAME "Win32" )
ENDIF ( WIN32 )
2003-02-27 22:48:33 +03:00
IF ( UNIX OR BORLAND )
2003-03-06 23:32:40 +03:00
GET_FILENAME_COMPONENT ( DART_CXX_NAME "${CMAKE_CXX_COMPILER}" ${ DART_NAME_COMPONENT } )
2003-02-27 22:48:33 +03:00
ELSE ( UNIX OR BORLAND )
2003-03-06 23:32:40 +03:00
GET_FILENAME_COMPONENT ( DART_CXX_NAME "${CMAKE_BUILD_TOOL}" ${ DART_NAME_COMPONENT } )
2003-02-27 22:48:33 +03:00
ENDIF ( UNIX OR BORLAND )
2003-12-16 01:26:00 +03:00
IF ( DART_CXX_NAME MATCHES "msdev" )
SET ( DART_CXX_NAME "vs60" )
ENDIF ( DART_CXX_NAME MATCHES "msdev" )
IF ( DART_CXX_NAME MATCHES "devenv" )
IF ( CMAKE_GENERATOR MATCHES "^Visual Studio 7$" )
SET ( DART_CXX_NAME "vs70" )
ELSE ( CMAKE_GENERATOR MATCHES "^Visual Studio 7$" )
2005-07-27 01:40:16 +04:00
IF ( CMAKE_GENERATOR MATCHES "^Visual Studio 7 .NET 2003$" )
SET ( DART_CXX_NAME "vs71" )
ELSE ( CMAKE_GENERATOR MATCHES "^Visual Studio 7 .NET 2003$" )
SET ( DART_CXX_NAME "vs8" )
ENDIF ( CMAKE_GENERATOR MATCHES "^Visual Studio 7 .NET 2003$" )
2003-12-16 01:26:00 +03:00
ENDIF ( CMAKE_GENERATOR MATCHES "^Visual Studio 7$" )
ENDIF ( DART_CXX_NAME MATCHES "devenv" )
2004-07-27 16:48:08 +04:00
SET ( BUILDNAME "${BUILD_NAME_SYSTEM_NAME}-${DART_CXX_NAME}" )
2003-03-06 23:32:40 +03:00
MESSAGE ( STATUS "Using Buildname: ${BUILDNAME}" )
2003-02-27 19:54:03 +03:00
ENDIF ( NOT BUILDNAME )
2001-06-11 23:28:59 +04:00
# set the build command
BUILD_COMMAND ( MAKECOMMAND ${ MAKEPROGRAM } )
2002-01-15 23:29:31 +03:00
SET ( DELIVER_CONTINUOUS_EMAIL "Off" CACHE BOOL "Should Dart server send email when build errors are found in Continuous builds?" )
2001-11-27 23:20:18 +03:00
MARK_AS_ADVANCED (
C O M P R E S S I O N C O M M A N D
2003-12-17 17:42:52 +03:00
C O V E R A G E _ C O M M A N D
2001-11-27 23:20:18 +03:00
C V S C O M M A N D
2005-02-16 21:30:17 +03:00
S V N C O M M A N D
2002-01-22 22:15:15 +03:00
C V S _ U P D A T E _ O P T I O N S
2005-02-16 21:30:17 +03:00
S V N _ U P D A T E _ O P T I O N S
2003-12-17 17:42:52 +03:00
D A R T _ B U I L D _ E R R O R _ R E P O R T _ L I M I T
D A R T _ B U I L D _ W A R N I N G _ R E P O R T _ L I M I T
2002-01-22 22:15:15 +03:00
D A R T _ T E S T I N G _ T I M E O U T
2003-12-17 17:42:52 +03:00
D A R T _ V E R B O S E _ B U I L D
2002-01-15 23:29:31 +03:00
D E L I V E R _ C O N T I N U O U S _ E M A I L
2003-12-17 17:42:52 +03:00
G U N Z I P C O M M A N D
J A V A C O M M A N D
M A K E C O M M A N D
M E M O R Y C H E C K _ C O M M A N D
M E M O R Y C H E C K _ S U P P R E S S I O N S _ F I L E
P U R I F Y C O M M A N D
S C P C O M M A N D
S I T E
2003-05-02 21:57:25 +04:00
)
2003-02-27 22:48:33 +03:00
# BUILDNAME
2001-11-27 23:20:18 +03:00
2005-01-28 21:20:53 +03:00
SET ( HAVE_DART )
IF ( EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in" )
SET ( HAVE_DART 1 )
ENDIF ( EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in" )
2001-06-11 23:28:59 +04:00
#
# Section #2:
#
# Make necessary directories and configure testing scripts
#
2004-10-13 02:29:04 +04:00
# find a tcl shell command
2005-01-28 21:20:53 +03:00
IF ( HAVE_DART )
2004-10-13 02:29:04 +04:00
INCLUDE ( ${ CMAKE_ROOT } /Modules/FindTclsh.cmake )
2005-01-28 21:20:53 +03:00
ENDIF ( HAVE_DART )
2004-10-13 02:29:04 +04:00
2001-06-11 23:28:59 +04:00
2005-01-28 21:20:53 +03:00
IF ( HAVE_DART AND TCL_TCLSH )
2003-05-02 21:57:25 +04:00
# make directories in the binary tree
2003-07-11 22:14:03 +04:00
FILE ( MAKE_DIRECTORY ${ PROJECT_BINARY_DIR } /Testing/HTML/TestingResults/Dashboard
$ { P R O J E C T _ B I N A R Y _ D I R } / T e s t i n g / H T M L / T e s t i n g R e s u l t s / S i t e s / $ { S I T E } / $ { B U I L D N A M E } )
2001-06-11 23:28:59 +04:00
2003-05-02 21:57:25 +04:00
# configure files
CONFIGURE_FILE (
2003-12-16 01:26:00 +03:00
$ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a r t . c o n f . i n
2003-05-02 21:57:25 +04:00
$ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l )
2001-06-11 23:28:59 +04:00
2003-05-02 21:57:25 +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
2004-10-13 02:29:04 +04:00
SET ( DART_EXPERIMENTAL_NAME Experimental )
IF ( DART_EXPERIMENTAL_USE_PROJECT_NAME )
SET ( DART_EXPERIMENTAL_NAME "${DART_EXPERIMENTAL_NAME}${PROJECT_NAME}" )
ENDIF ( DART_EXPERIMENTAL_USE_PROJECT_NAME )
ADD_CUSTOM_TARGET ( ${ DART_EXPERIMENTAL_NAME }
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l S t a r t U p d a t e C o n f i g u r e B u i l d T e s t )
ADD_CUSTOM_TARGET ( ${ DART_EXPERIMENTAL_NAME } Submit
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l S u b m i t )
# for non IDE based builds nmake and make
# add all these extra targets
IF ( ${ CMAKE_MAKE_PROGRAM } MATCHES make )
# Make targets for Experimental builds
ADD_CUSTOM_TARGET ( ExperimentalStart
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l S t a r t )
ADD_CUSTOM_TARGET ( ExperimentalUpdate
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l S t a r t U p d a t e )
ADD_CUSTOM_TARGET ( ExperimentalConfigure
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l S t a r t C o n f i g u r e )
ADD_CUSTOM_TARGET ( ExperimentalBuild
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l S t a r t B u i l d )
ADD_CUSTOM_TARGET ( ExperimentalTest
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l T e s t )
ADD_CUSTOM_TARGET ( ExperimentalCoverage
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l C o v e r a g e )
ADD_CUSTOM_TARGET ( ExperimentalDashboardStart
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l D a s h b o a r d S t a r t )
ADD_CUSTOM_TARGET ( ExperimentalDashboardEnd
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l E x p e r i m e n t a l D a s h b o a r d E n d )
# Continuous
ADD_CUSTOM_TARGET ( Continuous
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l C o n t i n u o u s S t a r t U p d a t e C o n f i g u r e B u i l d T e s t S u b m i t )
ADD_CUSTOM_TARGET ( ContinuousStart
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l C o n t i n u o u s S t a r t )
ADD_CUSTOM_TARGET ( ContinuousUpdate
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l C o n t i n u o u s U p d a t e )
ADD_CUSTOM_TARGET ( ContinuousConfigure
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l C o n t i n u o u s C o n f i g u r e )
ADD_CUSTOM_TARGET ( ContinuousBuild
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l C o n t i n u o u s B u i l d )
ADD_CUSTOM_TARGET ( ContinuousTest
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l C o n t i n u o u s T e s t )
ADD_CUSTOM_TARGET ( ContinuousCoverage
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l C o n t i n u o u s C o v e r a g e )
ADD_CUSTOM_TARGET ( ContinuousSubmit
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l C o n t i n u o u s S u b m i t )
# Nightly
ADD_CUSTOM_TARGET ( Nightly
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y S t a r t U p d a t e C o n f i g u r e B u i l d T e s t S u b m i t )
ADD_CUSTOM_TARGET ( NightlyStart
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y S t a r t )
ADD_CUSTOM_TARGET ( NightlyUpdate
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y U p d a t e )
ADD_CUSTOM_TARGET ( NightlyConfigure
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y C o n f i g u r e )
ADD_CUSTOM_TARGET ( NightlyBuild
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y B u i l d )
ADD_CUSTOM_TARGET ( NightlyTest
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y T e s t )
ADD_CUSTOM_TARGET ( NightlyCoverage
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y C o v e r a g e )
ADD_CUSTOM_TARGET ( NightlySubmit
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y S u b m i t )
ADD_CUSTOM_TARGET ( NightlyDashboardStart
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y D a s h b o a r d S t a r t )
ADD_CUSTOM_TARGET ( NightlyDashboardEnd
$ { T C L _ T C L S H } $ { D A R T _ R O O T } / S o u r c e / C l i e n t / D a s h b o a r d M a n a g e r . t c l $ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l N i g h t l y D a s h b o a r d E n d )
ENDIF ( ${ CMAKE_MAKE_PROGRAM } MATCHES make )
2005-01-28 21:20:53 +03:00
ELSE ( HAVE_DART AND TCL_TCLSH )
2003-05-02 21:57:25 +04:00
# make directories in the binary tree
2003-07-11 22:14:03 +04:00
FILE ( MAKE_DIRECTORY ${ PROJECT_BINARY_DIR } /Testing/Temporary )
2003-05-02 21:57:25 +04:00
GET_FILENAME_COMPONENT ( CMAKE_HOST_PATH ${ CMAKE_COMMAND } PATH )
SET ( CMAKE_TARGET_PATH ${ EXECUTABLE_OUTPUT_PATH } )
FIND_PROGRAM ( CMAKE_CTEST_COMMAND ctest ${ CMAKE_HOST_PATH } ${ CMAKE_TARGET_PATH } )
MARK_AS_ADVANCED ( CMAKE_CTEST_COMMAND )
# Use CTest
# configure files
2005-04-04 20:22:08 +04:00
IF ( CTEST_NEW_FORMAT )
CONFIGURE_FILE (
$ { C M A K E _ R O O T } / M o d u l e s / D a r t C o n f i g u r a t i o n . t c l . i n
$ { P R O J E C T _ B I N A R Y _ D I R } / C T e s t C o n f i g u r a t i o n . i n i )
ELSE ( CTEST_NEW_FORMAT )
CONFIGURE_FILE (
$ { C M A K E _ R O O T } / M o d u l e s / D a r t C o n f i g u r a t i o n . t c l . i n
$ { P R O J E C T _ B I N A R Y _ D I R } / D a r t C o n f i g u r a t i o n . t c l )
ENDIF ( CTEST_NEW_FORMAT )
2003-05-02 21:57:25 +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
2004-01-02 18:23:20 +03:00
IF ( ${ CMAKE_MAKE_PROGRAM } MATCHES make )
FOREACH ( mode Experimental Nightly Continuous NightlyMemoryCheck )
ADD_CUSTOM_TARGET ( ${ mode } ${ CMAKE_CTEST_COMMAND } -D ${ mode } )
ENDFOREACH ( mode )
ELSE ( ${ CMAKE_MAKE_PROGRAM } MATCHES make )
# for IDE only add them once for nested projects
IF ( NOT DART_COMMON_TARGETS_ADDED )
FOREACH ( mode Experimental Nightly Continuous NightlyMemoryCheck )
ADD_CUSTOM_TARGET ( ${ mode } ${ CMAKE_CTEST_COMMAND } -D ${ mode } )
ENDFOREACH ( mode )
2004-10-13 02:29:04 +04:00
SET ( DART_COMMON_TARGETS_ADDED 1 )
2004-01-02 18:23:20 +03:00
ENDIF ( NOT DART_COMMON_TARGETS_ADDED )
ENDIF ( ${ CMAKE_MAKE_PROGRAM } MATCHES make )
2004-10-13 02:29:04 +04:00
2003-07-11 22:14:03 +04:00
2003-05-02 21:57:25 +04:00
# for non IDE based builds nmake and make
# add all these extra targets
IF ( ${ CMAKE_MAKE_PROGRAM } MATCHES make )
# Make targets for Experimental builds
FOREACH ( mode Nightly Experimental Continuous )
2004-07-30 01:07:16 +04:00
FOREACH ( testtype Start Update Configure Build Test Coverage MemCheck Submit )
2003-08-11 20:17:34 +04:00
# missing purify
2003-05-02 21:57:25 +04:00
ADD_CUSTOM_TARGET ( ${ mode } ${ testtype }
$ { C M A K E _ C T E S T _ C O M M A N D } - D $ { m o d e } $ { t e s t t y p e } )
ENDFOREACH ( testtype )
ENDFOREACH ( mode )
ENDIF ( ${ CMAKE_MAKE_PROGRAM } MATCHES make )
2005-01-28 21:20:53 +03:00
ENDIF ( HAVE_DART AND TCL_TCLSH )
2001-06-11 23:28:59 +04:00
ENDIF ( BUILD_TESTING )
#
# End of Dart.cmake
#
2003-05-02 21:57:25 +04:00