|
@@ -191,49 +191,6 @@ std::string cmSystemTools::EscapeQuotes(const char* str)
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-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
|
|
|
|
|
- std::string temp = str;
|
|
|
|
|
- if (temp.find(" ") != std::string::npos &&
|
|
|
|
|
- temp.find("\"")==std::string::npos)
|
|
|
|
|
- {
|
|
|
|
|
- result = "\"";
|
|
|
|
|
- result += str;
|
|
|
|
|
- result += "\"";
|
|
|
|
|
- return result;
|
|
|
|
|
- }
|
|
|
|
|
- return str;
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- std::string result = "";
|
|
|
|
|
- for(const char* ch = str; *ch != '\0'; ++ch)
|
|
|
|
|
- {
|
|
|
|
|
- if(*ch == ' ')
|
|
|
|
|
- {
|
|
|
|
|
- result += '\\';
|
|
|
|
|
- }
|
|
|
|
|
- result += *ch;
|
|
|
|
|
- }
|
|
|
|
|
- return result;
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
void cmSystemTools::Error(const char* m1, const char* m2,
|
|
void cmSystemTools::Error(const char* m1, const char* m2,
|
|
|
const char* m3, const char* m4)
|
|
const char* m3, const char* m4)
|
|
|
{
|
|
{
|