diff options
author | Brad King <brad.king@kitware.com> | 2009-07-10 15:08:05 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-07-10 15:08:05 (GMT) |
commit | d4d467dbd5c4a1590333eeeb3082ad46dc9698df (patch) | |
tree | 9ade1437126f78d4d1a5d292848df45ce33cadda /Modules/CTest.cmake | |
parent | c0e8c0f5aa004fb7f8c1804a5e29bd22862c9360 (diff) | |
download | CMake-d4d467dbd5c4a1590333eeeb3082ad46dc9698df.zip CMake-d4d467dbd5c4a1590333eeeb3082ad46dc9698df.tar.gz CMake-d4d467dbd5c4a1590333eeeb3082ad46dc9698df.tar.bz2 |
ENH: Teach CTest to handle Mercurial repositories
This creates cmCTestHG to drive CTest Update handling on hg-based work
trees. Currently we always update to the head of the remote tracking
branch (hg pull), so the nightly start time is ignored for Nightly
builds. A later change will address this.
See issue #7879. Patch from Emmanuel Christophe. I modified the patch
slightly for code style, to finish up some parsing details, and to fix
the test.
Diffstat (limited to 'Modules/CTest.cmake')
-rw-r--r-- | Modules/CTest.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake index 19f872a..b3871db 100644 --- a/Modules/CTest.cmake +++ b/Modules/CTest.cmake @@ -80,6 +80,7 @@ IF(BUILD_TESTING) "Options passed to the cvs update command.") FIND_PROGRAM(SVNCOMMAND svn) FIND_PROGRAM(BZRCOMMAND bzr) + FIND_PROGRAM(HGCOMMAND hg) IF(NOT UPDATE_TYPE) IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS") @@ -90,6 +91,10 @@ IF(BUILD_TESTING) ELSE(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn") IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.bzr") SET(UPDATE_TYPE bzr) + ELSE(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.bzr") + IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.hg") + SET(UPDATE_TYPE hg) + ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.hg") ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.bzr") ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn") ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS") @@ -114,6 +119,11 @@ IF(BUILD_TESTING) IF("${_update_type}" STREQUAL "bzr") SET(UPDATE_COMMAND "${BZRCOMMAND}") SET(UPDATE_OPTIONS "${BZR_UPDATE_OPTIONS}") + ELSE("${_update_type}" STREQUAL "bzr") + IF("${_update_type}" STREQUAL "hg") + SET(UPDATE_COMMAND "${HGCOMMAND}") + SET(UPDATE_OPTIONS "${HG_UPDATE_OPTIONS}") + ENDIF("${_update_type}" STREQUAL "hg") ENDIF("${_update_type}" STREQUAL "bzr") ENDIF("${_update_type}" STREQUAL "svn") ENDIF("${_update_type}" STREQUAL "cvs") @@ -193,6 +203,7 @@ IF(BUILD_TESTING) CVSCOMMAND SVNCOMMAND BZRCOMMAND + HGCOMMAND CVS_UPDATE_OPTIONS SVN_UPDATE_OPTIONS BZR_UPDATE_OPTIONS |