mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-18 13:10:17 -06:00
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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user