MCPcopy Create free account
hub / github.com/Kitware/CMake / HaveFortranSources

Method HaveFortranSources

Source/cmGeneratorTarget.cxx:6108–6125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6106}
6107
6108bool 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
6127bool cmGeneratorTarget::HaveFortranSources() const
6128{

Callers 4

ComputeMethod · 0.80

Calls 7

GetSourceFilesMethod · 0.95
GetAllConfigSourcesMethod · 0.95
GetLanguageMethod · 0.80
GetGeneratorConfigsMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected