2016-09-27 22:01:08 +03:00
|
|
|
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
# file Copyright.txt or https://cmake.org/licensing for details.
|
|
|
|
|
2013-10-15 19:17:36 +04:00
|
|
|
#.rst:
|
|
|
|
# Dart
|
|
|
|
# ----
|
|
|
|
#
|
|
|
|
# Configure a project for testing with CTest or old Dart Tcl Client
|
|
|
|
#
|
2007-05-15 18:23:40 +04:00
|
|
|
# This file is the backwards-compatibility version of the CTest module.
|
|
|
|
# It supports using the old Dart 1 Tcl client for driving dashboard
|
2013-10-15 19:17:36 +04:00
|
|
|
# submissions as well as testing with CTest. This module should be
|
|
|
|
# included in the CMakeLists.txt file at the top of a project. Typical
|
|
|
|
# usage:
|
|
|
|
#
|
|
|
|
# ::
|
|
|
|
#
|
|
|
|
# include(Dart)
|
|
|
|
# if(BUILD_TESTING)
|
|
|
|
# # ... testing related CMake code ...
|
|
|
|
# endif()
|
|
|
|
#
|
2007-05-15 18:23:40 +04:00
|
|
|
# The BUILD_TESTING option is created by the Dart module to determine
|
|
|
|
# whether testing support should be enabled. The default is ON.
|
|
|
|
|
2001-06-11 23:28:59 +04:00
|
|
|
# This file configures a project to use the Dart testing/dashboard process.
|
|
|
|
# It is broken into 3 sections.
|
2007-05-15 18:23:40 +04:00
|
|
|
#
|
2005-12-14 21:51:08 +03:00
|
|
|
# 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.
|
2001-06-11 23:28:59 +04:00
|
|
|
#
|
|
|
|
#
|
2009-09-28 19:46:51 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
option(BUILD_TESTING "Build the testing tree." ON)
|
2001-06-11 23:28:59 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if(BUILD_TESTING)
|
|
|
|
find_package(Dart QUIET)
|
2001-06-18 21:16:47 +04:00
|
|
|
|
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.
|
|
|
|
#
|
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set(RUN_FROM_DART 1)
|
|
|
|
include(CTest)
|
|
|
|
set(RUN_FROM_DART)
|
2003-02-21 01:38:16 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
find_program(COMPRESSIONCOMMAND NAMES gzip compress zip
|
2005-08-03 21:19:22 +04:00
|
|
|
DOC "Path to program used to compress files for transfer to the dart server")
|
2012-08-13 21:47:32 +04: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.")
|
|
|
|
option(DART_VERBOSE_BUILD "Show the actual output of the build, or if off show a . for each 1024 bytes."
|
2003-05-02 21:57:25 +04:00
|
|
|
OFF)
|
2012-08-13 21:47:32 +04: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 )
|
2003-03-03 17:32:45 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
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})
|
|
|
|
set (DELIVER_CONTINUOUS_EMAIL "Off" CACHE BOOL "Should Dart server send email when build errors are found in Continuous builds?")
|
2002-01-15 23:29:31 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
mark_as_advanced(
|
2001-11-27 23:20:18 +03:00
|
|
|
COMPRESSIONCOMMAND
|
2012-08-13 21:42:58 +04:00
|
|
|
DART_BUILD_ERROR_REPORT_LIMIT
|
|
|
|
DART_BUILD_WARNING_REPORT_LIMIT
|
2002-01-22 22:15:15 +03:00
|
|
|
DART_TESTING_TIMEOUT
|
2003-12-17 17:42:52 +03:00
|
|
|
DART_VERBOSE_BUILD
|
2002-01-15 23:29:31 +03:00
|
|
|
DELIVER_CONTINUOUS_EMAIL
|
2003-12-17 17:42:52 +03:00
|
|
|
GUNZIPCOMMAND
|
2012-08-13 21:42:58 +04:00
|
|
|
JAVACOMMAND
|
2003-05-02 21:57:25 +04:00
|
|
|
)
|
2001-11-27 23:20:18 +03:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
set(HAVE_DART)
|
|
|
|
if(EXISTS "${DART_ROOT}/Source/Client/Dart.conf.in")
|
|
|
|
set(HAVE_DART 1)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2005-01-28 21:20:53 +03:00
|
|
|
|
2001-06-11 23:28:59 +04:00
|
|
|
#
|
|
|
|
# Section #2:
|
2012-08-13 21:42:58 +04:00
|
|
|
#
|
2001-06-11 23:28:59 +04:00
|
|
|
# Make necessary directories and configure testing scripts
|
|
|
|
#
|
2004-10-13 02:29:04 +04:00
|
|
|
# find a tcl shell command
|
2012-08-13 21:47:32 +04:00
|
|
|
if(HAVE_DART)
|
|
|
|
find_package(Tclsh)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2004-10-13 02:29:04 +04:00
|
|
|
|
2001-06-11 23:28:59 +04:00
|
|
|
|
2012-08-13 21:47:32 +04:00
|
|
|
if (HAVE_DART)
|
2003-05-02 21:57:25 +04:00
|
|
|
# make directories in the binary tree
|
2012-08-13 21:47:32 +04:00
|
|
|
file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Dashboard"
|
2005-08-03 21:19:22 +04:00
|
|
|
"${PROJECT_BINARY_DIR}/Testing/HTML/TestingResults/Sites/${SITE}/${BUILDNAME}")
|
2001-06-11 23:28:59 +04:00
|
|
|
|
2003-05-02 21:57:25 +04:00
|
|
|
# configure files
|
2012-08-13 21:47:32 +04:00
|
|
|
configure_file(
|
2005-08-03 21:19:22 +04:00
|
|
|
"${DART_ROOT}/Source/Client/Dart.conf.in"
|
|
|
|
"${PROJECT_BINARY_DIR}/DartConfiguration.tcl" )
|
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
|
2012-08-13 21:47:32 +04:00
|
|
|
set(DART_EXPERIMENTAL_NAME Experimental)
|
|
|
|
if(DART_EXPERIMENTAL_USE_PROJECT_NAME)
|
2016-07-28 01:41:13 +03:00
|
|
|
string(APPEND DART_EXPERIMENTAL_NAME "${PROJECT_NAME}")
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
|
|
|
endif ()
|
2012-08-13 21:47:32 +04:00
|
|
|
|
|
|
|
set(RUN_FROM_CTEST_OR_DART 1)
|
|
|
|
include(CTestTargets)
|
|
|
|
set(RUN_FROM_CTEST_OR_DART)
|
2012-08-13 21:50:14 +04:00
|
|
|
endif()
|
2001-06-11 23:28:59 +04:00
|
|
|
|
|
|
|
#
|
|
|
|
# End of Dart.cmake
|
|
|
|
#
|
2003-05-02 21:57:25 +04:00
|
|
|
|