summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-17 13:43:00 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-07-17 13:43:00 (GMT)
commitbb4c1588952523fa8340d6e882c2cb6f3501266b (patch)
tree8fe68d73257c086288308f9117cbc6761dc2c3d2 /Source/cmTarget.cxx
parent96f2a2a2eddc4f0591abe6b49f5c7a335515f971 (diff)
parent10c5c82c1e255523757d4c4fe81b6ad742e81c8f (diff)
downloadCMake-bb4c1588952523fa8340d6e882c2cb6f3501266b.zip
CMake-bb4c1588952523fa8340d6e882c2cb6f3501266b.tar.gz
CMake-bb4c1588952523fa8340d6e882c2cb6f3501266b.tar.bz2
Merge topic 'generalize-LINK_ONLY'
10c5c82c Help: Add notes for topic 'generalize-LINK_ONLY' 6e7e881c Honor $<LINK_ONLY> when checking interface properties 0400cd5d Make $<LINK_ONLY> available to projects (#14751)
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b4688c4..cdece87 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3555,6 +3555,8 @@ void cmTarget::ExpandLinkItems(std::string const& prop,
{
cmGeneratorExpression ge;
cmGeneratorExpressionDAGChecker dagChecker(this->GetName(), prop, 0, 0);
+ // The $<LINK_ONLY> expression may be in a link interface to specify private
+ // link dependencies that are otherwise excluded from usage requirements.
if(usage_requirements_only)
{
dagChecker.SetTransitivePropertiesOnly();
@@ -6016,7 +6018,7 @@ void processILibs(const std::string& config,
{
tgts.push_back(item.Target);
if(cmTarget::LinkInterface const* iface =
- item.Target->GetLinkInterfaceLibraries(config, headTarget, false))
+ item.Target->GetLinkInterfaceLibraries(config, headTarget, true))
{
for(std::vector<cmLinkItem>::const_iterator
it = iface->Libraries.begin();
@@ -6057,18 +6059,8 @@ void cmTarget::GetTransitivePropertyTargets(const std::string& config,
cmTarget const* headTarget,
std::vector<cmTarget const*> &tgts) const
{
- // The $<LINK_ONLY> expression may be in a link interface to specify private
- // link dependencies that are otherwise excluded from usage requirements.
- // Currently $<LINK_ONLY> is internal to CMake and only ever added by
- // target_link_libraries for PRIVATE dependencies of STATIC libraries in
- // INTERFACE_LINK_LIBRARIES which is used under CMP0022 NEW behavior.
- bool usage_requirements_only =
- this->GetType() == STATIC_LIBRARY &&
- this->GetPolicyStatusCMP0022() != cmPolicies::WARN &&
- this->GetPolicyStatusCMP0022() != cmPolicies::OLD;
if(cmTarget::LinkInterface const* iface =
- this->GetLinkInterfaceLibraries(config, headTarget,
- usage_requirements_only))
+ this->GetLinkInterfaceLibraries(config, headTarget, true))
{
for(std::vector<cmLinkItem>::const_iterator it = iface->Libraries.begin();
it != iface->Libraries.end(); ++it)