Detect Git repositories for CTest UPDATE_TYPE

The CTest module configures the command-line CTest dashboard mode.
We teach it to recognize .git directories.
This commit is contained in:
Brad King 2010-02-10 10:43:28 -05:00
parent ff101a565e
commit e18f3623e3
1 changed files with 7 additions and 0 deletions

View File

@ -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