mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 11:22:21 -06:00
cmGeneratorTarget: add a method to query if Fortran sources exist
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -1225,6 +1225,8 @@ public:
|
||||
cmGeneratorTarget const* t2) const;
|
||||
};
|
||||
|
||||
bool HaveFortranSources(std::string const& config) const;
|
||||
|
||||
// C++20 module support queries.
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user