diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index f67b029b3..02a95fed1 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -3467,7 +3467,14 @@ void cmGlobalXCodeGenerator::AppendFlag(std::string& flags, { if(*c == '\'') { - flags += "\\\\'"; + if (this->XcodeVersion >= 40) + { + flags += "'\\\\''"; + } + else + { + flags += "\\\\'"; + } } else if(*c == '\\') {