[cmake-developers] CMake 2.8.12 transitive link regression?

Stephen Kelly steveire at gmail.com
Wed Oct 30 10:30:12 EDT 2013


Brad King wrote:

> 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.

Ok.

> 
>> 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.

Ok. I've updated my topic to remove the policy logic.

> 
> 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.

Right. Currently it is the former. I'm not certain the latter is possible 
while keeping everything else working. I can look into it again though.

> 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?

I don't recall. I have a wip topic adding LINK_LIBRARIES support to 
CMAKE_DEBUG_TARGET_PROPERTIES. It's not really the same but a bigger goal 
for me than this I think.

Thanks,

Steve.





More information about the cmake-developers mailing list