1 # - Configure a project for testing with CTest or old Dart Tcl Client
2 # This file is the backwards-compatibility version of the CTest module.
3 # It supports using the old Dart 1 Tcl client for driving dashboard
4 # submissions as well as testing with CTest. This module should be included
5 # in the CMakeLists.txt file at the top of a project. Typical usage:
8 # # ... testing related CMake code ...
10 # The BUILD_TESTING option is created by the Dart module to determine
11 # whether testing support should be enabled. The default is ON.
13 # This file configures a project to use the Dart testing/dashboard process.
14 # It is broken into 3 sections.
16 # Section #1: Locate programs on the client and determine site and build name
17 # Section #2: Configure or copy Tcl scripts from the source tree to build tree
18 # Section #3: Custom targets for performing dashboard builds.
21 OPTION(BUILD_TESTING "Build the testing tree." ON)
24 FIND_PACKAGE(Dart QUIET)
29 # CMake commands that will not vary from project to project. Locates programs
30 # on the client and configure site name and build name.
37 FIND_PROGRAM(COMPRESSIONCOMMAND NAMES gzip compress zip
38 DOC "Path to program used to compress files for transfer to the dart server")
39 FIND_PROGRAM(GUNZIPCOMMAND gunzip DOC "Path to gunzip executable")
40 FIND_PROGRAM(JAVACOMMAND java DOC "Path to java command, used by the Dart server to create html.")
41 OPTION(DART_VERBOSE_BUILD "Show the actual output of the build, or if off show a . for each 1024 bytes."
43 OPTION(DART_BUILD_ERROR_REPORT_LIMIT "Limit of reported errors, -1 reports all." -1 )
44 OPTION(DART_BUILD_WARNING_REPORT_LIMIT "Limit of reported warnings, -1 reports all." -1 )
46 SET(VERBOSE_BUILD ${DART_VERBOSE_BUILD})
47 SET(BUILD_ERROR_REPORT_LIMIT ${DART_BUILD_ERROR_REPORT_LIMIT})
48 SET(BUILD_WARNING_REPORT_LIMIT ${DART_BUILD_WARNING_REPORT_LIMIT})
49 SET (DELIVER_CONTINUOUS_EMAIL "Off" CACHE BOOL "Should Dart server send email when build errors are found in Continuous builds?")
53 DART_BUILD_ERROR_REPORT_LIMIT
54 DART_BUILD_WARNING_REPORT_LIMIT
57 DELIVER_CONTINUOUS_EMAIL
63 IF(EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in")
65 ENDIF(EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in")
70 # Make necessary directories and configure testing scripts
72 # find a tcl shell command
79 # make directories in the binary tree
80 FILE(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Dashboard"
81 "${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Sites/${SITE}/${BUILDNAME}")
85 "${DART_ROOT}/Source/Client/Dart.conf.in"
86 "${PROJECT_BINARY_DIR}/DartConfiguration.tcl" )
91 # Custom targets to perform dashboard builds and submissions.
92 # These should NOT need to be modified from project to project.
96 SET(DART_EXPERIMENTAL_NAME Experimental)
97 IF(DART_EXPERIMENTAL_USE_PROJECT_NAME)
98 SET(DART_EXPERIMENTAL_NAME "${DART_EXPERIMENTAL_NAME}${PROJECT_NAME}")
99 ENDIF(DART_EXPERIMENTAL_USE_PROJECT_NAME)
102 SET(RUN_FROM_CTEST_OR_DART 1)
103 INCLUDE(CTestTargets)
104 SET(RUN_FROM_CTEST_OR_DART)