BUG: fix for quotes in strings for flags #4022

This commit is contained in:
Bill Hoffman
2007-02-21 14:01:19 -05:00
parent 53c72ed6c3
commit 7a13c7affe
2 changed files with 6 additions and 4 deletions

View File

@@ -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 += "\"";