Commit 705e31a3 authored by Seth R Johnson's avatar Seth R Johnson
Browse files

CTest: only look for update executables when needed

parent 8b8f0197
...@@ -121,15 +121,6 @@ if(BUILD_TESTING) ...@@ -121,15 +121,6 @@ if(BUILD_TESTING)
string(APPEND SUBMIT_URL "${DROP_SITE}${DROP_LOCATION}") string(APPEND SUBMIT_URL "${DROP_SITE}${DROP_LOCATION}")
endif() endif()
find_program(CVSCOMMAND cvs )
set(CVS_UPDATE_OPTIONS "-d -A -P" CACHE STRING
"Options passed to the cvs update command.")
find_program(SVNCOMMAND svn)
find_program(BZRCOMMAND bzr)
find_program(HGCOMMAND hg)
find_program(GITCOMMAND git)
find_program(P4COMMAND p4)
if(NOT UPDATE_TYPE) if(NOT UPDATE_TYPE)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS") if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS")
set(UPDATE_TYPE cvs) set(UPDATE_TYPE cvs)
...@@ -146,21 +137,29 @@ if(BUILD_TESTING) ...@@ -146,21 +137,29 @@ if(BUILD_TESTING)
string(TOLOWER "${UPDATE_TYPE}" _update_type) string(TOLOWER "${UPDATE_TYPE}" _update_type)
if("${_update_type}" STREQUAL "cvs") if("${_update_type}" STREQUAL "cvs")
find_program(CVSCOMMAND cvs )
set(CVS_UPDATE_OPTIONS "-d -A -P" CACHE STRING
"Options passed to the cvs update command.")
set(UPDATE_COMMAND "${CVSCOMMAND}") set(UPDATE_COMMAND "${CVSCOMMAND}")
set(UPDATE_OPTIONS "${CVS_UPDATE_OPTIONS}") set(UPDATE_OPTIONS "${CVS_UPDATE_OPTIONS}")
elseif("${_update_type}" STREQUAL "svn") elseif("${_update_type}" STREQUAL "svn")
find_program(SVNCOMMAND svn)
set(UPDATE_COMMAND "${SVNCOMMAND}") set(UPDATE_COMMAND "${SVNCOMMAND}")
set(UPDATE_OPTIONS "${SVN_UPDATE_OPTIONS}") set(UPDATE_OPTIONS "${SVN_UPDATE_OPTIONS}")
elseif("${_update_type}" STREQUAL "bzr") elseif("${_update_type}" STREQUAL "bzr")
find_program(BZRCOMMAND bzr)
set(UPDATE_COMMAND "${BZRCOMMAND}") set(UPDATE_COMMAND "${BZRCOMMAND}")
set(UPDATE_OPTIONS "${BZR_UPDATE_OPTIONS}") set(UPDATE_OPTIONS "${BZR_UPDATE_OPTIONS}")
elseif("${_update_type}" STREQUAL "hg") elseif("${_update_type}" STREQUAL "hg")
find_program(HGCOMMAND hg)
set(UPDATE_COMMAND "${HGCOMMAND}") set(UPDATE_COMMAND "${HGCOMMAND}")
set(UPDATE_OPTIONS "${HG_UPDATE_OPTIONS}") set(UPDATE_OPTIONS "${HG_UPDATE_OPTIONS}")
elseif("${_update_type}" STREQUAL "git") elseif("${_update_type}" STREQUAL "git")
find_program(GITCOMMAND git)
set(UPDATE_COMMAND "${GITCOMMAND}") set(UPDATE_COMMAND "${GITCOMMAND}")
set(UPDATE_OPTIONS "${GIT_UPDATE_OPTIONS}") set(UPDATE_OPTIONS "${GIT_UPDATE_OPTIONS}")
elseif("${_update_type}" STREQUAL "p4") elseif("${_update_type}" STREQUAL "p4")
find_program(P4COMMAND p4)
set(UPDATE_COMMAND "${P4COMMAND}") set(UPDATE_COMMAND "${P4COMMAND}")
set(UPDATE_OPTIONS "${P4_UPDATE_OPTIONS}") set(UPDATE_OPTIONS "${P4_UPDATE_OPTIONS}")
endif() endif()
......
Supports Markdown
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