mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 14:50:10 -06:00
cmGeneratorTarget: support config-independent Fortran source queries
Some locations care about "any config with Fortran", so make a query for such (they may not know any configuration names themselves).
This commit is contained in:
@@ -8873,6 +8873,15 @@ bool cmGeneratorTarget::HaveFortranSources(std::string const& config) const
|
||||
});
|
||||
}
|
||||
|
||||
bool cmGeneratorTarget::HaveFortranSources() const
|
||||
{
|
||||
auto sources = cmGeneratorTarget::GetAllConfigSources();
|
||||
return std::any_of(sources.begin(), sources.end(),
|
||||
[](AllConfigSource const& sf) -> bool {
|
||||
return sf.Source->GetLanguage() == "Fortran"_s;
|
||||
});
|
||||
}
|
||||
|
||||
bool cmGeneratorTarget::HaveCxx20ModuleSources() const
|
||||
{
|
||||
auto const& fs_names = this->Target->GetAllFileSetNames();
|
||||
|
||||
@@ -1247,6 +1247,7 @@ public:
|
||||
cmGeneratorTarget const* t2) const;
|
||||
};
|
||||
|
||||
bool HaveFortranSources() const;
|
||||
bool HaveFortranSources(std::string const& config) const;
|
||||
|
||||
// C++20 module support queries.
|
||||
|
||||
Reference in New Issue
Block a user