removed warning messages

This commit is contained in:
Ken Martin 2001-11-26 11:32:20 -05:00
parent 03e7f324f0
commit 7850f7b319
2 changed files with 2 additions and 16 deletions

View File

@ -930,7 +930,8 @@ bool cmSystemTools::RunCommand(const char* command,
std::string commandToFile = command;
commandToFile += " > ";
std::string tempFile;
tempFile += cmSystemTools::TemporaryFileName();
tempFile += _tempnam(0, "cmake");
commandToFile += tempFile;
retVal = system(commandToFile.c_str());
std::ifstream fin(tempFile.c_str());
@ -982,18 +983,6 @@ bool cmSystemTools::RunCommand(const char* command,
#endif
}
#ifdef _MSC_VER
#define tempnam _tempnam
#endif
std::string cmSystemTools::TemporaryFileName()
{
/** \warning in Unix is recomended to use mkstemp( char * )
instead of tempnam in order to avoid the security
risk of setting rights with 0666 */
return tempnam(0, "cmake");
}
/**
* Find the file the given name. Searches the given path and then
* the system search path. Returns the full path to the file if it is

View File

@ -282,9 +282,6 @@ public:
static bool RunCommand(const char* command, std::string& output,
int &retVal, bool verbose = true);
///! Generate a temporary file name
static std::string TemporaryFileName();
///! change directory the the directory specified
static int ChangeDirectory(const char* dir);