mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-03 05:08:47 -06:00
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
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user