Browse Source

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.
Zach Mullen 16 years ago
parent
commit
17afd5257b
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Source/CTest/cmCTestTestHandler.cxx

+ 6 - 0
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...