| 6106 | } |
| 6107 | |
| 6108 | bool cmGeneratorTarget::HaveFortranSources(std::string const& config) const |
| 6109 | { |
| 6110 | auto sources = this->GetSourceFiles(config); |
| 6111 | bool const have_direct = std::any_of( |
| 6112 | sources.begin(), sources.end(), [](BT<cmSourceFile*> const& sf) -> bool { |
| 6113 | return sf.Value->GetLanguage() == "Fortran"_s; |
| 6114 | }); |
| 6115 | bool have_via_target_objects = false; |
| 6116 | if (!have_direct) { |
| 6117 | auto const sourceObjectLibraries = this->GetSourceObjectLibraries(config); |
| 6118 | have_via_target_objects = |
| 6119 | std::any_of(sourceObjectLibraries.begin(), sourceObjectLibraries.end(), |
| 6120 | [&config](cmGeneratorTarget const* tgt) -> bool { |
| 6121 | return tgt->HaveFortranSources(config); |
| 6122 | }); |
| 6123 | } |
| 6124 | return have_direct || have_via_target_objects; |
| 6125 | } |
| 6126 | |
| 6127 | bool cmGeneratorTarget::HaveFortranSources() const |
| 6128 | { |
no test coverage detected