diff options
author | Ken Martin <ken.martin@kitware.com> | 2008-05-30 13:14:25 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2008-05-30 13:14:25 (GMT) |
commit | 5020a1f4a012fb83781c3c28811e55a0ba68b50b (patch) | |
tree | f646e30340db1f0402b93b3145e7a08daff92677 /Source/CTest | |
parent | da273b10264ecc7ad5880adfb292d21e6512831c (diff) | |
download | CMake-5020a1f4a012fb83781c3c28811e55a0ba68b50b.zip CMake-5020a1f4a012fb83781c3c28811e55a0ba68b50b.tar.gz CMake-5020a1f4a012fb83781c3c28811e55a0ba68b50b.tar.bz2 |
ENH: make tes test finding logic also try full paths as relative paths because some folks have been doing that and 2.4 handled it
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 9a6792e..7a3086e 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1165,7 +1165,7 @@ std::string cmCTestTestHandler::FindTheExecutable(const char *exe) failedPaths); } -// add additional configuraitons to the search path +// add additional configurations to the search path void cmCTestTestHandler ::AddConfigurations(cmCTest *ctest, std::vector<std::string> &attempted, @@ -1175,7 +1175,8 @@ void cmCTestTestHandler { std::string tempPath; - if (filepath.size()) + if (filepath.size() && + filepath[filepath.size()-1] != '/') { filepath += "/"; } @@ -1259,6 +1260,16 @@ std::string cmCTestTestHandler attemptedConfigs, filepath,filename); + // even if a fullpath was specified also try it relative to the current directory + if (filepath.size() && filepath[0] == '/') + { + std::string localfilepath = filepath.substr(1,filepath.size()-1); + cmCTestTestHandler::AddConfigurations(ctest, attempted, + attemptedConfigs, + localfilepath,filename); + } + + // if extraPaths are provided and we were not passed a full path, try them, // try any extra paths if (filepath.size() == 0) @@ -1274,8 +1285,8 @@ std::string cmCTestTestHandler filepathExtra, filenameExtra); } - } - + } + // store the final location in fullPath std::string fullPath; |