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.

This commit is contained in:
David Cole 2009-12-07 11:54:23 -05:00
parent 25d7399272
commit 1e04804e84
1 changed files with 11 additions and 0 deletions

View File

@ -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:
#