diff options
author | Brad King <brad.king@kitware.com> | 2022-10-17 14:04:50 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-10-17 14:05:04 (GMT) |
commit | 6e89585d9529cc6c0583253a46962a8eb5113f81 (patch) | |
tree | 2f78c1c02ecbb7875c667a980f7d2cf94bb72347 /Source/cmGlobalXCodeGenerator.cxx | |
parent | 196897fd8271a6db8d69597ba252afebfe5c2dd8 (diff) | |
parent | 238e0f25b273420efe8a49292c0f4f267f359db2 (diff) | |
download | CMake-6e89585d9529cc6c0583253a46962a8eb5113f81.zip CMake-6e89585d9529cc6c0583253a46962a8eb5113f81.tar.gz CMake-6e89585d9529cc6c0583253a46962a8eb5113f81.tar.bz2 |
Merge topic 'swift-default-flags'
238e0f25b2 Xcode: Set WMO on non-debug build configurations
6063428de7 Swift: Update default build flags
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7741
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index a1af268..bc703e5 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -4386,12 +4386,20 @@ bool cmGlobalXCodeGenerator::CreateXCodeObjects( buildSettings->AddAttribute("CODE_SIGNING_ALLOWED", this->CreateString("NO")); } + auto debugConfigs = this->GetCMakeInstance()->GetDebugConfigs(); + std::set<std::string> debugConfigSet(debugConfigs.begin(), + debugConfigs.end()); for (auto& config : configs) { CreateGlobalXCConfigSettings(root, config.second, config.first); cmXCodeObject* buildSettingsForCfg = this->CreateFlatClone(buildSettings); + if (debugConfigSet.count(cmSystemTools::UpperCase(config.first)) == 0) { + buildSettingsForCfg->AddAttribute("SWIFT_COMPILATION_MODE", + this->CreateString("wholemodule")); + } + // Put this last so it can override existing settings // Convert "CMAKE_XCODE_ATTRIBUTE_*" variables directly. for (const auto& var : this->CurrentMakefile->GetDefinitions()) { |