diff options
author | Brad King <brad.king@kitware.com> | 2009-06-22 16:26:02 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-06-22 16:26:02 -0400 |
commit | db024f444e6672951b1beed84c5dbf6de76b7e85 (patch) | |
tree | 981443cdea6256ccfb4c851a4dcd137474365aa3 /Tests/CMakeLists.txt | |
parent | d3679610c6b60ff442a3f467b47005ea7c3996c1 (diff) | |
download | cmake-db024f444e6672951b1beed84c5dbf6de76b7e85.tar.gz |
ENH: Auto-enable CTest.UpdateCVS test on Windows
The test needs to create a cvs repository with 'cvs init', but the CVSNT
client on Windows needs 'cvs init -n' to avoid administrator access.
Previously we required users to explicitly enable CTEST_TEST_UPDATE_CVS
to activate the test on Windows.
This teaches the test to use the '-n' option when necessary. Now we can
enable the test in all cases except when trying to use a cygwin cvs.exe
without cygwin paths.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r-- | Tests/CMakeLists.txt | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 29bfb528c8..51ccfe6046 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -897,25 +897,20 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel ENDIF(Subversion_FOUND) # Test CTest Update with CVS - IF(UNIX) - # The test is expected to work by default on UNIX-like systems. - SET(CTEST_TEST_UPDATE_CVS 1) - ELSE(UNIX) - # Special CVS configuration is needed for test to pass on Windows. - OPTION(CTEST_TEST_UPDATE_CVS - "Enable CTest.UpdateCVS test. Requires extra CVS setup on windows." - OFF) - MARK_AS_ADVANCED(CTEST_TEST_UPDATE_CVS) - ENDIF(UNIX) + 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) + SET(CTEST_TEST_UPDATE_CVS ${CVS_FOUND}) + IF(CTEST_TEST_UPDATE_CVS AND NOT UNIX) + IF("${CVS_EXECUTABLE}" MATCHES "cygwin") + MESSAGE(STATUS "No CTest.UpdateCVS test with cygwin cvs.exe outside cygwin!") + SET(CTEST_TEST_UPDATE_CVS 0) + ENDIF("${CVS_EXECUTABLE}" MATCHES "cygwin") + ENDIF(CTEST_TEST_UPDATE_CVS AND NOT UNIX) IF(CTEST_TEST_UPDATE_CVS) - 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") CONFIGURE_FILE("${CMake_SOURCE_DIR}/Tests/CTestUpdateCVS.cmake.in" "${CMake_BINARY_DIR}/Tests/CTestUpdateCVS.cmake" @ONLY) @@ -923,7 +918,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=CVS -P ${CMake_SOURCE_DIR}/Utilities/Rel -P "${CMake_BINARY_DIR}/Tests/CTestUpdateCVS.cmake" ) LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${CTestUpdateCVS_DIR}") - ENDIF(CTEST_TEST_UPDATE_CVS AND CVS_FOUND) + ENDIF(CTEST_TEST_UPDATE_CVS) # Test CTest Update with BZR FIND_PROGRAM(BZR_EXECUTABLE NAMES bzr) |