summaryrefslogtreecommitdiff
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-10 09:35:32 -0400
committerBrad King <brad.king@kitware.com>2020-04-10 09:37:18 -0400
commitdc0dc974a98f91a665ff8b0559ebf4a2b218f3b8 (patch)
tree699dc853750ea5f0d8fd3867feb31e564860dd82 /Source/cmGlobalXCodeGenerator.cxx
parent953292921652377ae03bf7413ed115e03c7bd83b (diff)
downloadcmake-dc0dc974a98f91a665ff8b0559ebf4a2b218f3b8.tar.gz
Xcode: Fix quoting of paths with square brackets
The Xcode project file format needs paths containing square brackets ('[' or ']') to be quoted. Issue: #20555
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index e74d61804c..bdc03c7853 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3550,7 +3550,7 @@ std::string cmGlobalXCodeGenerator::RelativeToBinary(const std::string& p)
std::string cmGlobalXCodeGenerator::XCodeEscapePath(const std::string& p)
{
- if (p.find(' ') != std::string::npos) {
+ if (p.find_first_of(" []") != std::string::npos) {
std::string t = cmStrCat('"', p, '"');
return t;
}