summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-04-12 12:10:39 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-04-12 12:10:48 (GMT)
commit1e1b31ac2584aff935dbaaf4e01526de38049c08 (patch)
tree7e4abba177c12ab95361c757135f53b32650825e /Source/cmLocalGenerator.cxx
parent6cd0eefb85492911483da62efa77422508891115 (diff)
parent476c6a89109d9737715c74bf3458628b665c4c8d (diff)
downloadCMake-1e1b31ac2584aff935dbaaf4e01526de38049c08.zip
CMake-1e1b31ac2584aff935dbaaf4e01526de38049c08.tar.gz
CMake-1e1b31ac2584aff935dbaaf4e01526de38049c08.tar.bz2
Merge topic 'xcode-pch'
476c6a8910 PCH: Fix Xcode non-pch language exclusion fcf1fcfd0c Tests: Ignore all classes in Xcode internal objc warnings Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7166
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 4fa7d4f..c54d5bf 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2493,12 +2493,12 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
static const std::array<std::string, 4> langs = { { "C", "CXX", "OBJC",
"OBJCXX" } };
- bool haveAnyPch = false;
+ std::set<std::string> pchLangSet;
if (this->GetGlobalGenerator()->IsXcode()) {
for (const std::string& lang : langs) {
const std::string pchHeader = target->GetPchHeader(config, lang, "");
if (!pchHeader.empty()) {
- haveAnyPch = true;
+ pchLangSet.emplace(lang);
}
}
}
@@ -2543,9 +2543,11 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
const std::string pchHeader = target->GetPchHeader(config, lang, arch);
if (pchSource.empty() || pchHeader.empty()) {
- if (this->GetGlobalGenerator()->IsXcode() && haveAnyPch) {
+ if (this->GetGlobalGenerator()->IsXcode() && !pchLangSet.empty()) {
for (auto* sf : sources) {
- sf->SetProperty("SKIP_PRECOMPILE_HEADERS", "ON");
+ if (pchLangSet.find(sf->GetLanguage()) == pchLangSet.end()) {
+ sf->SetProperty("SKIP_PRECOMPILE_HEADERS", "ON");
+ }
}
}
continue;