diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2013-05-15 06:50:22 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2013-05-15 06:50:22 (GMT) |
commit | 9969bfb77370f60053867b5afbe7b1076b7104b9 (patch) | |
tree | 034cfb9c26d98aef5413bf59ee41f8e392f4154a /Source/CTest | |
parent | 5dd8c01429da90a7417b72f17e784cc98f70f57c (diff) | |
download | CMake-9969bfb77370f60053867b5afbe7b1076b7104b9.zip CMake-9969bfb77370f60053867b5afbe7b1076b7104b9.tar.gz CMake-9969bfb77370f60053867b5afbe7b1076b7104b9.tar.bz2 |
CTest: avoid useless changing of directory
At this point we do not care what the current directory is, as nothing that
requires a specific directory is done. Just make sure that at the end we are
back in the same directory as at the start.
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index e7491bb..55fa396 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -82,7 +82,6 @@ bool cmCTestSubdirCommand std::string cwd = cmSystemTools::GetCurrentWorkingDirectory(); for ( it = args.begin(); it != args.end(); ++ it ) { - cmSystemTools::ChangeDirectory(cwd.c_str()); std::string fname; if(cmSystemTools::FileIsFullPath(it->c_str())) @@ -116,7 +115,6 @@ bool cmCTestSubdirCommand else { // No CTestTestfile? Who cares... - cmSystemTools::ChangeDirectory(cwd.c_str()); continue; } fname += "/"; @@ -133,6 +131,7 @@ bool cmCTestSubdirCommand return false; } } + cmSystemTools::ChangeDirectory(cwd.c_str()); return true; } |