summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-11-23 15:22:31 -0500
committerBen Boeckel <ben.boeckel@kitware.com>2022-11-23 17:35:41 -0500
commit9e61fc3d6d71ebb1935fde39b011bf8167bd40d1 (patch)
tree7599a19918cc478d83e7797543f869b623bf1972 /Source/cmGeneratorTarget.cxx
parent5e026739e10f4cf5241f27fb9ba6721edb854018 (diff)
downloadcmake-9e61fc3d6d71ebb1935fde39b011bf8167bd40d1.tar.gz
cmGeneratorTarget: factor out dyndep support detection
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index fae6d54e44..bf0aa8ec6f 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -8869,3 +8869,19 @@ void cmGeneratorTarget::CheckCxxModuleStatus(std::string const& config) const
}
}
}
+
+bool cmGeneratorTarget::NeedCxxModuleSupport(std::string const& lang,
+ std::string const& config) const
+{
+ if (lang != "CXX"_s) {
+ return false;
+ }
+ return this->HaveCxxModuleSupport(config) == Cxx20SupportLevel::Supported &&
+ this->GetGlobalGenerator()->CheckCxxModuleSupport();
+}
+
+bool cmGeneratorTarget::NeedDyndep(std::string const& lang,
+ std::string const& config) const
+{
+ return lang == "Fortran"_s || this->NeedCxxModuleSupport(lang, config);
+}