diff options
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
| -rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index 1c92c7f..aec6577 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -305,9 +305,14 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules() std::vector<cmSourceFile const*> objectSources; this->GeneratorTarget->GetObjectSources(objectSources, this->GetConfigName()); - for (cmSourceFile const* sf : objectSources) { - // Generate this object file's rule file. - this->WriteObjectRuleFiles(*sf); + + // validate that all languages requested are enabled. + std::set<std::string> requiredLangs; + if (this->HaveRequiredLanguages(objectSources, requiredLangs)) { + for (cmSourceFile const* sf : objectSources) { + // Generate this object file's rule file. + this->WriteObjectRuleFiles(*sf); + } } } @@ -532,8 +537,7 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles( cmSourceFile const& source) { // Identify the language of the source file. - const std::string& lang = - this->LocalGenerator->GetSourceFileLanguage(source); + const std::string& lang = source.GetLanguage(); if (lang.empty()) { // don't know anything about this file so skip it return; |
