BUG: fixes for mingw and CMakesetup with spaces in the source directory

This commit is contained in:
Bill Hoffman
2004-08-30 13:50:00 -04:00
parent 4fb678e40d
commit 3e2e0d5d63
3 changed files with 19 additions and 2 deletions

View File

@@ -131,8 +131,13 @@ std::string ConvertToWindowsPath(const char* path)
// Remove the "" around it (if any) since it's an output path for
// the shell. If another shell-oriented feature is not designed
// for a GUI use, then we are in trouble.
// save the value of the force to unix path option
bool saveForce = cmSystemTools::GetForceUnixPaths();
// make sure we get windows paths no matter what for the GUI
cmSystemTools::SetForceUnixPaths(false);
std::string s = cmSystemTools::ConvertToOutputPath(path);
// now restore the force unix path to its previous value
cmSystemTools::SetForceUnixPaths(saveForce);
if (s.size())
{
std::string::iterator i = s.begin();