BUG: fix spaces in path with mingw and custom commands

This commit is contained in:
Bill Hoffman 2004-06-22 17:23:28 -04:00
parent b5f2442ba9
commit f1842f9137

View File

@ -127,6 +127,17 @@ std::string cmSystemTools::EscapeQuotes(const char* str)
std::string cmSystemTools::EscapeSpaces(const char* str)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
bool useDoubleQ = true;
#else
bool useDoubleQ = false;
#endif
if(cmSystemTools::s_ForceUnixPaths)
{
useDoubleQ = false;
}
if(useDoubleQ)
{
std::string result;
// if there are spaces
@ -140,7 +151,9 @@ std::string cmSystemTools::EscapeSpaces(const char* str)
return result;
}
return str;
#else
}
else
{
std::string result = "";
for(const char* ch = str; *ch != '\0'; ++ch)
{
@ -151,9 +164,10 @@ std::string cmSystemTools::EscapeSpaces(const char* str)
result += *ch;
}
return result;
#endif
}
}
std::string cmSystemTools::RemoveEscapes(const char* s)
{
std::string result = "";