mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-02 04:09:33 -05:00
Xcode: Fix quoting of paths with square brackets
The Xcode project file format needs paths containing square
brackets ('[' or ']') to be quoted.
Issue: #20555
This commit is contained in:
@@ -3550,7 +3550,7 @@ std::string cmGlobalXCodeGenerator::RelativeToBinary(const std::string& p)
|
|||||||
|
|
||||||
std::string cmGlobalXCodeGenerator::XCodeEscapePath(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, '"');
|
std::string t = cmStrCat('"', p, '"');
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user