summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-05 16:42:08 +0000
committerKitware Robot <kwrobot@kitware.com>2023-05-05 12:42:23 -0400
commit5924630e6d4a383ef76412a6f560fbe852837e50 (patch)
treefbab8184157448c3251e09feee8e4ce5c0b6234e /Source/cmGeneratorTarget.cxx
parent2b5b09556c08bdbcd949e600daa3059f63da240a (diff)
parentc42630ee62df80e649211e99c510cab7ac28fc0b (diff)
downloadcmake-5924630e6d4a383ef76412a6f560fbe852837e50.tar.gz
Merge topic 'compile-only-genex'
c42630ee62 cmGeneratorExpressionNode: implement `COMPILE_ONLY` genex 0fb923c460 cmGeneratorExpressionNode: implement `COMPILE_ONLY` genex Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8411
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 897619cbfa..28ba60f4ed 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -6791,6 +6791,7 @@ void cmGeneratorTarget::ExpandLinkItems(
// requirements.
if (interfaceFor == LinkInterfaceFor::Usage) {
dagChecker.SetTransitivePropertiesOnly();
+ dagChecker.SetTransitivePropertiesOnlyCMP0131();
}
cmMakefile const* mf = this->LocalGenerator->GetMakefile();
LookupLinkItemScope scope{ this->LocalGenerator };
@@ -8228,6 +8229,7 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
// The $<LINK_ONLY> expression may be used to specify link dependencies
// that are otherwise excluded from usage requirements.
if (implFor == LinkInterfaceFor::Usage) {
+ dagChecker.SetTransitivePropertiesOnly();
switch (this->GetPolicyStatusCMP0131()) {
case cmPolicies::WARN:
case cmPolicies::OLD:
@@ -8235,7 +8237,7 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
case cmPolicies::REQUIRED_IF_USED:
case cmPolicies::REQUIRED_ALWAYS:
case cmPolicies::NEW:
- dagChecker.SetTransitivePropertiesOnly();
+ dagChecker.SetTransitivePropertiesOnlyCMP0131();
break;
}
}