fix to the cleanup code

This commit is contained in:
Ken Martin 2002-09-13 11:02:15 -04:00
parent b3b0eeba05
commit 7e6f9fff2b
1 changed files with 14 additions and 12 deletions

View File

@ -94,22 +94,24 @@ bool cmTryCompileCommand::InitialPass(std::vector<std::string> const& argv)
m_Makefile->AddDefinition(argv[0].c_str(), (res == 0 ? "TRUE" : "FALSE")); m_Makefile->AddDefinition(argv[0].c_str(), (res == 0 ? "TRUE" : "FALSE"));
// if we created a directory etc, then cleanup after ourselves // if we created a directory etc, then cleanup after ourselves
/* if (argv.size() == 3)
cmDirectory dir;
dir.Load(binaryDirectory);
size_t fileNum;
for (fileNum = 0; fileNum < dir.GetNumberOfFiles(); ++fileNum)
{ {
if (strcmp(dir.GetFile(fileNum),".") && cmDirectory dir;
strcmp(dir.GetFile(fileNum),"..")) dir.Load(binaryDirectory);
size_t fileNum;
for (fileNum = 0; fileNum < dir.GetNumberOfFiles(); ++fileNum)
{ {
std::string fullPath = binaryDirectory; if (strcmp(dir.GetFile(fileNum),".") &&
fullPath += "/"; strcmp(dir.GetFile(fileNum),".."))
fullPath += dir.GetFile(fileNum); {
cmSystemTools::RemoveFile(fullPath.c_str()); std::string fullPath = binaryDirectory;
fullPath += "/";
fullPath += dir.GetFile(fileNum);
cmSystemTools::RemoveFile(fullPath.c_str());
}
} }
} }
*/
return true; return true;
} }