From e12f299f9d04f166640532345c1dec89610e575c Mon Sep 17 00:00:00 2001 From: Brad King Date: Sun, 19 Oct 2008 16:16:58 -0400 Subject: [PATCH] ENH: Enable cvs update test with CMake before 2.6 When CMake is built by CMake 2.4 or lower the FindCVS module is not available. In that case we activiate CTest.UpdateCVS by searching for the cvs command directly. --- Tests/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index deffd9fc8..74a59a2a6 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -857,7 +857,12 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel MARK_AS_ADVANCED(CTEST_TEST_UPDATE_CVS) ENDIF(UNIX) IF(CTEST_TEST_UPDATE_CVS) - FIND_PACKAGE(CVS QUIET) + IF(EXISTS ${CMAKE_ROOT}/Modules/FindCVS.cmake) + FIND_PACKAGE(CVS QUIET) + ELSE(EXISTS ${CMAKE_ROOT}/Modules/FindCVS.cmake) + FIND_PROGRAM(CVS_EXECUTABLE NAMES cvs) + SET(CVS_FOUND ${CVS_EXECUTABLE}) + ENDIF(EXISTS ${CMAKE_ROOT}/Modules/FindCVS.cmake) ENDIF(CTEST_TEST_UPDATE_CVS) IF(CTEST_TEST_UPDATE_CVS AND CVS_FOUND) SET(CTestUpdateCVS_DIR "CTest UpdateCVS")