diff options
author | Brad King <brad.king@kitware.com> | 2023-01-31 19:18:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-01-31 19:21:20 (GMT) |
commit | 8527f42b962e605ba5ae9334a4ee01d04e08194f (patch) | |
tree | 04eb8a348b807dabb8042437462350ac77d85c74 | |
parent | 29fb1367b6bbd379c5422eb5d0918a660e327a5f (diff) | |
download | CMake-8527f42b962e605ba5ae9334a4ee01d04e08194f.zip CMake-8527f42b962e605ba5ae9334a4ee01d04e08194f.tar.gz CMake-8527f42b962e605ba5ae9334a4ee01d04e08194f.tar.bz2 |
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
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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); |