| 145 | } |
| 146 | |
| 147 | void cmNinjaNormalTargetGenerator::WriteLanguagesRules( |
| 148 | std::string const& config) |
| 149 | { |
| 150 | #ifdef NINJA_GEN_VERBOSE_FILES |
| 151 | cmGlobalNinjaGenerator::WriteDivider(this->GetRulesFileStream()); |
| 152 | this->GetRulesFileStream() |
| 153 | << "# Rules for each language for " |
| 154 | << cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType()) |
| 155 | << " target " << this->GetTargetName() << "\n\n"; |
| 156 | #endif |
| 157 | |
| 158 | // Write rules for languages compiled in this target. |
| 159 | { |
| 160 | std::set<std::string> languages; |
| 161 | std::vector<cmSourceFile const*> sourceFiles; |
| 162 | this->GetGeneratorTarget()->GetObjectSources(sourceFiles, config); |
| 163 | if (this->HaveRequiredLanguages(sourceFiles, languages)) { |
| 164 | for (std::string const& language : languages) { |
| 165 | this->WriteLanguageRules(language, config); |
| 166 | } |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | // Write rules for languages in BMI-only rules. |
| 171 | { |
| 172 | std::set<std::string> languages; |
| 173 | std::vector<cmSourceFile const*> sourceFiles; |
| 174 | this->GetGeneratorTarget()->GetCxxModuleSources(sourceFiles, config); |
| 175 | if (this->HaveRequiredLanguages(sourceFiles, languages)) { |
| 176 | for (std::string const& language : languages) { |
| 177 | this->WriteLanguageRules(language, config); |
| 178 | } |
| 179 | } |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | char const* cmNinjaNormalTargetGenerator::GetVisibleTypeName() const |
| 184 | { |
no test coverage detected