diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmCommonTargetGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/cmComputeLinkDepends.cxx | 6 | ||||
-rw-r--r-- | Source/cmExportTryCompileFileGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/cmGeneratorExpression.cxx | 2 | ||||
-rw-r--r-- | Source/cmGeneratorExpressionDAGChecker.cxx | 9 | ||||
-rw-r--r-- | Source/cmGeneratorExpressionDAGChecker.h | 6 | ||||
-rw-r--r-- | Source/cmGeneratorExpressionNode.cxx | 8 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 10 | ||||
-rw-r--r-- | Source/cmGeneratorTarget_IncludeDirectories.cxx | 13 | ||||
-rw-r--r-- | Source/cmGeneratorTarget_Link.cxx | 6 | ||||
-rw-r--r-- | Source/cmGeneratorTarget_LinkDirectories.cxx | 4 | ||||
-rw-r--r-- | Source/cmGeneratorTarget_Options.cxx | 31 | ||||
-rw-r--r-- | Source/cmGeneratorTarget_Sources.cxx | 2 | ||||
-rw-r--r-- | Source/cmGeneratorTarget_TransitiveProperty.cxx | 6 | ||||
-rw-r--r-- | Source/cmQtAutoGenInitializer.cxx | 9 |
15 files changed, 70 insertions, 54 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx index fbf39e2..9f25904 100644 --- a/Source/cmCommonTargetGenerator.cxx +++ b/Source/cmCommonTargetGenerator.cxx @@ -500,9 +500,9 @@ std::string cmCommonTargetGenerator::GetLinkerLauncher( std::string propName = lang + "_LINKER_LAUNCHER"; cmValue launcherProp = this->GeneratorTarget->GetProperty(propName); if (cmNonempty(launcherProp)) { - cmGeneratorExpressionDAGChecker dagChecker(this->GeneratorTarget, propName, - nullptr, nullptr, - this->LocalCommonGenerator); + cmGeneratorExpressionDAGChecker dagChecker( + this->GeneratorTarget, propName, nullptr, nullptr, + this->LocalCommonGenerator, config); std::string evaluatedLinklauncher = cmGeneratorExpression::Evaluate( *launcherProp, this->LocalCommonGenerator, config, this->GeneratorTarget, &dagChecker, this->GeneratorTarget, lang); diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index db0d71a..cc323f4 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -581,7 +581,8 @@ cmComputeLinkDepends::cmComputeLinkDepends(const cmGeneratorTarget* target, "LINK_LIBRARY_OVERRIDE", nullptr, nullptr, - this->Target->GetLocalGenerator() + this->Target->GetLocalGenerator(), + config }; auto overrideFeature = cmGeneratorExpression::Evaluate( *feature, this->Target->GetLocalGenerator(), config, @@ -599,7 +600,8 @@ cmComputeLinkDepends::cmComputeLinkDepends(const cmGeneratorTarget* target, "LINK_LIBRARY_OVERRIDE", nullptr, nullptr, - target->GetLocalGenerator() }; + target->GetLocalGenerator(), + config }; auto overrideValue = cmGeneratorExpression::Evaluate( *linkLibraryOverride, target->GetLocalGenerator(), config, target, &dag, target, linkLanguage); diff --git a/Source/cmExportTryCompileFileGenerator.cxx b/Source/cmExportTryCompileFileGenerator.cxx index 4c41ff5..7ce5cd9 100644 --- a/Source/cmExportTryCompileFileGenerator.cxx +++ b/Source/cmExportTryCompileFileGenerator.cxx @@ -76,10 +76,12 @@ std::string cmExportTryCompileFileGenerator::FindTargets( // To please constraint checks of DAGChecker, this property must have // LINK_OPTIONS property as parent parentDagChecker = cm::make_unique<cmGeneratorExpressionDAGChecker>( - tgt, "LINK_OPTIONS", nullptr, nullptr, tgt->GetLocalGenerator()); + tgt, "LINK_OPTIONS", nullptr, nullptr, tgt->GetLocalGenerator(), + this->Config); } cmGeneratorExpressionDAGChecker dagChecker( - tgt, propName, nullptr, parentDagChecker.get(), tgt->GetLocalGenerator()); + tgt, propName, nullptr, parentDagChecker.get(), tgt->GetLocalGenerator(), + this->Config); std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*prop); diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx index 0583fd5..8e590fa 100644 --- a/Source/cmGeneratorExpression.cxx +++ b/Source/cmGeneratorExpression.cxx @@ -425,7 +425,7 @@ const std::string& cmGeneratorExpressionInterpreter::Evaluate( cmGeneratorExpressionDAGChecker dagChecker( this->HeadTarget, property == "COMPILE_FLAGS" ? "COMPILE_OPTIONS" : property, nullptr, - nullptr, this->LocalGenerator); + nullptr, this->LocalGenerator, this->Config); return this->CompiledGeneratorExpression->Evaluate( this->LocalGenerator, this->Config, this->HeadTarget, &dagChecker, nullptr, diff --git a/Source/cmGeneratorExpressionDAGChecker.cxx b/Source/cmGeneratorExpressionDAGChecker.cxx index bb1f4b4..1ae422e 100644 --- a/Source/cmGeneratorExpressionDAGChecker.cxx +++ b/Source/cmGeneratorExpressionDAGChecker.cxx @@ -20,17 +20,19 @@ cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker( cmGeneratorTarget const* target, std::string property, const GeneratorExpressionContent* content, - cmGeneratorExpressionDAGChecker* parent, cmLocalGenerator const* contextLG) + cmGeneratorExpressionDAGChecker* parent, cmLocalGenerator const* contextLG, + std::string const& contextConfig) : cmGeneratorExpressionDAGChecker(cmListFileBacktrace(), target, std::move(property), content, parent, - contextLG) + contextLG, contextConfig) { } cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker( cmListFileBacktrace backtrace, cmGeneratorTarget const* target, std::string property, const GeneratorExpressionContent* content, - cmGeneratorExpressionDAGChecker* parent, cmLocalGenerator const* contextLG) + cmGeneratorExpressionDAGChecker* parent, cmLocalGenerator const* contextLG, + std::string const& contextConfig) : Parent(parent) , Top(parent ? parent->Top : this) , Target(target) @@ -38,6 +40,7 @@ cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker( , Content(content) , Backtrace(std::move(backtrace)) { + static_cast<void>(contextConfig); if (parent) { this->TopIsTransitiveProperty = parent->TopIsTransitiveProperty; } else { diff --git a/Source/cmGeneratorExpressionDAGChecker.h b/Source/cmGeneratorExpressionDAGChecker.h index b230188..8b0eea7 100644 --- a/Source/cmGeneratorExpressionDAGChecker.h +++ b/Source/cmGeneratorExpressionDAGChecker.h @@ -22,12 +22,14 @@ struct cmGeneratorExpressionDAGChecker std::string property, const GeneratorExpressionContent* content, cmGeneratorExpressionDAGChecker* parent, - cmLocalGenerator const* contextLG); + cmLocalGenerator const* contextLG, + std::string const& contextConfig); cmGeneratorExpressionDAGChecker(cmGeneratorTarget const* target, std::string property, const GeneratorExpressionContent* content, cmGeneratorExpressionDAGChecker* parent, - cmLocalGenerator const* contextLG); + cmLocalGenerator const* contextLG, + std::string const& contextConfig); enum Result { diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 5945e41..e07f26d 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -488,7 +488,7 @@ protected: cmGeneratorExpressionDAGChecker dagChecker( context->Backtrace, context->HeadTarget, genexOperator + ":" + expression, content, dagCheckerParent, - context->LG); + context->LG, context->Config); switch (dagChecker.Check()) { case cmGeneratorExpressionDAGChecker::SELF_REFERENCE: case cmGeneratorExpressionDAGChecker::CYCLIC_REFERENCE: { @@ -2915,9 +2915,9 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode dagCheckerParent, usage)); } - cmGeneratorExpressionDAGChecker dagChecker(context->Backtrace, target, - propertyName, content, - dagCheckerParent, context->LG); + cmGeneratorExpressionDAGChecker dagChecker( + context->Backtrace, target, propertyName, content, dagCheckerParent, + context->LG, context->Config); switch (dagChecker.Check()) { case cmGeneratorExpressionDAGChecker::SELF_REFERENCE: diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index daeac57..55f34f8 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -709,8 +709,8 @@ std::string cmGeneratorTarget::GetLinkerTypeProperty( std::string propName{ "LINKER_TYPE" }; auto linkerType = this->GetProperty(propName); if (!linkerType.IsEmpty()) { - cmGeneratorExpressionDAGChecker dagChecker(this, propName, nullptr, - nullptr, this->LocalGenerator); + cmGeneratorExpressionDAGChecker dagChecker( + this, propName, nullptr, nullptr, this->LocalGenerator, config); auto ltype = cmGeneratorExpression::Evaluate(*linkerType, this->GetLocalGenerator(), config, this, &dagChecker, this, lang); @@ -1176,7 +1176,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory( if (iter == this->SystemIncludesCache.end()) { cmGeneratorExpressionDAGChecker dagChecker( this, "SYSTEM_INCLUDE_DIRECTORIES", nullptr, nullptr, - this->LocalGenerator); + this->LocalGenerator, config); bool excludeImported = this->GetPropertyAsBool("NO_SYSTEM_FROM_IMPORTED"); @@ -1936,8 +1936,8 @@ void cmGeneratorTarget::GetAutoUicOptions(std::vector<std::string>& result, return; } - cmGeneratorExpressionDAGChecker dagChecker(this, "AUTOUIC_OPTIONS", nullptr, - nullptr, this->LocalGenerator); + cmGeneratorExpressionDAGChecker dagChecker( + this, "AUTOUIC_OPTIONS", nullptr, nullptr, this->LocalGenerator, config); cmExpandList(cmGeneratorExpression::Evaluate(prop, this->LocalGenerator, config, this, &dagChecker), result); diff --git a/Source/cmGeneratorTarget_IncludeDirectories.cxx b/Source/cmGeneratorTarget_IncludeDirectories.cxx index eaa3959..2b45e1c 100644 --- a/Source/cmGeneratorTarget_IncludeDirectories.cxx +++ b/Source/cmGeneratorTarget_IncludeDirectories.cxx @@ -48,8 +48,8 @@ std::string AddLangSpecificInterfaceIncludeDirectories( cmGeneratorExpressionDAGChecker* context) { cmGeneratorExpressionDAGChecker dag{ - target->GetBacktrace(), target, propertyName, nullptr, context, - target->GetLocalGenerator() + target->GetBacktrace(), target, propertyName, nullptr, context, + target->GetLocalGenerator(), config }; switch (dag.Check()) { case cmGeneratorExpressionDAGChecker::SELF_REFERENCE: @@ -101,8 +101,8 @@ void AddLangSpecificImplicitIncludeDirectories( if (const auto* libraries = target->GetLinkImplementationLibraries(config, UseTo::Compile)) { cmGeneratorExpressionDAGChecker dag{ - target->GetBacktrace(), target, propertyName, nullptr, nullptr, - target->GetLocalGenerator() + target->GetBacktrace(), target, propertyName, nullptr, nullptr, + target->GetLocalGenerator(), config }; for (const cmLinkImplItem& library : libraries->Libraries) { @@ -254,8 +254,9 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetIncludeDirectories( std::vector<BT<std::string>> includes; std::unordered_set<std::string> uniqueIncludes; - cmGeneratorExpressionDAGChecker dagChecker( - this, "INCLUDE_DIRECTORIES", nullptr, nullptr, this->LocalGenerator); + cmGeneratorExpressionDAGChecker dagChecker(this, "INCLUDE_DIRECTORIES", + nullptr, nullptr, + this->LocalGenerator, config); cmList debugProperties{ this->Makefile->GetDefinition( "CMAKE_DEBUG_TARGET_PROPERTIES") }; diff --git a/Source/cmGeneratorTarget_Link.cxx b/Source/cmGeneratorTarget_Link.cxx index 74ac46b..7c6f7b5 100644 --- a/Source/cmGeneratorTarget_Link.cxx +++ b/Source/cmGeneratorTarget_Link.cxx @@ -521,7 +521,7 @@ void cmGeneratorTarget::ExpandLinkItems(std::string const& prop, } // Keep this logic in sync with ComputeLinkImplementationLibraries. cmGeneratorExpressionDAGChecker dagChecker(this, prop, nullptr, nullptr, - this->LocalGenerator); + this->LocalGenerator, config); // The $<LINK_ONLY> expression may be in a link interface to specify // private link dependencies that are otherwise excluded from usage // requirements. @@ -1271,8 +1271,8 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries( // Collect libraries directly linked in this configuration. for (auto const& entry : entryRange) { // Keep this logic in sync with ExpandLinkItems. - cmGeneratorExpressionDAGChecker dagChecker(this, "LINK_LIBRARIES", nullptr, - nullptr, this->LocalGenerator); + cmGeneratorExpressionDAGChecker dagChecker( + this, "LINK_LIBRARIES", nullptr, nullptr, this->LocalGenerator, config); // The $<LINK_ONLY> expression may be used to specify link dependencies // that are otherwise excluded from usage requirements. if (usage == UseTo::Compile) { diff --git a/Source/cmGeneratorTarget_LinkDirectories.cxx b/Source/cmGeneratorTarget_LinkDirectories.cxx index 0955dfb..bd89497 100644 --- a/Source/cmGeneratorTarget_LinkDirectories.cxx +++ b/Source/cmGeneratorTarget_LinkDirectories.cxx @@ -125,8 +125,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetLinkDirectories( std::vector<BT<std::string>> result; std::unordered_set<std::string> uniqueDirectories; - cmGeneratorExpressionDAGChecker dagChecker(this, "LINK_DIRECTORIES", nullptr, - nullptr, this->LocalGenerator); + cmGeneratorExpressionDAGChecker dagChecker( + this, "LINK_DIRECTORIES", nullptr, nullptr, this->LocalGenerator, config); cmList debugProperties{ this->Makefile->GetDefinition( "CMAKE_DEBUG_TARGET_PROPERTIES") }; diff --git a/Source/cmGeneratorTarget_Options.cxx b/Source/cmGeneratorTarget_Options.cxx index 05f325d..f77ef72 100644 --- a/Source/cmGeneratorTarget_Options.cxx +++ b/Source/cmGeneratorTarget_Options.cxx @@ -217,8 +217,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetCompileOptions( std::vector<BT<std::string>> result; std::unordered_set<std::string> uniqueOptions; - cmGeneratorExpressionDAGChecker dagChecker(this, "COMPILE_OPTIONS", nullptr, - nullptr, this->LocalGenerator); + cmGeneratorExpressionDAGChecker dagChecker( + this, "COMPILE_OPTIONS", nullptr, nullptr, this->LocalGenerator, config); cmList debugProperties{ this->Makefile->GetDefinition( "CMAKE_DEBUG_TARGET_PROPERTIES") }; @@ -258,8 +258,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetCompileFeatures( std::vector<BT<std::string>> result; std::unordered_set<std::string> uniqueFeatures; - cmGeneratorExpressionDAGChecker dagChecker(this, "COMPILE_FEATURES", nullptr, - nullptr, this->LocalGenerator); + cmGeneratorExpressionDAGChecker dagChecker( + this, "COMPILE_FEATURES", nullptr, nullptr, this->LocalGenerator, config); cmList debugProperties{ this->Makefile->GetDefinition( "CMAKE_DEBUG_TARGET_PROPERTIES") }; @@ -308,8 +308,9 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetCompileDefinitions( std::vector<BT<std::string>> list; std::unordered_set<std::string> uniqueOptions; - cmGeneratorExpressionDAGChecker dagChecker( - this, "COMPILE_DEFINITIONS", nullptr, nullptr, this->LocalGenerator); + cmGeneratorExpressionDAGChecker dagChecker(this, "COMPILE_DEFINITIONS", + nullptr, nullptr, + this->LocalGenerator, config); cmList debugProperties{ this->Makefile->GetDefinition( "CMAKE_DEBUG_TARGET_PROPERTIES") }; @@ -372,8 +373,9 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetPrecompileHeaders( } std::unordered_set<std::string> uniqueOptions; - cmGeneratorExpressionDAGChecker dagChecker( - this, "PRECOMPILE_HEADERS", nullptr, nullptr, this->LocalGenerator); + cmGeneratorExpressionDAGChecker dagChecker(this, "PRECOMPILE_HEADERS", + nullptr, nullptr, + this->LocalGenerator, config); cmList debugProperties{ this->Makefile->GetDefinition( "CMAKE_DEBUG_TARGET_PROPERTIES") }; @@ -430,8 +432,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetLinkOptions( std::vector<BT<std::string>> result; std::unordered_set<std::string> uniqueOptions; - cmGeneratorExpressionDAGChecker dagChecker(this, "LINK_OPTIONS", nullptr, - nullptr, this->LocalGenerator); + cmGeneratorExpressionDAGChecker dagChecker( + this, "LINK_OPTIONS", nullptr, nullptr, this->LocalGenerator, config); cmList debugProperties{ this->Makefile->GetDefinition( "CMAKE_DEBUG_TARGET_PROPERTIES") }; @@ -599,8 +601,9 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetStaticLibraryLinkOptions( std::vector<BT<std::string>> result; std::unordered_set<std::string> uniqueOptions; - cmGeneratorExpressionDAGChecker dagChecker( - this, "STATIC_LIBRARY_OPTIONS", nullptr, nullptr, this->LocalGenerator); + cmGeneratorExpressionDAGChecker dagChecker(this, "STATIC_LIBRARY_OPTIONS", + nullptr, nullptr, + this->LocalGenerator, config); EvaluatedTargetPropertyEntries entries; if (cmValue linkOptions = this->GetProperty("STATIC_LIBRARY_OPTIONS")) { @@ -631,8 +634,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetLinkDepends( { std::vector<BT<std::string>> result; std::unordered_set<std::string> uniqueOptions; - cmGeneratorExpressionDAGChecker dagChecker(this, "LINK_DEPENDS", nullptr, - nullptr, this->LocalGenerator); + cmGeneratorExpressionDAGChecker dagChecker( + this, "LINK_DEPENDS", nullptr, nullptr, this->LocalGenerator, config); EvaluatedTargetPropertyEntries entries; if (cmValue linkDepends = this->GetProperty("LINK_DEPENDS")) { diff --git a/Source/cmGeneratorTarget_Sources.cxx b/Source/cmGeneratorTarget_Sources.cxx index de18df5..94e8897 100644 --- a/Source/cmGeneratorTarget_Sources.cxx +++ b/Source/cmGeneratorTarget_Sources.cxx @@ -265,7 +265,7 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetSourceFilePaths( } cmGeneratorExpressionDAGChecker dagChecker(this, "SOURCES", nullptr, nullptr, - this->LocalGenerator); + this->LocalGenerator, config); EvaluatedTargetPropertyEntries entries = EvaluateTargetPropertyEntries( this, config, std::string(), &dagChecker, this->SourceEntries); diff --git a/Source/cmGeneratorTarget_TransitiveProperty.cxx b/Source/cmGeneratorTarget_TransitiveProperty.cxx index f5d9a1a..2cd3665 100644 --- a/Source/cmGeneratorTarget_TransitiveProperty.cxx +++ b/Source/cmGeneratorTarget_TransitiveProperty.cxx @@ -107,9 +107,9 @@ std::string cmGeneratorTarget::EvaluateInterfaceProperty( // Evaluate $<TARGET_PROPERTY:this,prop> as if it were compiled. This is // a subset of TargetPropertyNode::Evaluate without stringify/parse steps // but sufficient for transitive interface properties. - cmGeneratorExpressionDAGChecker dagChecker(context->Backtrace, this, prop, - nullptr, dagCheckerParent, - this->LocalGenerator); + cmGeneratorExpressionDAGChecker dagChecker( + context->Backtrace, this, prop, nullptr, dagCheckerParent, + this->LocalGenerator, context->Config); switch (dagChecker.Check()) { case cmGeneratorExpressionDAGChecker::SELF_REFERENCE: dagChecker.ReportError( diff --git a/Source/cmQtAutoGenInitializer.cxx b/Source/cmQtAutoGenInitializer.cxx index 44af9ce..ee53a8e 100644 --- a/Source/cmQtAutoGenInitializer.cxx +++ b/Source/cmQtAutoGenInitializer.cxx @@ -1918,14 +1918,14 @@ bool cmQtAutoGenInitializer::SetupWriteAutogenInfo() info.SetBool("MOC_RELAXED_MODE", this->Moc.RelaxedMode); info.SetBool("MOC_PATH_PREFIX", this->Moc.PathPrefix); - cmGeneratorExpressionDAGChecker dagChecker(this->GenTarget, - "AUTOMOC_MACRO_NAMES", nullptr, - nullptr, this->LocalGen); EvaluatedTargetPropertyEntries InterfaceAutoMocMacroNamesEntries; if (this->MultiConfig) { for (auto const& cfg : this->ConfigsList) { if (!cfg.empty()) { + cmGeneratorExpressionDAGChecker dagChecker( + this->GenTarget, "AUTOMOC_MACRO_NAMES", nullptr, nullptr, + this->LocalGen, cfg); AddInterfaceEntries(this->GenTarget, cfg, "INTERFACE_AUTOMOC_MACRO_NAMES", "CXX", &dagChecker, InterfaceAutoMocMacroNamesEntries, @@ -1933,6 +1933,9 @@ bool cmQtAutoGenInitializer::SetupWriteAutogenInfo() } } } else { + cmGeneratorExpressionDAGChecker dagChecker( + this->GenTarget, "AUTOMOC_MACRO_NAMES", nullptr, nullptr, + this->LocalGen, this->ConfigDefault); AddInterfaceEntries(this->GenTarget, this->ConfigDefault, "INTERFACE_AUTOMOC_MACRO_NAMES", "CXX", &dagChecker, InterfaceAutoMocMacroNamesEntries, |