Commit e18f3623 authored by Brad King's avatar Brad King
Browse files

Detect Git repositories for CTest UPDATE_TYPE

The CTest module configures the command-line CTest dashboard mode.
We teach it to recognize .git directories.
parent ff101a56
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment