[cmake-commits] hoffman committed cmLocalGenerator.cxx 1.187 1.188
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Feb 26 11:56:15 EST 2007
Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv18248
Modified Files:
cmLocalGenerator.cxx
Log Message:
ENH: go back to \ escapes for qnx
Index: cmLocalGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmLocalGenerator.cxx,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -d -r1.187 -r1.188
--- cmLocalGenerator.cxx 26 Feb 2007 16:41:41 -0000 1.187
+++ cmLocalGenerator.cxx 26 Feb 2007 16:56:13 -0000 1.188
@@ -2066,6 +2066,21 @@
}
if( output == SHELL)
{
+ // for shell commands if force unix is on, but this->WindowsShell
+ // is true, then turn off force unix paths for the output path
+ // so that the path is windows style and will work with windows
+ // cmd.exe.
+ bool forceOn = cmSystemTools::GetForceUnixPaths();
+ if(forceOn && this->WindowsShell)
+ {
+ cmSystemTools::SetForceUnixPaths(false);
+ }
+ result = cmSystemTools::ConvertToOutputPath(result.c_str());
+ if(forceOn && this->WindowsShell)
+ {
+ cmSystemTools::SetForceUnixPaths(true);
+ }
+
// For the MSYS shell convert drive letters to posix paths, so
// that c:/some/path becomes /c/some/path. This is needed to
// avoid problems with the shell path translation.
@@ -2077,20 +2092,19 @@
result[0] = '/';
}
}
- if(this->WindowsShell)
+ // if this is unix then we need to escape () in the shell
+#if !defined(WIN32) || defined(CYGWIN)
+ forceOn = true;
+#endif
+ if(forceOn )
{
- std::string::size_type pos = 0;
- while((pos = result.find('/', pos)) != std::string::npos)
- {
- result[pos] = '\\';
- pos++;
- }
+ result = cmSystemTools::EscapeForUnixShell(result);
}
- result = this->EscapeForShell(result.c_str(), true, false);
}
return result;
}
+
//----------------------------------------------------------------------------
void
cmLocalGenerator
More information about the Cmake-commits
mailing list