[cmake-developers] CMake 2.8.12 transitive link regression?

Brad King brad.king at kitware.com
Wed Oct 30 09:26:42 EDT 2013


On 10/30/2013 09:01 AM, Stephen Kelly wrote:
> Brad King wrote:
> 
>> When CMP0022 is NEW the INTERFACE_LINK_LIBRARIES is always the link
>> interface without the link implementation fallback, but the tll plain
>> signature does not populate INTERFACE_LINK_LIBRARIES either.  This is
>> not correct.
> 
> I actually prefer this behavior, but as it's not backward compatible, 
> something has to be done about it.

The purpose of CMP0023 was that in combination with CMP0022 everyone
can switch over to the keyword signatures and then get the generally
preferred behavior.  The historical behavior of the plain tll signature
is too deeply ingrained in projects to ever change.

> I've implemented this in handle-only-plain-tll in my clone, but made the 
> policy control the behavior. If that's fine I can add tests for that.

If I'm reading that correctly the behavior will still be changed
when CMP0022 is set to new.  The only difference is now you warn
when the policy is not set.  This will warn in the basic use case
that has been used in examples since the beginning of CMake.

We really need to just silently use the link implementation as
the link interface as has always been done when only the plain tll
signature is used.  New projects can use the keyword signatures
which always set the link interface explicitly.

The only question is whether cmTarget's logic should fall back to the
link implementation when only the plain tll signature is used even
if INTERFACE_LINK_LIBRARIES is not set, or tll's plain signature
should maintain INTERFACE_LINK_LIBRARIES until another signature
is used to set it explicitly.  I prefer the latter because it means
we can still say that when CMP0022 is NEW the INTERFACE_LINK_LIBRARIES
always holds the link interface and it can be checked with get_property
at any time for debugging.  Wasn't that one of your goals?

-Brad



More information about the cmake-developers mailing list