From 8527f42b962e605ba5ae9334a4ee01d04e08194f Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 31 Jan 2023 14:18:21 -0500 Subject: Xcode: Explicitly disable deprecated user include path feature The `ALWAYS_SEARCH_USER_PATHS` feature is documented [1] to search the paths in `USER_HEADER_SEARCH_PATHS` before `HEADER_SEARCH_PATHS`. The behavior has been long discouraged and was deprecated by Xcode 8.3. Furthermore, Xcode explicitly disables this setting when creating new projects. We can do that too since we do not generate any user header search paths anyway. Previously we always set `USE_HEADERMAP` to `NO` to prevent Xcode's warning about an ancient "header map" feature deprecation. However, this somehow breaks Xcode 14's "Build Documentation" feature. Setting `ALWAYS_SEARCH_USER_PATHS` to `NO` seems to prevent the header map warning too, so drop `USE_HEADERMAP` to fix the documentation feature. [1] https://developer.apple.com/documentation/xcode/build-settings-reference Fixes: #24379 --- Source/cmGlobalXCodeGenerator.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 8e6e706..f91879e 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -2975,7 +2975,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, this->CreateString(extraLinkOptions)); buildSettings->AddAttribute("OTHER_REZFLAGS", this->CreateString("")); buildSettings->AddAttribute("SECTORDER_FLAGS", this->CreateString("")); - buildSettings->AddAttribute("USE_HEADERMAP", this->CreateString("NO")); + buildSettings->AddAttribute("ALWAYS_SEARCH_USER_PATHS", + this->CreateString("NO")); cmXCodeObject* group = this->CreateObject(cmXCodeObject::OBJECT_LIST); group->AddObject(this->CreateString("$(inherited)")); buildSettings->AddAttribute("WARNING_CFLAGS", group); -- cgit v0.12