summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-04-29 18:58:33 (GMT)
committerBrad King <brad.king@kitware.com>2024-04-29 21:40:03 (GMT)
commit862b8e28adbbab55c666a2d6eb3eecf0bf452bab (patch)
tree1742055323adf85c0564d739eb7cb588f0346c54 /Source/cmGeneratorTarget.cxx
parent8d1d6a1437f8bce3c771f93cdafbffcfc7d6173a (diff)
downloadCMake-862b8e28adbbab55c666a2d6eb3eecf0bf452bab.zip
CMake-862b8e28adbbab55c666a2d6eb3eecf0bf452bab.tar.gz
CMake-862b8e28adbbab55c666a2d6eb3eecf0bf452bab.tar.bz2
GenEx: Teach TARGET_PROPERTY evaluation to optionally pierce LINK_ONLY
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx37
1 files changed, 24 insertions, 13 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index d0573da..6bf0095 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -76,19 +76,29 @@ const std::string kINTERFACE_LINK_LIBRARIES_DIRECT_EXCLUDE =
const std::map<cm::string_view, TransitiveProperty>
cmGeneratorTarget::BuiltinTransitiveProperties = {
- { "AUTOMOC_MACRO_NAMES"_s, { "INTERFACE_AUTOMOC_MACRO_NAMES"_s } },
- { "AUTOUIC_OPTIONS"_s, { "INTERFACE_AUTOUIC_OPTIONS"_s } },
- { "COMPILE_DEFINITIONS"_s, { "INTERFACE_COMPILE_DEFINITIONS"_s } },
- { "COMPILE_FEATURES"_s, { "INTERFACE_COMPILE_FEATURES"_s } },
- { "COMPILE_OPTIONS"_s, { "INTERFACE_COMPILE_OPTIONS"_s } },
- { "INCLUDE_DIRECTORIES"_s, { "INTERFACE_INCLUDE_DIRECTORIES"_s } },
- { "LINK_DEPENDS"_s, { "INTERFACE_LINK_DEPENDS"_s } },
- { "LINK_DIRECTORIES"_s, { "INTERFACE_LINK_DIRECTORIES"_s } },
- { "LINK_OPTIONS"_s, { "INTERFACE_LINK_OPTIONS"_s } },
- { "PRECOMPILE_HEADERS"_s, { "INTERFACE_PRECOMPILE_HEADERS"_s } },
- { "SOURCES"_s, { "INTERFACE_SOURCES"_s } },
+ { "AUTOMOC_MACRO_NAMES"_s,
+ { "INTERFACE_AUTOMOC_MACRO_NAMES"_s, LinkInterfaceFor::Usage } },
+ { "AUTOUIC_OPTIONS"_s,
+ { "INTERFACE_AUTOUIC_OPTIONS"_s, LinkInterfaceFor::Usage } },
+ { "COMPILE_DEFINITIONS"_s,
+ { "INTERFACE_COMPILE_DEFINITIONS"_s, LinkInterfaceFor::Usage } },
+ { "COMPILE_FEATURES"_s,
+ { "INTERFACE_COMPILE_FEATURES"_s, LinkInterfaceFor::Usage } },
+ { "COMPILE_OPTIONS"_s,
+ { "INTERFACE_COMPILE_OPTIONS"_s, LinkInterfaceFor::Usage } },
+ { "INCLUDE_DIRECTORIES"_s,
+ { "INTERFACE_INCLUDE_DIRECTORIES"_s, LinkInterfaceFor::Usage } },
+ { "LINK_DEPENDS"_s,
+ { "INTERFACE_LINK_DEPENDS"_s, LinkInterfaceFor::Usage } },
+ { "LINK_DIRECTORIES"_s,
+ { "INTERFACE_LINK_DIRECTORIES"_s, LinkInterfaceFor::Usage } },
+ { "LINK_OPTIONS"_s,
+ { "INTERFACE_LINK_OPTIONS"_s, LinkInterfaceFor::Usage } },
+ { "PRECOMPILE_HEADERS"_s,
+ { "INTERFACE_PRECOMPILE_HEADERS"_s, LinkInterfaceFor::Usage } },
+ { "SOURCES"_s, { "INTERFACE_SOURCES"_s, LinkInterfaceFor::Usage } },
{ "SYSTEM_INCLUDE_DIRECTORIES"_s,
- { "INTERFACE_SYSTEM_INCLUDE_DIRECTORIES"_s } },
+ { "INTERFACE_SYSTEM_INCLUDE_DIRECTORIES"_s, LinkInterfaceFor::Usage } },
};
template <>
@@ -1551,7 +1561,8 @@ cmGeneratorTarget::IsTransitiveProperty(cm::string_view prop,
cmPolicies::PolicyStatus cmp0043 =
lg->GetPolicyStatus(cmPolicies::CMP0043);
if (cmp0043 == cmPolicies::WARN || cmp0043 == cmPolicies::OLD) {
- result = TransitiveProperty{ "INTERFACE_COMPILE_DEFINITIONS"_s };
+ result = TransitiveProperty{ "INTERFACE_COMPILE_DEFINITIONS"_s,
+ LinkInterfaceFor::Usage };
}
}
return result;