summaryrefslogtreecommitdiffstats
path: root/Modules/Dart.cmake
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-02-16 18:30:17 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-02-16 18:30:17 (GMT)
commit1ca05e219a3a1962cfcc365d45363fce1e366c70 (patch)
treed1276418af31984957201b743cc2096781bd9a18 /Modules/Dart.cmake
parentc8965ce8c3c579e0fa07e9959f6da5ef26243182 (diff)
downloadCMake-1ca05e219a3a1962cfcc365d45363fce1e366c70.zip
CMake-1ca05e219a3a1962cfcc365d45363fce1e366c70.tar.gz
CMake-1ca05e219a3a1962cfcc365d45363fce1e366c70.tar.bz2
ENH: Reorganize and add subversion support
Diffstat (limited to 'Modules/Dart.cmake')
-rw-r--r--Modules/Dart.cmake32
1 files changed, 32 insertions, 0 deletions
diff --git a/Modules/Dart.cmake b/Modules/Dart.cmake
index bf54a41..63b4d63 100644
--- a/Modules/Dart.cmake
+++ b/Modules/Dart.cmake
@@ -74,6 +74,36 @@ IF(BUILD_TESTING)
FIND_PROGRAM(CVSCOMMAND cvs )
SET(CVS_UPDATE_OPTIONS "-d -A -P" CACHE STRING "Options passed to the cvs update command.")
+ FIND_PROGRAM(SVNCOMMAND svn)
+ #SET(SVN_UPDATE_OPTIONS "-d -A -P" CACHE STRING "Options passed to the cvs update command.")
+
+ IF(NOT UPDATE_TYPE)
+ IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS")
+ SET(UPDATE_TYPE cvs)
+ ELSE(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS")
+ IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn")
+ SET(UPDATE_TYPE svn)
+ ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn")
+ ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS")
+ ENDIF(NOT UPDATE_TYPE)
+
+ IF(NOT UPDATE_TYPE)
+ MESSAGE(SEND_ERROR "Cannot determine repository type. Please set UPDATE_TYPE to 'cvs' or 'svn'")
+ ENDIF(NOT UPDATE_TYPE)
+
+ IF(UPDATE_TYPE MATCHES "[Cc][Vv][Ss]")
+ MESSAGE("This is a CVS repository")
+ SET(UPDATE_COMMAND "${CVSCOMMAND}")
+ SET(UPDATE_OPTIONS "${CVS_UPDATE_OPTIONS}")
+ ELSE(UPDATE_TYPE MATCHES "[Cc][Vv][Ss]")
+ IF(UPDATE_TYPE MATCHES "[Ss][Vv][Nn]")
+ MESSAGE("This is a SVN repository")
+ SET(UPDATE_COMMAND "${SVNCOMMAND}")
+ SET(UPDATE_OPTIONS "${SVN_UPDATE_OPTIONS}")
+ ENDIF(UPDATE_TYPE MATCHES "[Ss][Vv][Nn]")
+ ENDIF(UPDATE_TYPE MATCHES "[Cc][Vv][Ss]")
+
+ MESSAGE("Update command: ${UPDATE_COMMAND}")
SET(DART_TESTING_TIMEOUT 1500 CACHE STRING "Time alloted for a test before Dart will kill the test.")
@@ -140,7 +170,9 @@ IF(BUILD_TESTING)
COMPRESSIONCOMMAND
COVERAGE_COMMAND
CVSCOMMAND
+ SVNCOMMAND
CVS_UPDATE_OPTIONS
+ SVN_UPDATE_OPTIONS
DART_BUILD_ERROR_REPORT_LIMIT
DART_BUILD_WARNING_REPORT_LIMIT
DART_TESTING_TIMEOUT