BUG: fix for quotes in strings for flags #4022
This commit is contained in:
parent
53c72ed6c3
commit
7a13c7affe
|
@ -1156,7 +1156,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
|
|||
{
|
||||
buildSettings->AddAttribute
|
||||
("GCC_PREPROCESSOR_DEFINITIONS",
|
||||
this->CreateString("CMAKE_INTDIR=\\\\\\\"$(CONFIGURATION)\\\\\\\""));
|
||||
this->CreateString("CMAKE_INTDIR=\\\\\"$(CONFIGURATION)\\\\\""));
|
||||
}
|
||||
std::string extraLinkOptions;
|
||||
if(target.GetType() == cmTarget::EXECUTABLE)
|
||||
|
@ -2565,9 +2565,9 @@ std::string cmGlobalXCodeGenerator::XCodeEscapePath(const char* p)
|
|||
if(ret.find(' ') != ret.npos)
|
||||
{
|
||||
std::string t = ret;
|
||||
ret = "\\\"";
|
||||
ret = "\"";
|
||||
ret += t;
|
||||
ret += "\\\"";
|
||||
ret += "\"";
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -190,6 +190,8 @@ void cmXCodeObject::SetString(const char* s)
|
|||
this->String = "\"\"";
|
||||
return;
|
||||
}
|
||||
// escape quotes
|
||||
cmSystemTools::ReplaceString(ss, "\"", "\\\"");
|
||||
bool needQuote = false;
|
||||
this->String = "";
|
||||
if(ss.find_first_of(" <>.+-=") != ss.npos)
|
||||
|
@ -200,7 +202,7 @@ void cmXCodeObject::SetString(const char* s)
|
|||
{
|
||||
this->String = "\"";
|
||||
}
|
||||
this->String += s;
|
||||
this->String += ss;
|
||||
if(needQuote)
|
||||
{
|
||||
this->String += "\"";
|
||||
|
|
Loading…
Reference in New Issue