summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-10 13:35:32 (GMT)
committerBrad King <brad.king@kitware.com>2020-04-10 13:37:18 (GMT)
commitdc0dc974a98f91a665ff8b0559ebf4a2b218f3b8 (patch)
tree699dc853750ea5f0d8fd3867feb31e564860dd82 /Source/cmGlobalXCodeGenerator.cxx
parent953292921652377ae03bf7413ed115e03c7bd83b (diff)
downloadCMake-dc0dc974a98f91a665ff8b0559ebf4a2b218f3b8.zip
CMake-dc0dc974a98f91a665ff8b0559ebf4a2b218f3b8.tar.gz
CMake-dc0dc974a98f91a665ff8b0559ebf4a2b218f3b8.tar.bz2
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 e74d618..bdc03c7 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;
}