[Cmake-commits] [cmake-commits] king committed CTest.cmake 1.22 1.23

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Feb 10 10:43:25 EST 2010


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv12979/Modules

Modified Files:
	CTest.cmake 
Log Message:
Simplify CTest.cmake module with ELSEIF

We use ELSEIF to simplify the cascading IF blocks for detecting version
control tools.


Index: CTest.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CTest.cmake,v
retrieving revision 1.22
retrieving revision 1.23
diff -C 2 -d -r1.22 -r1.23
*** CTest.cmake	4 Dec 2009 18:44:19 -0000	1.22
--- CTest.cmake	10 Feb 2010 15:43:23 -0000	1.23
***************
*** 131,147 ****
      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)
!       ELSE(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn")
!         IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.bzr")
!           SET(UPDATE_TYPE bzr)
!         ELSE(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.bzr")
!           IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.hg")
!             SET(UPDATE_TYPE hg)
!           ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.hg")
!         ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.bzr")
!       ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn")
!     ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS")
    ENDIF(NOT UPDATE_TYPE)
  
--- 131,141 ----
      IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/CVS")
        SET(UPDATE_TYPE cvs)
!     ELSEIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.svn")
!       SET(UPDATE_TYPE svn)
!     ELSEIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.bzr")
!       SET(UPDATE_TYPE bzr)
!     ELSEIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.hg")
!       SET(UPDATE_TYPE hg)
!     ENDIF()
    ENDIF(NOT UPDATE_TYPE)
  
***************
*** 157,176 ****
      SET(UPDATE_COMMAND "${CVSCOMMAND}")
      SET(UPDATE_OPTIONS "${CVS_UPDATE_OPTIONS}")
!   ELSE("${_update_type}" STREQUAL "cvs")
!     IF("${_update_type}" STREQUAL "svn")
!       SET(UPDATE_COMMAND "${SVNCOMMAND}")
!       SET(UPDATE_OPTIONS "${SVN_UPDATE_OPTIONS}")
!     ELSE("${_update_type}" STREQUAL "svn")
!       IF("${_update_type}" STREQUAL "bzr")
!         SET(UPDATE_COMMAND "${BZRCOMMAND}")
!         SET(UPDATE_OPTIONS "${BZR_UPDATE_OPTIONS}")
!       ELSE("${_update_type}" STREQUAL "bzr")
!         IF("${_update_type}" STREQUAL "hg")
!           SET(UPDATE_COMMAND "${HGCOMMAND}")
!           SET(UPDATE_OPTIONS "${HG_UPDATE_OPTIONS}")
!         ENDIF("${_update_type}" STREQUAL "hg")
!       ENDIF("${_update_type}" STREQUAL "bzr")
!     ENDIF("${_update_type}" STREQUAL "svn")
!   ENDIF("${_update_type}" STREQUAL "cvs")
  
    SET(DART_TESTING_TIMEOUT 1500 CACHE STRING 
--- 151,164 ----
      SET(UPDATE_COMMAND "${CVSCOMMAND}")
      SET(UPDATE_OPTIONS "${CVS_UPDATE_OPTIONS}")
!   ELSEIF("${_update_type}" STREQUAL "svn")
!     SET(UPDATE_COMMAND "${SVNCOMMAND}")
!     SET(UPDATE_OPTIONS "${SVN_UPDATE_OPTIONS}")
!   ELSEIF("${_update_type}" STREQUAL "bzr")
!     SET(UPDATE_COMMAND "${BZRCOMMAND}")
!     SET(UPDATE_OPTIONS "${BZR_UPDATE_OPTIONS}")
!   ELSEIF("${_update_type}" STREQUAL "hg")
!     SET(UPDATE_COMMAND "${HGCOMMAND}")
!     SET(UPDATE_OPTIONS "${HG_UPDATE_OPTIONS}")
!   ENDIF()
  
    SET(DART_TESTING_TIMEOUT 1500 CACHE STRING 



More information about the Cmake-commits mailing list