Merge topic 'CTest-less-cd'

9969bfb CTest: avoid useless changing of directory
This commit is contained in:
Brad King 2013-05-16 14:43:44 -04:00 committed by CMake Topic Stage
commit a052a79949
1 changed files with 1 additions and 2 deletions

View File

@ -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;
}