summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget_Link.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-05-09 17:38:35 (GMT)
committerBrad King <brad.king@kitware.com>2024-05-21 13:22:51 (GMT)
commitb9ee79b8a13abb957a176ff0b5eab1e5d33efc50 (patch)
treeb3cb6301b38f03f953dcea719fa1dec800022ada /Source/cmGeneratorTarget_Link.cxx
parent633afa0b2e27a6eca3a4b1e123a80cf4338fe509 (diff)
downloadCMake-b9ee79b8a13abb957a176ff0b5eab1e5d33efc50.zip
CMake-b9ee79b8a13abb957a176ff0b5eab1e5d33efc50.tar.gz
CMake-b9ee79b8a13abb957a176ff0b5eab1e5d33efc50.tar.bz2
GenEx: Add support for custom transitive compile properties
Teach the `$<TARGET_PROPERTY:...>` generator expression to check for a new `TRANSITIVE_COMPILE_PROPERTIES` property in the target's link closure to enable transitive evaluation of named properties through the link closure, excluding entries guarded by `$<LINK_ONLY:...>`. Issue: #20416
Diffstat (limited to 'Source/cmGeneratorTarget_Link.cxx')
-rw-r--r--Source/cmGeneratorTarget_Link.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget_Link.cxx b/Source/cmGeneratorTarget_Link.cxx
index 7c6f7b5..0799429 100644
--- a/Source/cmGeneratorTarget_Link.cxx
+++ b/Source/cmGeneratorTarget_Link.cxx
@@ -282,6 +282,23 @@ static void processILibs(const std::string& config,
}
}
+std::vector<cmGeneratorTarget const*>
+cmGeneratorTarget::GetLinkInterfaceClosure(std::string const& config,
+ cmGeneratorTarget const* headTarget,
+ UseTo usage) const
+{
+ cmGlobalGenerator* gg = this->GetLocalGenerator()->GetGlobalGenerator();
+ std::vector<cmGeneratorTarget const*> tgts;
+ std::set<cmGeneratorTarget const*> emitted;
+ if (cmLinkInterfaceLibraries const* iface =
+ this->GetLinkInterfaceLibraries(config, headTarget, usage)) {
+ for (cmLinkItem const& lib : iface->Libraries) {
+ processILibs(config, headTarget, lib, gg, tgts, emitted, usage);
+ }
+ }
+ return tgts;
+}
+
const std::vector<const cmGeneratorTarget*>&
cmGeneratorTarget::GetLinkImplementationClosure(const std::string& config,
UseTo usage) const