diff options
author | David Cole <david.cole@kitware.com> | 2009-12-07 16:54:23 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2009-12-07 16:54:23 (GMT) |
commit | 1e04804e84fb55593fca585f3bb137f4766af969 (patch) | |
tree | ee7ad598f3cb6478075e3c238db62465de802f63 | |
parent | 25d73992726ec6340a367dd53e79ea3c83305164 (diff) | |
download | CMake-1e04804e84fb55593fca585f3bb137f4766af969.zip CMake-1e04804e84fb55593fca585f3bb137f4766af969.tar.gz CMake-1e04804e84fb55593fca585f3bb137f4766af969.tar.bz2 |
Force CheckSourceTree test to pass if the source tree is not a CVS checkout. The test can only do its checking if cvs is available and the source tree is a cvs checkout. Also, allow for the possibility that backslash characters exist in the HOME environment variable, because they may when built in a cygwin environment on Windows.
-rw-r--r-- | Tests/CMakeTests/CheckSourceTreeTest.cmake.in | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/CMakeTests/CheckSourceTreeTest.cmake.in b/Tests/CMakeTests/CheckSourceTreeTest.cmake.in index cff5baf..1cfadcb 100644 --- a/Tests/CMakeTests/CheckSourceTreeTest.cmake.in +++ b/Tests/CMakeTests/CheckSourceTreeTest.cmake.in @@ -9,6 +9,7 @@ message("CVS_EXECUTABLE='${CVS_EXECUTABLE}'") message("HOME='${HOME}'") message("ENV{DASHBOARD_TEST_FROM_CTEST}='$ENV{DASHBOARD_TEST_FROM_CTEST}'") message("") +string(REPLACE "\\" "\\\\" HOME "${HOME}") # Is the build directory the same as or underneath the source directory? @@ -41,6 +42,16 @@ message("in_source_build='${in_source_build}'") message("") +# If this does not appear to be a CVS checkout, just pass the test here and now. +# (Do not let the test fail if it is run in a tree *exported* from CVS or +# unpacked from a .zip file source installer...) +# +if(NOT EXISTS "${CMake_SOURCE_DIR}/CVS/Root") + message("source tree is not a CVS checkout... test passes by early return...") + return() +endif() + + # Check with "cvs -q -n up -dP" if there are any local modifications to the # CMake source tree: # |