summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-09-05 23:27:41 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-09-05 23:27:41 (GMT)
commit045d8eca6c79efc442cacf59cbcff83cc6085dbf (patch)
treee5ab59117b2d35ff20715bf1f21bd6849aa8da32 /Source/cmGeneratorTarget.cxx
parent98e1bea3fa9eb303ec38d6c515bd6a75f725083e (diff)
parent74b1d6caf31d9921b8311012ead4497865e77396 (diff)
downloadCMake-045d8eca6c79efc442cacf59cbcff83cc6085dbf.zip
CMake-045d8eca6c79efc442cacf59cbcff83cc6085dbf.tar.gz
CMake-045d8eca6c79efc442cacf59cbcff83cc6085dbf.tar.bz2
Merge branch 'fortran-object-libraries-release' into fortran-object-libraries
* fortran-object-libraries-release: cmComputeLinkInformation: compute link info for module-using targets cmGeneratorTarget: support config-independent Fortran source queries
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 7799e1c..764618e 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -9042,6 +9042,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(std::string* errorMessage) const
{
auto const& fs_names = this->Target->GetAllFileSetNames();