summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-01-05 15:14:13 -0500
committerBrad King <brad.king@kitware.com>2022-01-29 06:48:12 -0500
commitf3e9e03fe023678fcee16699864e8763b18e9763 (patch)
tree9c03352d6f5e8bef2fc4292e2d991ce9f3d32023 /Source/cmGeneratorTarget.cxx
parent216aa149974a179d49094e53f553741e2c385920 (diff)
downloadcmake-f3e9e03fe023678fcee16699864e8763b18e9763.tar.gz
cmGeneratorTarget: Simplify CMP0022 warning check
Since commit 1d709ea2f5 (cmGeneratorTarget: Propagate backtraces from INTERFACE_LINK_LIBRARIES, 2021-12-15) we can use the special storage of the property directly.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index f8fa593f51..7fb2a5db00 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -57,6 +57,7 @@ using LinkInterfaceFor = cmGeneratorTarget::LinkInterfaceFor;
const cmsys::RegularExpression FrameworkRegularExpression(
"^(.*/)?([^/]*)\\.framework/(.*)$");
+const std::string kINTERFACE_LINK_LIBRARIES = "INTERFACE_LINK_LIBRARIES";
}
template <>
@@ -7250,13 +7251,9 @@ void cmGeneratorTarget::ComputeLinkInterfaceLibraries(
// Compare the link implementation fallback link interface to the
// preferred new link interface property and warn if different.
cmLinkInterface ifaceNew;
- static const std::string newProp = "INTERFACE_LINK_LIBRARIES";
- if (cmValue newExplicitLibraries = this->GetProperty(newProp)) {
- std::vector<BT<std::string>> entries;
- entries.emplace_back(*newExplicitLibraries);
- this->ExpandLinkItems(linkIfaceProp, cmMakeRange(entries), config,
- headTarget, interfaceFor, ifaceNew);
- }
+ this->ExpandLinkItems(kINTERFACE_LINK_LIBRARIES,
+ this->Target->GetLinkInterfaceEntries(), config,
+ headTarget, interfaceFor, ifaceNew);
if (ifaceNew.Libraries != iface.Libraries) {
std::string oldLibraries = cmJoin(impl->Libraries, ";");
std::string newLibraries = cmJoin(ifaceNew.Libraries, ";");