From dc0dc974a98f91a665ff8b0559ebf4a2b218f3b8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 10 Apr 2020 09:35:32 -0400 Subject: Xcode: Fix quoting of paths with square brackets The Xcode project file format needs paths containing square brackets ('[' or ']') to be quoted. Issue: #20555 --- Source/cmGlobalXCodeGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v0.12