Xcode4: Requires more quoting of single quote char

Specifically in per-target and per-file compiler definition
string values.

The Preprocessor test now passes on Xcode 4 builds after
this commit.
This commit is contained in:
David Cole 2011-08-25 18:35:54 -04:00
parent ee45a5dd5a
commit 0cf4fa578a

View File

@ -3408,9 +3408,16 @@ void cmGlobalXCodeGenerator::AppendFlag(std::string& flags,
for(const char* c = flag.c_str(); *c; ++c) for(const char* c = flag.c_str(); *c; ++c)
{ {
if(*c == '\'') if(*c == '\'')
{
if (this->XcodeVersion >= 40)
{
flags += "'\\\\''";
}
else
{ {
flags += "\\\\'"; flags += "\\\\'";
} }
}
else if(*c == '\\') else if(*c == '\\')
{ {
flags += "\\\\\\\\"; flags += "\\\\\\\\";