diff options
author | Brad King <brad.king@kitware.com> | 2012-03-02 14:20:58 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-03-02 14:23:01 -0500 |
commit | e3336025672383c6345989af9539943a74850614 (patch) | |
tree | 08ae3e009ea4a74e7a9aaa67401262cc82dbfd4a /Tests/ExternalProject | |
parent | 5012787c3c63523115f2f5254644d320ad27beba (diff) | |
download | cmake-e3336025672383c6345989af9539943a74850614.tar.gz |
Fix MSYS CVS local test repo path format (#13001)
The MSYS cvs tool interprets "c:/" as a "machine:" name for SSH. Detect
the MSYS cvs by looking for the string "msys" in the executable file
itself. Then convert the repo path to an MSYS path such as "/c/...".
Fix both the CTest.UpdateCVS and ExternalProject tests that use local
CVS repositories.
Diffstat (limited to 'Tests/ExternalProject')
-rw-r--r-- | Tests/ExternalProject/CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt index ac701298f7..7a7626199e 100644 --- a/Tests/ExternalProject/CMakeLists.txt +++ b/Tests/ExternalProject/CMakeLists.txt @@ -280,6 +280,18 @@ if(do_cvs_tests) set_property(TARGET ${proj} PROPERTY FOLDER "SetupRepos/Local/Deeply/Nested/For/Testing") + # The MSYS cvs tool interprets "c:/" as a "machine:" name for SSH. + # Detect the MSYS cvs and convert the repo path to an MSYS path. + if(WIN32) + if(EXISTS "${CVS_EXECUTABLE}") + file(STRINGS "${CVS_EXECUTABLE}" cvs_is_msys LIMIT_COUNT 1 REGEX "[Mm][Ss][Yy][Ss]") + if(cvs_is_msys) + message(STATUS "'${CVS_EXECUTABLE}' is from MSYS (contains '${cvs_is_msys}')") + string(REGEX REPLACE "^([A-Za-z]):" "/\\1" local_cvs_repo "${local_cvs_repo}") + endif() + endif() + endif() + # CVS by date stamp: # set(proj TutorialStep1-CVS-20090626) |