summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.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/cmNinjaTargetGenerator.cxx
parent5e026739e10f4cf5241f27fb9ba6721edb854018 (diff)
downloadCMake-9e61fc3d6d71ebb1935fde39b011bf8167bd40d1.zip
CMake-9e61fc3d6d71ebb1935fde39b011bf8167bd40d1.tar.gz
CMake-9e61fc3d6d71ebb1935fde39b011bf8167bd40d1.tar.bz2
cmGeneratorTarget: factor out dyndep support detection
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx21
1 files changed, 2 insertions, 19 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index d39e155..68757b8 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -157,23 +157,6 @@ std::string cmNinjaTargetGenerator::LanguageDyndepRule(
'_', config);
}
-bool cmNinjaTargetGenerator::NeedCxxModuleSupport(
- std::string const& lang, std::string const& config) const
-{
- if (lang != "CXX"_s) {
- return false;
- }
- return this->GetGeneratorTarget()->HaveCxxModuleSupport(config) ==
- cmGeneratorTarget::Cxx20SupportLevel::Supported &&
- this->GetGlobalGenerator()->CheckCxxModuleSupport();
-}
-
-bool cmNinjaTargetGenerator::NeedDyndep(std::string const& lang,
- std::string const& config) const
-{
- return lang == "Fortran" || this->NeedCxxModuleSupport(lang, config);
-}
-
void cmNinjaTargetGenerator::BuildFileSetInfoCache(std::string const& config)
{
auto& per_config = this->Configs[config];
@@ -236,7 +219,7 @@ bool cmNinjaTargetGenerator::NeedDyndepForSource(std::string const& lang,
std::string const& config,
cmSourceFile const* sf)
{
- bool const needDyndep = this->NeedDyndep(lang, config);
+ bool const needDyndep = this->GetGeneratorTarget()->NeedDyndep(lang, config);
if (!needDyndep) {
return false;
}
@@ -699,7 +682,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
const std::string& config)
{
// For some cases we scan to dynamically discover dependencies.
- bool const needDyndep = this->NeedDyndep(lang, config);
+ bool const needDyndep = this->GetGeneratorTarget()->NeedDyndep(lang, config);
if (needDyndep) {
this->WriteCompileRule(lang, config, WithScanning::Yes);