summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2009-11-09 19:07:36 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2009-11-09 19:07:36 (GMT)
commit17afd5257b31912195c93d1d1be585c06f8382d7 (patch)
tree8ce55bea12ab940c9018e1c319b63de7ef7ff537
parent2362fdc850805aebdf50312ea7946c0c69dedae5 (diff)
downloadCMake-17afd5257b31912195c93d1d1be585c06f8382d7.zip
CMake-17afd5257b31912195c93d1d1be585c06f8382d7.tar.gz
CMake-17afd5257b31912195c93d1d1be585c06f8382d7.tar.bz2
Bug 9090: CTest does not handle absolute paths in CTestTestfile SUBDIR( ) entries.
The ctest subdirs command now checks the relative path first, and if that does not exist, also checks if the given path was absolute. Thanks vodall for the patch.
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 56ddec7..d314052 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -86,6 +86,12 @@ bool cmCTestSubdirCommand
fname += "/";
fname += *it;
+ //sanity check on relative path; if not, try absolute path
+ if ( !cmSystemTools::FileIsDirectory(fname.c_str()))
+ {
+ fname = *it;
+ }
+
if ( !cmSystemTools::FileExists(fname.c_str()) )
{
// No subdirectory? So what...