diff options
author | Brad King <brad.king@kitware.com> | 2020-05-12 15:20:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-05-12 16:37:13 (GMT) |
commit | fcd1a1a920ed68b06bc082e435b622a8532ac079 (patch) | |
tree | a9f5a8c3fc34e74826b56f48369eb4549d6ce1c5 /Source/cmGeneratorTarget.cxx | |
parent | 4dc95526868d903c7f9e9505001cb5dbeec259c0 (diff) | |
download | CMake-fcd1a1a920ed68b06bc082e435b622a8532ac079.zip CMake-fcd1a1a920ed68b06bc082e435b622a8532ac079.tar.gz CMake-fcd1a1a920ed68b06bc082e435b622a8532ac079.tar.bz2 |
cmGeneratorTarget: Track when the set of link libs is config-dependent
Report in `cmLinkImplementationLibraries` and `cmLinkInterfaceLibraries`
whether the list of libraries depends on a genex referencing the
configuration. We already track whether a genex references the head
target.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 62427f6..0381bd9 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -5885,6 +5885,7 @@ void cmGeneratorTarget::ExpandLinkItems( std::string const& prop, std::string const& value, std::string const& config, cmGeneratorTarget const* headTarget, bool usage_requirements_only, std::vector<cmLinkItem>& items, bool& hadHeadSensitiveCondition, + bool& hadContextSensitiveCondition, bool& hadLinkLanguageSensitiveCondition) const { // Keep this logic in sync with ComputeLinkImplementationLibraries. @@ -5903,6 +5904,7 @@ void cmGeneratorTarget::ExpandLinkItems( libs); this->LookupLinkItems(libs, cge->GetBacktrace(), items); hadHeadSensitiveCondition = cge->GetHadHeadSensitiveCondition(); + hadContextSensitiveCondition = cge->GetHadContextSensitiveCondition(); hadLinkLanguageSensitiveCondition = cge->GetHadLinkLanguageSensitiveCondition(); } @@ -6407,6 +6409,7 @@ void cmGeneratorTarget::ComputeLinkInterfaceLibraries( this->ExpandLinkItems(linkIfaceProp, *explicitLibraries, config, headTarget, usage_requirements_only, iface.Libraries, iface.HadHeadSensitiveCondition, + iface.HadContextSensitiveCondition, iface.HadLinkLanguageSensitiveCondition); } else if (!cmp0022NEW) // If CMP0022 is NEW then the plain tll signature sets the @@ -6427,10 +6430,12 @@ void cmGeneratorTarget::ComputeLinkInterfaceLibraries( static const std::string newProp = "INTERFACE_LINK_LIBRARIES"; if (cmProp newExplicitLibraries = this->GetProperty(newProp)) { bool hadHeadSensitiveConditionDummy = false; + bool hadContextSensitiveConditionDummy = false; bool hadLinkLanguageSensitiveConditionDummy = false; this->ExpandLinkItems(newProp, *newExplicitLibraries, config, headTarget, usage_requirements_only, ifaceLibs, hadHeadSensitiveConditionDummy, + hadContextSensitiveConditionDummy, hadLinkLanguageSensitiveConditionDummy); } if (ifaceLibs != iface.Libraries) { @@ -6498,6 +6503,7 @@ const cmLinkInterface* cmGeneratorTarget::GetImportLinkInterface( this->ExpandLinkItems(info->LibrariesProp, info->Libraries, config, headTarget, usage_requirements_only, iface.Libraries, iface.HadHeadSensitiveCondition, + iface.HadContextSensitiveCondition, iface.HadLinkLanguageSensitiveCondition); std::vector<std::string> deps = cmExpandedList(info->SharedDeps); this->LookupLinkItems(deps, cmListFileBacktrace(), iface.SharedDeps); @@ -7020,6 +7026,9 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries( if (cge->GetHadHeadSensitiveCondition()) { impl.HadHeadSensitiveCondition = true; } + if (cge->GetHadContextSensitiveCondition()) { + impl.HadContextSensitiveCondition = true; + } if (cge->GetHadLinkLanguageSensitiveCondition()) { impl.HadLinkLanguageSensitiveCondition = true; } |