cmGeneratorExpressionDAGChecker: Construct with initializer list syntax

This commit is contained in:
Brad King 2025-02-22 07:22:58 -05:00
parent 67e551c414
commit 82151ea289
13 changed files with 122 additions and 82 deletions

View File

@ -500,9 +500,10 @@ std::string cmCommonTargetGenerator::GetLinkerLauncher(
std::string propName = lang + "_LINKER_LAUNCHER"; std::string propName = lang + "_LINKER_LAUNCHER";
cmValue launcherProp = this->GeneratorTarget->GetProperty(propName); cmValue launcherProp = this->GeneratorTarget->GetProperty(propName);
if (cmNonempty(launcherProp)) { if (cmNonempty(launcherProp)) {
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker{
this->GeneratorTarget, propName, nullptr, nullptr, this->GeneratorTarget, propName, nullptr, nullptr,
this->LocalCommonGenerator, config); this->LocalCommonGenerator, config,
};
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

@ -583,18 +583,18 @@ 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{ cmGeneratorExpressionDAGChecker dagChecker{
this->Target->GetBacktrace(), this->Target->GetBacktrace(),
this->Target, this->Target,
"LINK_LIBRARY_OVERRIDE", "LINK_LIBRARY_OVERRIDE",
nullptr, nullptr,
nullptr, nullptr,
this->Target->GetLocalGenerator(), this->Target->GetLocalGenerator(),
config config,
}; };
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, &dagChecker, this->Target, linkLanguage);
this->LinkLibraryOverride.emplace(item, overrideFeature); this->LinkLibraryOverride.emplace(item, overrideFeature);
} }
} }
@ -603,16 +603,18 @@ 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(), cmGeneratorExpressionDAGChecker dagChecker{
target, target->GetBacktrace(),
"LINK_LIBRARY_OVERRIDE", target,
nullptr, "LINK_LIBRARY_OVERRIDE",
nullptr, nullptr,
target->GetLocalGenerator(), nullptr,
config }; target->GetLocalGenerator(),
config,
};
auto overrideValue = cmGeneratorExpression::Evaluate( auto overrideValue = cmGeneratorExpression::Evaluate(
*linkLibraryOverride, target->GetLocalGenerator(), config, target, &dag, *linkLibraryOverride, target->GetLocalGenerator(), config, target,
target, linkLanguage); &dagChecker, target, linkLanguage);
auto overrideList = cmTokenize(overrideValue, ","_s); auto overrideList = cmTokenize(overrideValue, ","_s);
if (overrideList.size() >= 2) { if (overrideList.size() >= 2) {

View File

@ -79,9 +79,14 @@ std::string cmExportTryCompileFileGenerator::FindTargets(
tgt, "LINK_OPTIONS", nullptr, nullptr, tgt->GetLocalGenerator(), tgt, "LINK_OPTIONS", nullptr, nullptr, tgt->GetLocalGenerator(),
this->Config); this->Config);
} }
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker{
tgt, propName, nullptr, parentDagChecker.get(), tgt->GetLocalGenerator(), tgt,
this->Config); propName,
nullptr,
parentDagChecker.get(),
tgt->GetLocalGenerator(),
this->Config,
};
std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*prop); std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*prop);

View File

@ -422,10 +422,14 @@ const std::string& cmGeneratorExpressionInterpreter::Evaluate(
this->GeneratorExpression.Parse(std::move(expression)); this->GeneratorExpression.Parse(std::move(expression));
// Specify COMPILE_OPTIONS to DAGchecker, same semantic as COMPILE_FLAGS // Specify COMPILE_OPTIONS to DAGchecker, same semantic as COMPILE_FLAGS
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker{
this->HeadTarget, this->HeadTarget,
property == "COMPILE_FLAGS" ? "COMPILE_OPTIONS" : property, nullptr, property == "COMPILE_FLAGS" ? "COMPILE_OPTIONS" : property,
nullptr, this->LocalGenerator, this->Config); nullptr,
nullptr,
this->LocalGenerator,
this->Config,
};
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

@ -485,10 +485,15 @@ protected:
cmGeneratorExpressionDAGChecker* dagCheckerParent) const cmGeneratorExpressionDAGChecker* dagCheckerParent) const
{ {
if (context->HeadTarget) { if (context->HeadTarget) {
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker{
context->Backtrace, context->HeadTarget, context->Backtrace,
genexOperator + ":" + expression, content, dagCheckerParent, context->HeadTarget,
context->LG, context->Config); genexOperator + ":" + expression,
content,
dagCheckerParent,
context->LG,
context->Config,
};
switch (dagChecker.Check()) { switch (dagChecker.Check()) {
case cmGeneratorExpressionDAGChecker::SELF_REFERENCE: case cmGeneratorExpressionDAGChecker::SELF_REFERENCE:
case cmGeneratorExpressionDAGChecker::CYCLIC_REFERENCE: { case cmGeneratorExpressionDAGChecker::CYCLIC_REFERENCE: {
@ -2987,9 +2992,10 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
dagCheckerParent, usage)); dagCheckerParent, usage));
} }
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker{
context->Backtrace, target, propertyName, content, dagCheckerParent, context->Backtrace, target, propertyName, content,
context->LG, context->Config); dagCheckerParent, context->LG, context->Config,
};
switch (dagChecker.Check()) { switch (dagChecker.Check()) {
case cmGeneratorExpressionDAGChecker::SELF_REFERENCE: case cmGeneratorExpressionDAGChecker::SELF_REFERENCE:

View File

@ -711,8 +711,9 @@ std::string cmGeneratorTarget::GetLinkerTypeProperty(
std::string propName{ "LINKER_TYPE" }; std::string propName{ "LINKER_TYPE" };
auto linkerType = this->GetProperty(propName); auto linkerType = this->GetProperty(propName);
if (!linkerType.IsEmpty()) { if (!linkerType.IsEmpty()) {
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker{
this, propName, nullptr, nullptr, this->LocalGenerator, config); this, propName, nullptr, nullptr, this->LocalGenerator, config,
};
auto ltype = auto ltype =
cmGeneratorExpression::Evaluate(*linkerType, this->GetLocalGenerator(), cmGeneratorExpression::Evaluate(*linkerType, this->GetLocalGenerator(),
config, this, &dagChecker, this, lang); config, this, &dagChecker, this, lang);
@ -1176,9 +1177,10 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(
auto iter = this->SystemIncludesCache.find(key); auto iter = this->SystemIncludesCache.find(key);
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,
this->LocalGenerator, config); nullptr, this->LocalGenerator, config,
};
bool excludeImported = this->GetPropertyAsBool("NO_SYSTEM_FROM_IMPORTED"); bool excludeImported = this->GetPropertyAsBool("NO_SYSTEM_FROM_IMPORTED");
@ -1938,8 +1940,9 @@ void cmGeneratorTarget::GetAutoUicOptions(std::vector<std::string>& result,
return; return;
} }
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker{
this, "AUTOUIC_OPTIONS", nullptr, nullptr, this->LocalGenerator, config); this, "AUTOUIC_OPTIONS", nullptr, nullptr, this->LocalGenerator, config,
};
cmExpandList(cmGeneratorExpression::Evaluate(prop, this->LocalGenerator, cmExpandList(cmGeneratorExpression::Evaluate(prop, this->LocalGenerator,
config, this, &dagChecker), config, this, &dagChecker),
result); result);

View File

@ -47,13 +47,13 @@ std::string AddLangSpecificInterfaceIncludeDirectories(
const std::string& propertyName, IncludeDirectoryFallBack mode, const std::string& propertyName, IncludeDirectoryFallBack mode,
cmGeneratorExpressionDAGChecker* context) cmGeneratorExpressionDAGChecker* context)
{ {
cmGeneratorExpressionDAGChecker dag{ cmGeneratorExpressionDAGChecker dagChecker{
target->GetBacktrace(), target, propertyName, nullptr, context, target->GetBacktrace(), target, propertyName, nullptr, context,
target->GetLocalGenerator(), config target->GetLocalGenerator(), config,
}; };
switch (dag.Check()) { switch (dagChecker.Check()) {
case cmGeneratorExpressionDAGChecker::SELF_REFERENCE: case cmGeneratorExpressionDAGChecker::SELF_REFERENCE:
dag.ReportError( dagChecker.ReportError(
nullptr, "$<TARGET_PROPERTY:" + target->GetName() + ",propertyName"); nullptr, "$<TARGET_PROPERTY:" + target->GetName() + ",propertyName");
CM_FALLTHROUGH; CM_FALLTHROUGH;
case cmGeneratorExpressionDAGChecker::CYCLIC_REFERENCE: case cmGeneratorExpressionDAGChecker::CYCLIC_REFERENCE:
@ -100,9 +100,9 @@ void AddLangSpecificImplicitIncludeDirectories(
{ {
if (const auto* libraries = if (const auto* libraries =
target->GetLinkImplementationLibraries(config, UseTo::Compile)) { target->GetLinkImplementationLibraries(config, UseTo::Compile)) {
cmGeneratorExpressionDAGChecker dag{ cmGeneratorExpressionDAGChecker dagChecker{
target->GetBacktrace(), target, propertyName, nullptr, nullptr, target->GetBacktrace(), target, propertyName, nullptr, nullptr,
target->GetLocalGenerator(), config target->GetLocalGenerator(), config,
}; };
for (const cmLinkImplItem& library : libraries->Libraries) { for (const cmLinkImplItem& library : libraries->Libraries) {
@ -128,10 +128,10 @@ void AddLangSpecificImplicitIncludeDirectories(
} }
} }
cmExpandList( cmExpandList(AddLangSpecificInterfaceIncludeDirectories(
AddLangSpecificInterfaceIncludeDirectories( target, dependency, lang, config, propertyName, mode,
target, dependency, lang, config, propertyName, mode, &dag), &dagChecker),
entry.Values); entry.Values);
entries.Entries.emplace_back(std::move(entry)); entries.Entries.emplace_back(std::move(entry));
} }
} }
@ -257,9 +257,10 @@ 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,
this->LocalGenerator, config); nullptr, this->LocalGenerator, config,
};
cmList debugProperties{ this->Makefile->GetDefinition( cmList debugProperties{ this->Makefile->GetDefinition(
"CMAKE_DEBUG_TARGET_PROPERTIES") }; "CMAKE_DEBUG_TARGET_PROPERTIES") };

View File

@ -564,8 +564,9 @@ void cmGeneratorTarget::ExpandLinkItems(std::string const& prop,
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->LocalGenerator, config); this, prop, nullptr, nullptr, this->LocalGenerator, config,
};
// 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.
@ -1320,8 +1321,9 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
// Collect libraries directly linked in this configuration. // Collect libraries directly linked in this configuration.
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( cmGeneratorExpressionDAGChecker dagChecker{
this, "LINK_LIBRARIES", nullptr, nullptr, this->LocalGenerator, config); this, "LINK_LIBRARIES", nullptr, nullptr, this->LocalGenerator, config,
};
// 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 (usage == UseTo::Compile) { if (usage == UseTo::Compile) {

View File

@ -125,8 +125,9 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetLinkDirectories(
std::vector<BT<std::string>> result; std::vector<BT<std::string>> result;
std::unordered_set<std::string> uniqueDirectories; std::unordered_set<std::string> uniqueDirectories;
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker{
this, "LINK_DIRECTORIES", nullptr, nullptr, this->LocalGenerator, config); this, "LINK_DIRECTORIES", nullptr, nullptr, this->LocalGenerator, config,
};
cmList debugProperties{ this->Makefile->GetDefinition( cmList debugProperties{ this->Makefile->GetDefinition(
"CMAKE_DEBUG_TARGET_PROPERTIES") }; "CMAKE_DEBUG_TARGET_PROPERTIES") };

View File

@ -217,8 +217,9 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetCompileOptions(
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( cmGeneratorExpressionDAGChecker dagChecker{
this, "COMPILE_OPTIONS", nullptr, nullptr, this->LocalGenerator, config); this, "COMPILE_OPTIONS", nullptr, nullptr, this->LocalGenerator, config,
};
cmList debugProperties{ this->Makefile->GetDefinition( cmList debugProperties{ this->Makefile->GetDefinition(
"CMAKE_DEBUG_TARGET_PROPERTIES") }; "CMAKE_DEBUG_TARGET_PROPERTIES") };
@ -258,8 +259,9 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetCompileFeatures(
std::vector<BT<std::string>> result; std::vector<BT<std::string>> result;
std::unordered_set<std::string> uniqueFeatures; std::unordered_set<std::string> uniqueFeatures;
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker{
this, "COMPILE_FEATURES", nullptr, nullptr, this->LocalGenerator, config); this, "COMPILE_FEATURES", nullptr, nullptr, this->LocalGenerator, config,
};
cmList debugProperties{ this->Makefile->GetDefinition( cmList debugProperties{ this->Makefile->GetDefinition(
"CMAKE_DEBUG_TARGET_PROPERTIES") }; "CMAKE_DEBUG_TARGET_PROPERTIES") };
@ -308,9 +310,10 @@ 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,
this->LocalGenerator, config); nullptr, this->LocalGenerator, config,
};
cmList debugProperties{ this->Makefile->GetDefinition( cmList debugProperties{ this->Makefile->GetDefinition(
"CMAKE_DEBUG_TARGET_PROPERTIES") }; "CMAKE_DEBUG_TARGET_PROPERTIES") };
@ -373,9 +376,9 @@ 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, config,
this->LocalGenerator, config); };
cmList debugProperties{ this->Makefile->GetDefinition( cmList debugProperties{ this->Makefile->GetDefinition(
"CMAKE_DEBUG_TARGET_PROPERTIES") }; "CMAKE_DEBUG_TARGET_PROPERTIES") };
@ -432,8 +435,9 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetLinkOptions(
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( cmGeneratorExpressionDAGChecker dagChecker{
this, "LINK_OPTIONS", nullptr, nullptr, this->LocalGenerator, config); this, "LINK_OPTIONS", nullptr, nullptr, this->LocalGenerator, config,
};
cmList debugProperties{ this->Makefile->GetDefinition( cmList debugProperties{ this->Makefile->GetDefinition(
"CMAKE_DEBUG_TARGET_PROPERTIES") }; "CMAKE_DEBUG_TARGET_PROPERTIES") };
@ -601,9 +605,10 @@ 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,
this->LocalGenerator, config); nullptr, this->LocalGenerator, config,
};
EvaluatedTargetPropertyEntries entries; EvaluatedTargetPropertyEntries entries;
if (cmValue linkOptions = this->GetProperty("STATIC_LIBRARY_OPTIONS")) { if (cmValue linkOptions = this->GetProperty("STATIC_LIBRARY_OPTIONS")) {
@ -634,8 +639,9 @@ 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( cmGeneratorExpressionDAGChecker dagChecker{
this, "LINK_DEPENDS", nullptr, nullptr, this->LocalGenerator, config); this, "LINK_DEPENDS", nullptr, nullptr, this->LocalGenerator, config,
};
EvaluatedTargetPropertyEntries entries; EvaluatedTargetPropertyEntries entries;
if (cmValue linkDepends = this->GetProperty("LINK_DEPENDS")) { if (cmValue linkDepends = this->GetProperty("LINK_DEPENDS")) {

View File

@ -264,8 +264,9 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetSourceFilePaths(
this->DebugSourcesDone = true; this->DebugSourcesDone = true;
} }
cmGeneratorExpressionDAGChecker dagChecker(this, "SOURCES", nullptr, nullptr, cmGeneratorExpressionDAGChecker dagChecker{
this->LocalGenerator, config); this, "SOURCES", nullptr, nullptr, this->LocalGenerator, config,
};
EvaluatedTargetPropertyEntries entries = EvaluateTargetPropertyEntries( EvaluatedTargetPropertyEntries entries = EvaluateTargetPropertyEntries(
this, config, std::string(), &dagChecker, this->SourceEntries); this, config, std::string(), &dagChecker, this->SourceEntries);

View File

@ -109,9 +109,15 @@ std::string cmGeneratorTarget::EvaluateInterfaceProperty(
// Evaluate $<TARGET_PROPERTY:this,prop> as if it were compiled. This is // Evaluate $<TARGET_PROPERTY:this,prop> as if it were compiled. This is
// 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( cmGeneratorExpressionDAGChecker dagChecker{
context->Backtrace, this, prop, nullptr, dagCheckerParent, context->Backtrace,
this->LocalGenerator, context->Config); this,
prop,
nullptr,
dagCheckerParent,
this->LocalGenerator,
context->Config,
};
switch (dagChecker.Check()) { switch (dagChecker.Check()) {
case cmGeneratorExpressionDAGChecker::SELF_REFERENCE: case cmGeneratorExpressionDAGChecker::SELF_REFERENCE:
dagChecker.ReportError( dagChecker.ReportError(

View File

@ -1923,9 +1923,10 @@ bool cmQtAutoGenInitializer::SetupWriteAutogenInfo()
if (this->MultiConfig) { if (this->MultiConfig) {
for (auto const& cfg : this->ConfigsList) { for (auto const& cfg : this->ConfigsList) {
if (!cfg.empty()) { if (!cfg.empty()) {
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker{
this->GenTarget, "AUTOMOC_MACRO_NAMES", nullptr, nullptr, this->GenTarget, "AUTOMOC_MACRO_NAMES", nullptr,
this->LocalGen, cfg); nullptr, this->LocalGen, cfg,
};
AddInterfaceEntries(this->GenTarget, cfg, AddInterfaceEntries(this->GenTarget, cfg,
"INTERFACE_AUTOMOC_MACRO_NAMES", "CXX", "INTERFACE_AUTOMOC_MACRO_NAMES", "CXX",
&dagChecker, InterfaceAutoMocMacroNamesEntries, &dagChecker, InterfaceAutoMocMacroNamesEntries,
@ -1933,9 +1934,10 @@ bool cmQtAutoGenInitializer::SetupWriteAutogenInfo()
} }
} }
} else { } else {
cmGeneratorExpressionDAGChecker dagChecker( cmGeneratorExpressionDAGChecker dagChecker{
this->GenTarget, "AUTOMOC_MACRO_NAMES", nullptr, nullptr, this->GenTarget, "AUTOMOC_MACRO_NAMES", nullptr,
this->LocalGen, this->ConfigDefault); nullptr, this->LocalGen, this->ConfigDefault,
};
AddInterfaceEntries(this->GenTarget, this->ConfigDefault, AddInterfaceEntries(this->GenTarget, this->ConfigDefault,
"INTERFACE_AUTOMOC_MACRO_NAMES", "CXX", &dagChecker, "INTERFACE_AUTOMOC_MACRO_NAMES", "CXX", &dagChecker,
InterfaceAutoMocMacroNamesEntries, InterfaceAutoMocMacroNamesEntries,