summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-11-23 20:22:31 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2022-11-23 22:35:41 (GMT)
commit9e61fc3d6d71ebb1935fde39b011bf8167bd40d1 (patch)
tree7599a19918cc478d83e7797543f869b623bf1972 /Source/cmGeneratorTarget.cxx
parent5e026739e10f4cf5241f27fb9ba6721edb854018 (diff)
downloadCMake-9e61fc3d6d71ebb1935fde39b011bf8167bd40d1.zip
CMake-9e61fc3d6d71ebb1935fde39b011bf8167bd40d1.tar.gz
CMake-9e61fc3d6d71ebb1935fde39b011bf8167bd40d1.tar.bz2
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 fae6d54..bf0aa8e 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);
+}