Merge topic 'include-dir-special'

9be48c4d0b Tests: Add coverage for special characters in include directories
dc0dc974a9 Xcode: Fix quoting of paths with square brackets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4591
This commit is contained in:
Brad King
2020-04-13 15:00:55 +00:00
committed by Kitware Robot
3 changed files with 30 additions and 1 deletions

View File

@@ -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;
}