diff options
author | William R. Dieter <william.r.dieter@intel.com> | 2021-01-22 00:15:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-01-28 14:05:35 (GMT) |
commit | 4c7e2615b8ddf162f18521c4685fddbb8010eb68 (patch) | |
tree | f1293227632bfbffb92a2d644cb094addcfe4167 | |
parent | 549eedfe859db7cd7f57a446332b489a511d26ce (diff) | |
download | CMake-4c7e2615b8ddf162f18521c4685fddbb8010eb68.zip CMake-4c7e2615b8ddf162f18521c4685fddbb8010eb68.tar.gz CMake-4c7e2615b8ddf162f18521c4685fddbb8010eb68.tar.bz2 |
Tests: Use the CVS :local: access method for local directories
Windows absolute paths start with a drive letter, followed by the path.
Without an explicit access method specification, CVS treats the drive
letter as a host name. This changes explicitly adds `:local:` to local
directory repository paths used in tests to avoid this confusion.
See the CVS Manual [1] for more information.
[1] https://www.gnu.org/software/trans-coord/manual/cvs/cvs.html#Repository
Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
-rw-r--r-- | Tests/CTestUpdateCVS.cmake.in | 18 | ||||
-rw-r--r-- | Tests/ExternalProject/CMakeLists.txt | 6 |
2 files changed, 7 insertions, 17 deletions
diff --git a/Tests/CTestUpdateCVS.cmake.in b/Tests/CTestUpdateCVS.cmake.in index 5389bdf..8e0b611 100644 --- a/Tests/CTestUpdateCVS.cmake.in +++ b/Tests/CTestUpdateCVS.cmake.in @@ -17,21 +17,11 @@ message("Using CVS tools:") set(CVS "@CVS_EXECUTABLE@") message(" cvs = ${CVS}") -set(REPO ${TOP}/repo) - -# 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}") - file(STRINGS "${CVS}" cvs_is_msys LIMIT_COUNT 1 REGEX "[Mm][Ss][Yy][Ss]") - if(cvs_is_msys) - message(" '${CVS}' is from MSYS (contains '${cvs_is_msys}')") - string(REGEX REPLACE "^([A-Za-z]):" "/\\1" REPO "${REPO}") - endif() - endif() -endif() +# Pre-pending :local: prevents cvs from trying to interpret Windows drive +# letters, like "C:", as host names. +set(REPO ":local:${TOP}/repo") -set(CVSCMD ${CVS} -d${REPO}) +set(CVSCMD ${CVS} -d "${REPO}") # CVSNT requires an extra option to 'cvs init'. set(CVS_INIT_OPT) diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt index 132abf4..59e3bcc 100644 --- a/Tests/ExternalProject/CMakeLists.txt +++ b/Tests/ExternalProject/CMakeLists.txt @@ -161,7 +161,7 @@ if(do_cvs_tests) # set(proj TutorialStep1-CVS-20090626) ExternalProject_Add(${proj} - CVS_REPOSITORY "${local_cvs_repo}" + CVS_REPOSITORY ":local:${local_cvs_repo}" CVS_MODULE "TutorialStep1" CVS_TAG "-D2009-06-26 16:50:00 UTC" UPDATE_COMMAND "" @@ -176,7 +176,7 @@ if(do_cvs_tests) # set(proj TutorialStep1-CVS-testtag1) ExternalProject_Add(${proj} - CVS_REPOSITORY "${local_cvs_repo}" + CVS_REPOSITORY ":local:${local_cvs_repo}" CVS_MODULE "TutorialStep1" CVS_TAG -rtesttag1 UPDATE_COMMAND "" @@ -191,7 +191,7 @@ if(do_cvs_tests) # set(proj TutorialStep1-CVS-HEAD) ExternalProject_Add(${proj} - CVS_REPOSITORY "${local_cvs_repo}" + CVS_REPOSITORY ":local:${local_cvs_repo}" CVS_MODULE "TutorialStep1" CMAKE_GENERATOR "${CMAKE_GENERATOR}" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> |