summaryrefslogtreecommitdiff
path: root/Source/cmXCodeObject.cxx
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2015-04-04 22:13:45 +0200
committerGregor Jasny <gjasny@googlemail.com>2015-04-04 22:13:45 +0200
commitdfd6f1f2904ca577743adb5f86f1722359723a0b (patch)
treec821c336f114ceadc09f066855a5e436222a084d /Source/cmXCodeObject.cxx
parentc6624cfdc1fe9c7c53ad9ed06da759df803aef71 (diff)
downloadcmake-dfd6f1f2904ca577743adb5f86f1722359723a0b.tar.gz
Xcode: Also quote strings containing // (#15487)
Otherwise those will be interpreted as start of a comment Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
Diffstat (limited to 'Source/cmXCodeObject.cxx')
-rw-r--r--Source/cmXCodeObject.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmXCodeObject.cxx b/Source/cmXCodeObject.cxx
index 3302a8de41..5a90fd96f6 100644
--- a/Source/cmXCodeObject.cxx
+++ b/Source/cmXCodeObject.cxx
@@ -242,6 +242,7 @@ void cmXCodeObject::PrintString(std::ostream& os,std::string String)
// considered special by the Xcode project file parser.
bool needQuote =
(String.empty() ||
+ String.find("//") != String.npos ||
String.find_first_of(" <>.+-=@$[],") != String.npos);
const char* quote = needQuote? "\"" : "";