diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-02-01 03:19:47 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-02-01 03:23:36 (GMT) |
commit | d19648a9286d0943858ea0c5dc5e13d3b735b129 (patch) | |
tree | 0d5189085bf1be6aca3c7607cc93d079bf837925 /Source/cmGeneratorTarget.cxx | |
parent | 245a89d8b68525a769bdd4f71c184aa97fa498b3 (diff) | |
download | CMake-d19648a9286d0943858ea0c5dc5e13d3b735b129.zip CMake-d19648a9286d0943858ea0c5dc5e13d3b735b129.tar.gz CMake-d19648a9286d0943858ea0c5dc5e13d3b735b129.tar.bz2 |
cmGeneratorTarget: add a method to query if Fortran sources exist
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 30aa99b..5e352b2 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -8860,6 +8860,15 @@ std::string cmGeneratorTarget::GenerateHeaderSetVerificationFile( return filename; } +bool cmGeneratorTarget::HaveFortranSources(std::string const& config) const +{ + auto sources = cmGeneratorTarget::GetSourceFiles(config); + return std::any_of(sources.begin(), sources.end(), + [](BT<cmSourceFile*> const& sf) -> bool { + return sf.Value->GetLanguage() == "Fortran"_s; + }); +} + bool cmGeneratorTarget::HaveCxx20ModuleSources() const { auto const& fs_names = this->Target->GetAllFileSetNames(); |