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.
This commit is contained in:
parent
5dd8c01429
commit
9969bfb773
|
@ -82,7 +82,6 @@ bool cmCTestSubdirCommand
|
||||||
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
std::string cwd = cmSystemTools::GetCurrentWorkingDirectory();
|
||||||
for ( it = args.begin(); it != args.end(); ++ it )
|
for ( it = args.begin(); it != args.end(); ++ it )
|
||||||
{
|
{
|
||||||
cmSystemTools::ChangeDirectory(cwd.c_str());
|
|
||||||
std::string fname;
|
std::string fname;
|
||||||
|
|
||||||
if(cmSystemTools::FileIsFullPath(it->c_str()))
|
if(cmSystemTools::FileIsFullPath(it->c_str()))
|
||||||
|
@ -116,7 +115,6 @@ bool cmCTestSubdirCommand
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// No CTestTestfile? Who cares...
|
// No CTestTestfile? Who cares...
|
||||||
cmSystemTools::ChangeDirectory(cwd.c_str());
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
fname += "/";
|
fname += "/";
|
||||||
|
@ -133,6 +131,7 @@ bool cmCTestSubdirCommand
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
cmSystemTools::ChangeDirectory(cwd.c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue