| 5046 | } |
| 5047 | |
| 5048 | void cmGeneratorTarget::GetLanguages(std::set<std::string>& languages, |
| 5049 | std::string const& config) const |
| 5050 | { |
| 5051 | // Targets that do not compile anything have no languages. |
| 5052 | if (!this->CanCompileSources()) { |
| 5053 | return; |
| 5054 | } |
| 5055 | |
| 5056 | std::vector<cmSourceFile*> sourceFiles; |
| 5057 | this->GetSourceFiles(sourceFiles, config); |
| 5058 | for (cmSourceFile* src : sourceFiles) { |
| 5059 | std::string const& lang = src->GetOrDetermineLanguage(); |
| 5060 | if (!lang.empty()) { |
| 5061 | languages.insert(lang); |
| 5062 | } |
| 5063 | } |
| 5064 | |
| 5065 | std::set<cmGeneratorTarget const*> objectLibraries = |
| 5066 | this->GetSourceObjectLibraries(config); |
| 5067 | for (cmGeneratorTarget const* objLib : objectLibraries) { |
| 5068 | objLib->GetLanguages(languages, config); |
| 5069 | } |
| 5070 | } |
| 5071 | |
| 5072 | std::set<cmGeneratorTarget const*> cmGeneratorTarget::GetSourceObjectLibraries( |
| 5073 | std::string const& config) const |
no test coverage detected