diff options
author | Andrey Filipenkov <decapitator@ukr.net> | 2022-08-11 12:26:30 (GMT) |
---|---|---|
committer | Andrey Filipenkov <decapitator@ukr.net> | 2022-08-11 12:26:30 (GMT) |
commit | 7b2359ac53d9e351ed612db148a17af44905db2e (patch) | |
tree | e3441e98abea377a11e2c2e6dd4d30ba2b8a1ef9 /Source/cmLocalGenerator.cxx | |
parent | 5d0685aa3ee20be4553eacfdc144d63e6ad2fcd5 (diff) | |
download | CMake-7b2359ac53d9e351ed612db148a17af44905db2e.zip CMake-7b2359ac53d9e351ed612db148a17af44905db2e.tar.gz CMake-7b2359ac53d9e351ed612db148a17af44905db2e.tar.bz2 |
Xcode: don't set SKIP_PRECOMPILE_HEADERS when source has no language
Resources that should go into "Copy Bundle Resources" build phase are added as source files but don't have an associated language
Fixes: #23821
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 7b823da..64f8996 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2591,7 +2591,9 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target) if (pchSource.empty() || pchHeader.empty()) { if (this->GetGlobalGenerator()->IsXcode() && !pchLangSet.empty()) { for (auto* sf : sources) { - if (pchLangSet.find(sf->GetLanguage()) == pchLangSet.end()) { + const auto sourceLanguage = sf->GetLanguage(); + if (!sourceLanguage.empty() && + pchLangSet.find(sourceLanguage) == pchLangSet.end()) { sf->SetProperty("SKIP_PRECOMPILE_HEADERS", "ON"); } } |