1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-20 12:53:55 +08:00

cmGeneratorExpressionDAGChecker: Make local generator available in constructor

This is the local generator in the evaluation context, not that of
the current target/property pair.
This commit is contained in:
Brad King
2024-04-25 15:30:49 -04:00
parent b36fb3f6f1
commit e8010b67c7
9 changed files with 70 additions and 47 deletions

View File

@@ -501,7 +501,8 @@ std::string cmCommonTargetGenerator::GetLinkerLauncher(
cmValue launcherProp = this->GeneratorTarget->GetProperty(propName); cmValue launcherProp = this->GeneratorTarget->GetProperty(propName);
if (cmNonempty(launcherProp)) { if (cmNonempty(launcherProp)) {
cmGeneratorExpressionDAGChecker dagChecker(this->GeneratorTarget, propName, cmGeneratorExpressionDAGChecker dagChecker(this->GeneratorTarget, propName,
nullptr, nullptr); nullptr, nullptr,
this->LocalCommonGenerator);
std::string evaluatedLinklauncher = cmGeneratorExpression::Evaluate( std::string evaluatedLinklauncher = cmGeneratorExpression::Evaluate(
*launcherProp, this->LocalCommonGenerator, config, this->GeneratorTarget, *launcherProp, this->LocalCommonGenerator, config, this->GeneratorTarget,
&dagChecker, this->GeneratorTarget, lang); &dagChecker, this->GeneratorTarget, lang);

View File

@@ -451,10 +451,14 @@ cmComputeLinkDepends::cmComputeLinkDepends(const cmGeneratorTarget* target,
if (cmValue feature = this->Target->GetProperty(key)) { if (cmValue feature = this->Target->GetProperty(key)) {
if (!feature->empty() && key.length() > lloPrefix.length()) { if (!feature->empty() && key.length() > lloPrefix.length()) {
auto item = key.substr(lloPrefix.length()); auto item = key.substr(lloPrefix.length());
cmGeneratorExpressionDAGChecker dag{ this->Target->GetBacktrace(), cmGeneratorExpressionDAGChecker dag{
this->Target->GetBacktrace(),
this->Target, this->Target,
"LINK_LIBRARY_OVERRIDE", "LINK_LIBRARY_OVERRIDE",
nullptr, nullptr }; nullptr,
nullptr,
this->Target->GetLocalGenerator()
};
auto overrideFeature = cmGeneratorExpression::Evaluate( auto overrideFeature = cmGeneratorExpression::Evaluate(
*feature, this->Target->GetLocalGenerator(), config, *feature, this->Target->GetLocalGenerator(), config,
this->Target, &dag, this->Target, linkLanguage); this->Target, &dag, this->Target, linkLanguage);
@@ -466,9 +470,12 @@ cmComputeLinkDepends::cmComputeLinkDepends(const cmGeneratorTarget* target,
// global override property // global override property
if (cmValue linkLibraryOverride = if (cmValue linkLibraryOverride =
this->Target->GetProperty("LINK_LIBRARY_OVERRIDE")) { this->Target->GetProperty("LINK_LIBRARY_OVERRIDE")) {
cmGeneratorExpressionDAGChecker dag{ target->GetBacktrace(), target, cmGeneratorExpressionDAGChecker dag{ target->GetBacktrace(),
"LINK_LIBRARY_OVERRIDE", nullptr, target,
nullptr }; "LINK_LIBRARY_OVERRIDE",
nullptr,
nullptr,
target->GetLocalGenerator() };
auto overrideValue = cmGeneratorExpression::Evaluate( auto overrideValue = cmGeneratorExpression::Evaluate(
*linkLibraryOverride, target->GetLocalGenerator(), config, target, &dag, *linkLibraryOverride, target->GetLocalGenerator(), config, target, &dag,
target, linkLanguage); target, linkLanguage);

View File

@@ -76,10 +76,10 @@ std::string cmExportTryCompileFileGenerator::FindTargets(
// To please constraint checks of DAGChecker, this property must have // To please constraint checks of DAGChecker, this property must have
// LINK_OPTIONS property as parent // LINK_OPTIONS property as parent
parentDagChecker = cm::make_unique<cmGeneratorExpressionDAGChecker>( parentDagChecker = cm::make_unique<cmGeneratorExpressionDAGChecker>(
tgt, "LINK_OPTIONS", nullptr, nullptr); tgt, "LINK_OPTIONS", nullptr, nullptr, tgt->GetLocalGenerator());
} }
cmGeneratorExpressionDAGChecker dagChecker(tgt, propName, nullptr, cmGeneratorExpressionDAGChecker dagChecker(
parentDagChecker.get()); tgt, propName, nullptr, parentDagChecker.get(), tgt->GetLocalGenerator());
std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*prop); std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*prop);

View File

@@ -425,7 +425,7 @@ const std::string& cmGeneratorExpressionInterpreter::Evaluate(
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker(
this->HeadTarget, this->HeadTarget,
property == "COMPILE_FLAGS" ? "COMPILE_OPTIONS" : property, nullptr, property == "COMPILE_FLAGS" ? "COMPILE_OPTIONS" : property, nullptr,
nullptr); nullptr, this->LocalGenerator);
return this->CompiledGeneratorExpression->Evaluate( return this->CompiledGeneratorExpression->Evaluate(
this->LocalGenerator, this->Config, this->HeadTarget, &dagChecker, nullptr, this->LocalGenerator, this->Config, this->HeadTarget, &dagChecker, nullptr,

View File

@@ -20,16 +20,17 @@
cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker( cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker(
cmGeneratorTarget const* target, std::string property, cmGeneratorTarget const* target, std::string property,
const GeneratorExpressionContent* content, const GeneratorExpressionContent* content,
cmGeneratorExpressionDAGChecker* parent) cmGeneratorExpressionDAGChecker* parent, cmLocalGenerator const* contextLG)
: cmGeneratorExpressionDAGChecker(cmListFileBacktrace(), target, : cmGeneratorExpressionDAGChecker(cmListFileBacktrace(), target,
std::move(property), content, parent) std::move(property), content, parent,
contextLG)
{ {
} }
cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker( cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker(
cmListFileBacktrace backtrace, cmGeneratorTarget const* target, cmListFileBacktrace backtrace, cmGeneratorTarget const* target,
std::string property, const GeneratorExpressionContent* content, std::string property, const GeneratorExpressionContent* content,
cmGeneratorExpressionDAGChecker* parent) cmGeneratorExpressionDAGChecker* parent, cmLocalGenerator const* contextLG)
: Parent(parent) : Parent(parent)
, Top(parent ? parent->Top : this) , Top(parent ? parent->Top : this)
, Target(target) , Target(target)
@@ -37,6 +38,7 @@ cmGeneratorExpressionDAGChecker::cmGeneratorExpressionDAGChecker(
, Content(content) , Content(content)
, Backtrace(std::move(backtrace)) , Backtrace(std::move(backtrace))
{ {
static_cast<void>(contextLG);
if (parent) { if (parent) {
this->TopIsTransitiveProperty = parent->TopIsTransitiveProperty; this->TopIsTransitiveProperty = parent->TopIsTransitiveProperty;
} else { } else {

View File

@@ -13,6 +13,7 @@
struct GeneratorExpressionContent; struct GeneratorExpressionContent;
struct cmGeneratorExpressionContext; struct cmGeneratorExpressionContext;
class cmGeneratorTarget; class cmGeneratorTarget;
class cmLocalGenerator;
#define CM_SELECT_BOTH(F, A1, A2) F(A1, A2) #define CM_SELECT_BOTH(F, A1, A2) F(A1, A2)
#define CM_SELECT_FIRST(F, A1, A2) F(A1) #define CM_SELECT_FIRST(F, A1, A2) F(A1)
@@ -47,11 +48,13 @@ struct cmGeneratorExpressionDAGChecker
cmGeneratorTarget const* target, cmGeneratorTarget const* target,
std::string property, std::string property,
const GeneratorExpressionContent* content, const GeneratorExpressionContent* content,
cmGeneratorExpressionDAGChecker* parent); cmGeneratorExpressionDAGChecker* parent,
cmLocalGenerator const* contextLG);
cmGeneratorExpressionDAGChecker(cmGeneratorTarget const* target, cmGeneratorExpressionDAGChecker(cmGeneratorTarget const* target,
std::string property, std::string property,
const GeneratorExpressionContent* content, const GeneratorExpressionContent* content,
cmGeneratorExpressionDAGChecker* parent); cmGeneratorExpressionDAGChecker* parent,
cmLocalGenerator const* contextLG);
enum Result enum Result
{ {

View File

@@ -487,7 +487,8 @@ protected:
if (context->HeadTarget) { if (context->HeadTarget) {
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker(
context->Backtrace, context->HeadTarget, context->Backtrace, context->HeadTarget,
genexOperator + ":" + expression, content, dagCheckerParent); genexOperator + ":" + expression, content, dagCheckerParent,
context->LG);
switch (dagChecker.Check()) { switch (dagChecker.Check()) {
case cmGeneratorExpressionDAGChecker::SELF_REFERENCE: case cmGeneratorExpressionDAGChecker::SELF_REFERENCE:
case cmGeneratorExpressionDAGChecker::CYCLIC_REFERENCE: { case cmGeneratorExpressionDAGChecker::CYCLIC_REFERENCE: {
@@ -2927,8 +2928,9 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
cmGeneratorTarget::LinkInterfaceFor::Usage)); cmGeneratorTarget::LinkInterfaceFor::Usage));
} }
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker(context->Backtrace, target,
context->Backtrace, target, propertyName, content, dagCheckerParent); propertyName, content,
dagCheckerParent, context->LG);
switch (dagChecker.Check()) { switch (dagChecker.Check()) {
case cmGeneratorExpressionDAGChecker::SELF_REFERENCE: case cmGeneratorExpressionDAGChecker::SELF_REFERENCE:

View File

@@ -877,7 +877,7 @@ std::string cmGeneratorTarget::GetLinkerTypeProperty(
auto linkerType = this->GetProperty(propName); auto linkerType = this->GetProperty(propName);
if (!linkerType.IsEmpty()) { if (!linkerType.IsEmpty()) {
cmGeneratorExpressionDAGChecker dagChecker(this, propName, nullptr, cmGeneratorExpressionDAGChecker dagChecker(this, propName, nullptr,
nullptr); nullptr, this->LocalGenerator);
auto ltype = auto ltype =
cmGeneratorExpression::Evaluate(*linkerType, this->GetLocalGenerator(), cmGeneratorExpression::Evaluate(*linkerType, this->GetLocalGenerator(),
config, this, &dagChecker, this, lang); config, this, &dagChecker, this, lang);
@@ -1342,7 +1342,8 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(
if (iter == this->SystemIncludesCache.end()) { if (iter == this->SystemIncludesCache.end()) {
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker(
this, "SYSTEM_INCLUDE_DIRECTORIES", nullptr, nullptr); this, "SYSTEM_INCLUDE_DIRECTORIES", nullptr, nullptr,
this->LocalGenerator);
bool excludeImported = this->GetPropertyAsBool("NO_SYSTEM_FROM_IMPORTED"); bool excludeImported = this->GetPropertyAsBool("NO_SYSTEM_FROM_IMPORTED");
@@ -1450,7 +1451,8 @@ std::string cmGeneratorTarget::EvaluateInterfaceProperty(
// a subset of TargetPropertyNode::Evaluate without stringify/parse steps // a subset of TargetPropertyNode::Evaluate without stringify/parse steps
// but sufficient for transitive interface properties. // but sufficient for transitive interface properties.
cmGeneratorExpressionDAGChecker dagChecker(context->Backtrace, this, prop, cmGeneratorExpressionDAGChecker dagChecker(context->Backtrace, this, prop,
nullptr, dagCheckerParent); nullptr, dagCheckerParent,
this->LocalGenerator);
switch (dagChecker.Check()) { switch (dagChecker.Check()) {
case cmGeneratorExpressionDAGChecker::SELF_REFERENCE: case cmGeneratorExpressionDAGChecker::SELF_REFERENCE:
dagChecker.ReportError( dagChecker.ReportError(
@@ -1529,8 +1531,10 @@ std::string AddLangSpecificInterfaceIncludeDirectories(
const std::string& propertyName, IncludeDirectoryFallBack mode, const std::string& propertyName, IncludeDirectoryFallBack mode,
cmGeneratorExpressionDAGChecker* context) cmGeneratorExpressionDAGChecker* context)
{ {
cmGeneratorExpressionDAGChecker dag{ target->GetBacktrace(), target, cmGeneratorExpressionDAGChecker dag{
propertyName, nullptr, context }; target->GetBacktrace(), target, propertyName, nullptr, context,
target->GetLocalGenerator()
};
switch (dag.Check()) { switch (dag.Check()) {
case cmGeneratorExpressionDAGChecker::SELF_REFERENCE: case cmGeneratorExpressionDAGChecker::SELF_REFERENCE:
dag.ReportError( dag.ReportError(
@@ -1580,8 +1584,10 @@ void AddLangSpecificImplicitIncludeDirectories(
{ {
if (const auto* libraries = target->GetLinkImplementationLibraries( if (const auto* libraries = target->GetLinkImplementationLibraries(
config, LinkInterfaceFor::Usage)) { config, LinkInterfaceFor::Usage)) {
cmGeneratorExpressionDAGChecker dag{ target->GetBacktrace(), target, cmGeneratorExpressionDAGChecker dag{
propertyName, nullptr, nullptr }; target->GetBacktrace(), target, propertyName, nullptr, nullptr,
target->GetLocalGenerator()
};
for (const cmLinkImplItem& library : libraries->Libraries) { for (const cmLinkImplItem& library : libraries->Libraries) {
if (const cmGeneratorTarget* dependency = library.Target) { if (const cmGeneratorTarget* dependency = library.Target) {
@@ -1833,8 +1839,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetSourceFilePaths(
this->DebugSourcesDone = true; this->DebugSourcesDone = true;
} }
cmGeneratorExpressionDAGChecker dagChecker(this, "SOURCES", nullptr, cmGeneratorExpressionDAGChecker dagChecker(this, "SOURCES", nullptr, nullptr,
nullptr); this->LocalGenerator);
EvaluatedTargetPropertyEntries entries = EvaluateTargetPropertyEntries( EvaluatedTargetPropertyEntries entries = EvaluateTargetPropertyEntries(
this, config, std::string(), &dagChecker, this->SourceEntries); this, config, std::string(), &dagChecker, this->SourceEntries);
@@ -3048,7 +3054,7 @@ void cmGeneratorTarget::GetAutoUicOptions(std::vector<std::string>& result,
} }
cmGeneratorExpressionDAGChecker dagChecker(this, "AUTOUIC_OPTIONS", nullptr, cmGeneratorExpressionDAGChecker dagChecker(this, "AUTOUIC_OPTIONS", nullptr,
nullptr); nullptr, this->LocalGenerator);
cmExpandList(cmGeneratorExpression::Evaluate(prop, this->LocalGenerator, cmExpandList(cmGeneratorExpression::Evaluate(prop, this->LocalGenerator,
config, this, &dagChecker), config, this, &dagChecker),
result); result);
@@ -3848,8 +3854,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetIncludeDirectories(
std::vector<BT<std::string>> includes; std::vector<BT<std::string>> includes;
std::unordered_set<std::string> uniqueIncludes; std::unordered_set<std::string> uniqueIncludes;
cmGeneratorExpressionDAGChecker dagChecker(this, "INCLUDE_DIRECTORIES", cmGeneratorExpressionDAGChecker dagChecker(
nullptr, nullptr); this, "INCLUDE_DIRECTORIES", nullptr, nullptr, this->LocalGenerator);
cmList debugProperties{ this->Makefile->GetDefinition( cmList debugProperties{ this->Makefile->GetDefinition(
"CMAKE_DEBUG_TARGET_PROPERTIES") }; "CMAKE_DEBUG_TARGET_PROPERTIES") };
@@ -4113,7 +4119,7 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetCompileOptions(
std::unordered_set<std::string> uniqueOptions; std::unordered_set<std::string> uniqueOptions;
cmGeneratorExpressionDAGChecker dagChecker(this, "COMPILE_OPTIONS", nullptr, cmGeneratorExpressionDAGChecker dagChecker(this, "COMPILE_OPTIONS", nullptr,
nullptr); nullptr, this->LocalGenerator);
cmList debugProperties{ this->Makefile->GetDefinition( cmList debugProperties{ this->Makefile->GetDefinition(
"CMAKE_DEBUG_TARGET_PROPERTIES") }; "CMAKE_DEBUG_TARGET_PROPERTIES") };
@@ -4154,7 +4160,7 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetCompileFeatures(
std::unordered_set<std::string> uniqueFeatures; std::unordered_set<std::string> uniqueFeatures;
cmGeneratorExpressionDAGChecker dagChecker(this, "COMPILE_FEATURES", nullptr, cmGeneratorExpressionDAGChecker dagChecker(this, "COMPILE_FEATURES", nullptr,
nullptr); nullptr, this->LocalGenerator);
cmList debugProperties{ this->Makefile->GetDefinition( cmList debugProperties{ this->Makefile->GetDefinition(
"CMAKE_DEBUG_TARGET_PROPERTIES") }; "CMAKE_DEBUG_TARGET_PROPERTIES") };
@@ -4203,8 +4209,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetCompileDefinitions(
std::vector<BT<std::string>> list; std::vector<BT<std::string>> list;
std::unordered_set<std::string> uniqueOptions; std::unordered_set<std::string> uniqueOptions;
cmGeneratorExpressionDAGChecker dagChecker(this, "COMPILE_DEFINITIONS", cmGeneratorExpressionDAGChecker dagChecker(
nullptr, nullptr); this, "COMPILE_DEFINITIONS", nullptr, nullptr, this->LocalGenerator);
cmList debugProperties{ this->Makefile->GetDefinition( cmList debugProperties{ this->Makefile->GetDefinition(
"CMAKE_DEBUG_TARGET_PROPERTIES") }; "CMAKE_DEBUG_TARGET_PROPERTIES") };
@@ -4267,8 +4273,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetPrecompileHeaders(
} }
std::unordered_set<std::string> uniqueOptions; std::unordered_set<std::string> uniqueOptions;
cmGeneratorExpressionDAGChecker dagChecker(this, "PRECOMPILE_HEADERS", cmGeneratorExpressionDAGChecker dagChecker(
nullptr, nullptr); this, "PRECOMPILE_HEADERS", nullptr, nullptr, this->LocalGenerator);
cmList debugProperties{ this->Makefile->GetDefinition( cmList debugProperties{ this->Makefile->GetDefinition(
"CMAKE_DEBUG_TARGET_PROPERTIES") }; "CMAKE_DEBUG_TARGET_PROPERTIES") };
@@ -4657,7 +4663,7 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetLinkOptions(
std::unordered_set<std::string> uniqueOptions; std::unordered_set<std::string> uniqueOptions;
cmGeneratorExpressionDAGChecker dagChecker(this, "LINK_OPTIONS", nullptr, cmGeneratorExpressionDAGChecker dagChecker(this, "LINK_OPTIONS", nullptr,
nullptr); nullptr, this->LocalGenerator);
cmList debugProperties{ this->Makefile->GetDefinition( cmList debugProperties{ this->Makefile->GetDefinition(
"CMAKE_DEBUG_TARGET_PROPERTIES") }; "CMAKE_DEBUG_TARGET_PROPERTIES") };
@@ -4825,8 +4831,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetStaticLibraryLinkOptions(
std::vector<BT<std::string>> result; std::vector<BT<std::string>> result;
std::unordered_set<std::string> uniqueOptions; std::unordered_set<std::string> uniqueOptions;
cmGeneratorExpressionDAGChecker dagChecker(this, "STATIC_LIBRARY_OPTIONS", cmGeneratorExpressionDAGChecker dagChecker(
nullptr, nullptr); this, "STATIC_LIBRARY_OPTIONS", nullptr, nullptr, this->LocalGenerator);
EvaluatedTargetPropertyEntries entries; EvaluatedTargetPropertyEntries entries;
if (cmValue linkOptions = this->GetProperty("STATIC_LIBRARY_OPTIONS")) { if (cmValue linkOptions = this->GetProperty("STATIC_LIBRARY_OPTIONS")) {
@@ -4939,7 +4945,7 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetLinkDirectories(
std::unordered_set<std::string> uniqueDirectories; std::unordered_set<std::string> uniqueDirectories;
cmGeneratorExpressionDAGChecker dagChecker(this, "LINK_DIRECTORIES", nullptr, cmGeneratorExpressionDAGChecker dagChecker(this, "LINK_DIRECTORIES", nullptr,
nullptr); nullptr, this->LocalGenerator);
cmList debugProperties{ this->Makefile->GetDefinition( cmList debugProperties{ this->Makefile->GetDefinition(
"CMAKE_DEBUG_TARGET_PROPERTIES") }; "CMAKE_DEBUG_TARGET_PROPERTIES") };
@@ -4983,7 +4989,7 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetLinkDepends(
std::vector<BT<std::string>> result; std::vector<BT<std::string>> result;
std::unordered_set<std::string> uniqueOptions; std::unordered_set<std::string> uniqueOptions;
cmGeneratorExpressionDAGChecker dagChecker(this, "LINK_DEPENDS", nullptr, cmGeneratorExpressionDAGChecker dagChecker(this, "LINK_DEPENDS", nullptr,
nullptr); nullptr, this->LocalGenerator);
EvaluatedTargetPropertyEntries entries; EvaluatedTargetPropertyEntries entries;
if (cmValue linkDepends = this->GetProperty("LINK_DEPENDS")) { if (cmValue linkDepends = this->GetProperty("LINK_DEPENDS")) {
@@ -6969,7 +6975,8 @@ void cmGeneratorTarget::ExpandLinkItems(
return; return;
} }
// Keep this logic in sync with ComputeLinkImplementationLibraries. // Keep this logic in sync with ComputeLinkImplementationLibraries.
cmGeneratorExpressionDAGChecker dagChecker(this, prop, nullptr, nullptr); cmGeneratorExpressionDAGChecker dagChecker(this, prop, nullptr, nullptr,
this->LocalGenerator);
// The $<LINK_ONLY> expression may be in a link interface to specify // The $<LINK_ONLY> expression may be in a link interface to specify
// private link dependencies that are otherwise excluded from usage // private link dependencies that are otherwise excluded from usage
// requirements. // requirements.
@@ -8640,7 +8647,7 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
for (auto const& entry : entryRange) { for (auto const& entry : entryRange) {
// Keep this logic in sync with ExpandLinkItems. // Keep this logic in sync with ExpandLinkItems.
cmGeneratorExpressionDAGChecker dagChecker(this, "LINK_LIBRARIES", nullptr, cmGeneratorExpressionDAGChecker dagChecker(this, "LINK_LIBRARIES", nullptr,
nullptr); nullptr, this->LocalGenerator);
// The $<LINK_ONLY> expression may be used to specify link dependencies // The $<LINK_ONLY> expression may be used to specify link dependencies
// that are otherwise excluded from usage requirements. // that are otherwise excluded from usage requirements.
if (implFor == LinkInterfaceFor::Usage) { if (implFor == LinkInterfaceFor::Usage) {

View File

@@ -1918,8 +1918,9 @@ bool cmQtAutoGenInitializer::SetupWriteAutogenInfo()
info.SetBool("MOC_RELAXED_MODE", this->Moc.RelaxedMode); info.SetBool("MOC_RELAXED_MODE", this->Moc.RelaxedMode);
info.SetBool("MOC_PATH_PREFIX", this->Moc.PathPrefix); info.SetBool("MOC_PATH_PREFIX", this->Moc.PathPrefix);
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker(this->GenTarget,
this->GenTarget, "AUTOMOC_MACRO_NAMES", nullptr, nullptr); "AUTOMOC_MACRO_NAMES", nullptr,
nullptr, this->LocalGen);
EvaluatedTargetPropertyEntries InterfaceAutoMocMacroNamesEntries; EvaluatedTargetPropertyEntries InterfaceAutoMocMacroNamesEntries;
if (this->MultiConfig) { if (this->MultiConfig) {