diff options
author | Brad King <brad.king@kitware.com> | 2010-02-10 15:43:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-02-10 15:43:28 (GMT) |
commit | e18f3623e3fc48a792c3ccf5074f6991915ae69b (patch) | |
tree | 997fb365f26a19c9509f400d959b5fd45f469133 | |
parent | ff101a565ec3d353970ca9c02ef2c1b2a8dd77af (diff) | |
download | CMake-e18f3623e3fc48a792c3ccf5074f6991915ae69b.zip CMake-e18f3623e3fc48a792c3ccf5074f6991915ae69b.tar.gz CMake-e18f3623e3fc48a792c3ccf5074f6991915ae69b.tar.bz2 |
Detect Git repositories for CTest UPDATE_TYPE
The CTest module configures the command-line CTest dashboard mode.
We teach it to recognize .git directories.
-rw-r--r-- | Modules/CTest.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/CTest.cmake b/Modules/CTest.cmake index 66c64fb..84a7881 100644 --- a/Modules/CTest.cmake +++ b/Modules/CTest.cmake @@ -126,6 +126,7 @@ IF(BUILD_TESTING) FIND_PROGRAM(SVNCOMMAND svn) FIND_PROGRAM(BZRCOMMAND bzr) FIND_PROGRAM(HGCOMMAND hg) + FIND_PROGRAM(GITCOMMAND git) IF(NOT UPDATE_TYPE) IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS") @@ -136,6 +137,8 @@ IF(BUILD_TESTING) SET(UPDATE_TYPE bzr) ELSEIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.hg") SET(UPDATE_TYPE hg) + ELSEIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") + SET(UPDATE_TYPE git) ENDIF() ENDIF(NOT UPDATE_TYPE) @@ -159,6 +162,9 @@ IF(BUILD_TESTING) ELSEIF("${_update_type}" STREQUAL "hg") SET(UPDATE_COMMAND "${HGCOMMAND}") SET(UPDATE_OPTIONS "${HG_UPDATE_OPTIONS}") + ELSEIF("${_update_type}" STREQUAL "git") + SET(UPDATE_COMMAND "${GITCOMMAND}") + SET(UPDATE_OPTIONS "${GIT_UPDATE_OPTIONS}") ENDIF() SET(DART_TESTING_TIMEOUT 1500 CACHE STRING @@ -252,6 +258,7 @@ IF(BUILD_TESTING) SVNCOMMAND BZRCOMMAND HGCOMMAND + GITCOMMAND CVS_UPDATE_OPTIONS SVN_UPDATE_OPTIONS BZR_UPDATE_OPTIONS |