removed warning messages
This commit is contained in:
parent
03e7f324f0
commit
7850f7b319
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue