summaryrefslogtreecommitdiffstats
path: root/Source
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:47 (GMT)
commit4471f2b0d7480c192564611e470f9f189b427908 (patch)
treebf787022aecea2fb454f653ef98189bfda1c05ef /Source
parent4515d82088c5dcd8e08e117532c500992262b84b (diff)
parent476c6a89109d9737715c74bf3458628b665c4c8d (diff)
downloadCMake-4471f2b0d7480c192564611e470f9f189b427908.zip
CMake-4471f2b0d7480c192564611e470f9f189b427908.tar.gz
CMake-4471f2b0d7480c192564611e470f9f189b427908.tar.bz2
Merge topic 'xcode-pch' into release-3.23
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')
-rw-r--r--Source/cmLocalGenerator.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 2adb232..e39309c 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2469,12 +2469,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);
}
}
}
@@ -2519,9 +2519,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;