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 } )
2002-02-28 23:58:23 +03:00
OPTION ( VERBOSE_BUILD "Show the actual output of the build, or if off show a . for each 1024 bytes." "OFF" )
2002-10-11 19:22:16 +04:00
OPTION ( BUILD_ERROR_REPORT_LIMIT "Limit of reported errors, -1 reports all." -1 )
OPTION ( BUILD_WARNING_REPORT_LIMIT "Limit of reported warnings, -1 reports all." -1 )
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." )
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
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 " )
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." )
2002-04-05 19:51:14 +04:00
FIND_PROGRAM ( PURIFYCOMMAND purify
" [ 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 . "
)
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)" )
2001-06-11 23:28:59 +04:00
# find a tcl shell command
2001-12-06 19:52:52 +03:00
INCLUDE ( ${ CMAKE_ROOT } /Modules/FindTclsh.cmake )
2001-12-04 18:54:16 +03:00
2001-06-11 23:28:59 +04:00
# set the site name
SITE_NAME ( SITE )
# set the build name
BUILD_NAME ( BUILDNAME )
# 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 (
2002-02-28 23:58:23 +03:00
V E R B O S E _ B U I L D
2002-10-11 19:22:16 +04:00
B U I L D _ W A R N I N G _ R E P O R T _ L I M I T
B U I L D _ E R R O R _ R E P O R T _ L I M I T
2001-11-27 23:20:18 +03:00
S I T E
B U I L D N A M E
M A K E C O M M A N D
J A V A C O M M A N D
P U R I F Y C O M M A N D
G U N Z I P C O M M A N D
C O M P R E S S I O N C O M M A N D
C V S 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
D A R T _ T E S T I N G _ T I M E O U T
S C P C O M M A N 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
2001-11-27 23:20:18 +03:00
)
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
$ { D A R T _ R O O T } / S o u r c e / C l i e n t / U t i l i t y . c o n f . 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 )
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
2002-09-03 17:14:24 +04:00
$ { 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 B u i l d T e s t )
2001-07-10 19:56:26 +04:00
ADD_CUSTOM_TARGET ( ExperimentalSubmit
2001-09-10 23:11:43 +04:00
$ { 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 )
2001-09-13 22:45:32 +04:00
2002-06-15 00:38:19 +04:00
# for non IDE based builds nmake and make
# add all these extra targets
2002-12-05 21:44:11 +03:00
IF ( ${ CMAKE_MAKE_PROGRAM } MATCHES make )
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
$ { 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 )
2001-11-02 23:26:15 +03:00
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 )
2001-11-25 02:47:48 +03:00
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 )
2001-11-02 23:26:15 +03:00
2001-11-15 22:54:26 +03:00
# Continuous
ADD_CUSTOM_TARGET ( Continuous
2002-09-03 17:14:24 +04:00
$ { 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 )
2001-11-15 22:54:26 +03:00
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 )
2002-09-03 17:14:24 +04:00
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 )
2001-11-15 22:54:26 +03:00
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 )
2001-11-02 23:26:15 +03:00
# Nightly
2001-09-13 22:45:32 +04:00
ADD_CUSTOM_TARGET ( Nightly
2002-09-03 17:14:24 +04:00
$ { 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 )
2001-11-15 22:54:26 +03:00
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 )
2002-09-03 17:14:24 +04:00
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 )
2001-09-13 22:45:32 +04:00
ADD_CUSTOM_TARGET ( NightlyBuild
2001-11-15 22:54:26 +03:00
$ { 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 )
2001-09-13 22:45:32 +04:00
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 )
2001-09-17 20:07:24 +04:00
ADD_CUSTOM_TARGET ( NightlyCoverage
2001-09-27 00:23:56 +04:00
$ { 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 )
2001-09-13 22:45:32 +04:00
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 )
2002-12-05 21:44:11 +03:00
ENDIF ( ${ CMAKE_MAKE_PROGRAM } MATCHES make )
2001-09-13 22:45:32 +04:00
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
#