diff options
author | David Cole <david.cole@kitware.com> | 2009-12-04 17:09:01 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2009-12-04 17:09:01 (GMT) |
commit | 0b38bb4c535ae972d7f973e3e69945a6d0c14d75 (patch) | |
tree | ac80395b194b2a8ed2bcf6b1f997b62c21d151be /Modules/CTest.cmake | |
parent | af14f1f2c3750ba3cf9b9cc1a809a88b1878a5c3 (diff) | |
download | CMake-0b38bb4c535ae972d7f973e3e69945a6d0c14d75.zip CMake-0b38bb4c535ae972d7f973e3e69945a6d0c14d75.tar.gz CMake-0b38bb4c535ae972d7f973e3e69945a6d0c14d75.tar.bz2 |
Fix issue #2336 - honor the -C arg to ctest. Honor it for all stages of running -D dashboards from the command line and running ctest_configure, ctest_build and ctest_test commands in -S scripts. Also, allow a script to change it by setting the CTEST_CONFIGURATION_TYPE variable: allows for multiple configuration build/test cycles within one script. Add a new signature for the cmake command build_command that accepts CONFIGURATION as one argument. The original build_command signature is still there, but now marked as deprecated in the documentation. Of course... also add CTestConfig tests to verify that -C is honored for -D dashboards and -S scripts.
Diffstat (limited to 'Modules/CTest.cmake')
-rw-r--r-- | Modules/CTest.cmake | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake index aaa6040..fb430a7 100644 --- a/Modules/CTest.cmake +++ b/Modules/CTest.cmake @@ -84,10 +84,6 @@ IF(BUILD_TESTING) ENDIF(EXISTS "${PROJECT_SOURCE_DIR}/DartConfig.cmake") SET_IF_NOT_SET (NIGHTLY_START_TIME "00:00:00 EDT") - # make program just needs to use CMAKE_MAKE_PROGRAM which is required - # to be defined by cmake - SET(MAKEPROGRAM ${CMAKE_MAKE_PROGRAM}) - FIND_PROGRAM(CVSCOMMAND cvs ) SET(CVS_UPDATE_OPTIONS "-d -A -P" CACHE STRING "Options passed to the cvs update command.") @@ -202,8 +198,17 @@ IF(BUILD_TESTING) ENDIF(DART_CXX_NAME MATCHES "devenv") SET(BUILDNAME "${BUILD_NAME_SYSTEM_NAME}-${DART_CXX_NAME}") ENDIF(NOT BUILDNAME) - # set the build command - BUILD_COMMAND(MAKECOMMAND ${MAKEPROGRAM} ) + + # the build command + BUILD_COMMAND(MAKECOMMAND CONFIGURATION "\${CTEST_CONFIGURATION_TYPE}") + SET(MAKECOMMAND ${MAKECOMMAND} CACHE STRING "Command to build the project") + + # the default build configuration the ctest build handler will use + # if there is no -C arg given to ctest: + SET(DEFAULT_CTEST_CONFIGURATION_TYPE "$ENV{CMAKE_CONFIG_TYPE}") + IF(DEFAULT_CTEST_CONFIGURATION_TYPE STREQUAL "") + SET(DEFAULT_CTEST_CONFIGURATION_TYPE "Release") + ENDIF(DEFAULT_CTEST_CONFIGURATION_TYPE STREQUAL "") IF(NOT "${CMAKE_GENERATOR}" MATCHES "Make") SET(CTEST_USE_LAUNCHERS 0) |