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.
22 #=============================================================================
23 # Copyright 2001-2009 Kitware, Inc.
25 # Distributed under the OSI-approved BSD License (the "License");
26 # see accompanying file Copyright.txt for details.
28 # This software is distributed WITHOUT ANY WARRANTY; without even the
29 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30 # See the License for more information.
31 #=============================================================================
32 # (To distribute this file outside of CMake, substitute the full
33 # License text for the above reference.)
35 option(BUILD_TESTING "Build the testing tree." ON)
38 find_package(Dart QUIET)
43 # CMake commands that will not vary from project to project. Locates programs
44 # on the client and configure site name and build name.
51 find_program(COMPRESSIONCOMMAND NAMES gzip compress zip
52 DOC "Path to program used to compress files for transfer to the dart server")
53 find_program(GUNZIPCOMMAND gunzip DOC "Path to gunzip executable")
54 find_program(JAVACOMMAND java DOC "Path to java command, used by the Dart server to create html.")
55 option(DART_VERBOSE_BUILD "Show the actual output of the build, or if off show a . for each 1024 bytes."
57 option(DART_BUILD_ERROR_REPORT_LIMIT "Limit of reported errors, -1 reports all." -1 )
58 option(DART_BUILD_WARNING_REPORT_LIMIT "Limit of reported warnings, -1 reports all." -1 )
60 set(VERBOSE_BUILD ${DART_VERBOSE_BUILD})
61 set(BUILD_ERROR_REPORT_LIMIT ${DART_BUILD_ERROR_REPORT_LIMIT})
62 set(BUILD_WARNING_REPORT_LIMIT ${DART_BUILD_WARNING_REPORT_LIMIT})
63 set (DELIVER_CONTINUOUS_EMAIL "Off" CACHE BOOL "Should Dart server send email when build errors are found in Continuous builds?")
67 DART_BUILD_ERROR_REPORT_LIMIT
68 DART_BUILD_WARNING_REPORT_LIMIT
71 DELIVER_CONTINUOUS_EMAIL
77 if(EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in")
84 # Make necessary directories and configure testing scripts
86 # find a tcl shell command
93 # make directories in the binary tree
94 file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Dashboard"
95 "${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Sites/${SITE}/${BUILDNAME}")
99 "${DART_ROOT}/Source/Client/Dart.conf.in"
100 "${PROJECT_BINARY_DIR}/DartConfiguration.tcl" )
105 # Custom targets to perform dashboard builds and submissions.
106 # These should NOT need to be modified from project to project.
109 # add testing targets
110 set(DART_EXPERIMENTAL_NAME Experimental)
111 if(DART_EXPERIMENTAL_USE_PROJECT_NAME)
112 set(DART_EXPERIMENTAL_NAME "${DART_EXPERIMENTAL_NAME}${PROJECT_NAME}")
116 set(RUN_FROM_CTEST_OR_DART 1)
117 include(CTestTargets)
118 set(RUN_FROM_CTEST_OR_DART)