CTest: more aggressive implementation of ctest_empty_binary_directory()

Make sure that CMakeCache.txt is the last file being removed since
the binary directory may be left in a state that is no longer
removable otherwise.

Also retry removal a couple of times which makes this more robust
on windows where file locks may temporarily prevent removal.
This commit is contained in:
Nils Gladitz
2013-11-01 21:55:45 +01:00
parent 9d9f102f53
commit 35fbc10079
2 changed files with 63 additions and 3 deletions
+3
View File
@@ -135,6 +135,9 @@ private:
// Add ctest command
void AddCTestCommand(cmCTestCommand* command);
// Try to remove the binary directory once
static bool TryToRemoveBinaryDirectoryOnce(const std::string& directoryPath);
std::vector<cmStdString> ConfigurationScripts;
std::vector<bool> ScriptProcessScope;