ENH: Added support to EscapeSpaces to use double quotes on windows.
This commit is contained in:
parent
6c54371c8f
commit
33e1a4a09a
|
@ -174,6 +174,10 @@ void cmSystemTools::ReplaceString(std::string& source,
|
||||||
|
|
||||||
std::string cmSystemTools::EscapeSpaces(const char* str)
|
std::string cmSystemTools::EscapeSpaces(const char* str)
|
||||||
{
|
{
|
||||||
|
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||||
|
std::string result = str;
|
||||||
|
return "\""+result+"\"";
|
||||||
|
#else
|
||||||
std::string result = "";
|
std::string result = "";
|
||||||
for(const char* ch = str; *ch != '\0'; ++ch)
|
for(const char* ch = str; *ch != '\0'; ++ch)
|
||||||
{
|
{
|
||||||
|
@ -184,6 +188,7 @@ std::string cmSystemTools::EscapeSpaces(const char* str)
|
||||||
result += *ch;
|
result += *ch;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue