diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-06-04 16:25:47 +0200 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-07-08 22:39:09 +0200 |
commit | d0a76ea07cfc2a73900a9539e940e1e60dbba120 (patch) | |
tree | 8afdc5cb57a2ee3c88db5a677a2e642b40415326 /Source/cmPolicies.cxx | |
parent | ddde61c0b2b46a452366acae690aca0095c0a49c (diff) | |
download | cmake-d0a76ea07cfc2a73900a9539e940e1e60dbba120.tar.gz |
Introduce the INTERFACE_LINK_LIBRARIES property.
This property replaces the properties which
match (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?, and is enabled
for IMPORTED targets, and for non-IMPORTED targets only with a policy.
For static libraries, the INTERFACE_LINK_LIBRARIES property is
also used as the source of transitive usage requirements content.
Static libraries still require users to link to all entries in
their LINK_LIBRARIES, but usage requirements such as INCLUDE_DIRECTORIES
COMPILE_DEFINITIONS and COMPILE_OPTIONS can be restricted to only
certain interface libraries.
Because the INTERFACE_LINK_LIBRARIES property is populated unconditionally,
we need to compare the evaluated result of it with the link implementation
to determine whether to issue the policy warning for static libraries. For
shared libraries, the policy warning is issued if the contents of
the INTERFACE_LINK_LIBRARIES property differs from the contents of the
relevant config-specific old LINK_INTERFACE_LIBRARIES property.
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r-- | Source/cmPolicies.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index 32829a617b..20c305847a 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -544,6 +544,28 @@ cmPolicies::cmPolicies() "The NEW behavior for this policy is to issue a FATAL_ERROR if " "INCLUDE_DIRECTORIES contains a relative path.", 2,8,11,20130516, cmPolicies::WARN); + + this->DefinePolicy( + CMP0022, "CMP0022", + "INTERFACE_LINK_LIBRARIES defines the link interface.", + "CMake 2.8.11 constructed the 'link interface' of a target from " + "properties matching (IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?. " + "The modern way to specify config-sensitive content is to use generator " + "expressions and the IMPORTED_ prefix makes uniform processing of the " + "link interface with generator expressions impossible. The " + "INTERFACE_LINK_LIBRARIES target property was introduced as a " + "replacement in CMake 2.8.12. This new property is named consistently " + "with the INTERFACE_COMPILE_DEFINITIONS, INTERFACE_INCLUDE_DIRECTORIES " + "and INTERFACE_COMPILE_OPTIONS properties. For in-build targets, CMake " + "will use the INTERFACE_LINK_LIBRARIES property as the source of the " + "link interface only if policy CMP0022 is NEW. " + "\n" + "The OLD behavior for this policy is to ignore the " + "INTERFACE_LINK_LIBRARIES property for in-build targets. " + "The NEW behavior for this policy is to use the INTERFACE_LINK_LIBRARIES " + "property for in-build targets, and ignore the old properties matching " + "(IMPORTED_)?LINK_INTERFACE_LIBRARIES(_<CONFIG>)?.", + 2,8,11,20130516, cmPolicies::WARN); } cmPolicies::~cmPolicies() |