[cmake-developers] CMake 2.8.12 transitive link regression?

Brad King brad.king at kitware.com
Sat Nov 2 07:29:40 EDT 2013


On 11/1/2013 3:25 PM, Brad King wrote:
> On third thought, the tll documentation for the plain signature
> does not say it populates the INTERFACE_LINK_LIBRARIES property.

[smacks forehead]

On fourth thought I realized this is exactly the problem!
This is a policy, so the NEW behavior can be whatever we
need it to be.  There is no reason plain tll can't set the
INTERFACE_LINK_LIBRARIES when the policy is NEW.

Policy CMP0022's NEW behavior is supposed to be that the
link interface is exactly specified by INTERFACE_LINK_LIBRARIES.
Therefore in this case the plain tll signature should go
ahead and populate *both* INTERFACE_LINK_LIBRARIES *and*
LINK_LIBRARIES.

Now we can restore your logic in ComputLinkInterface to not
use the link implementation when CMP0022 is NEW.

I extended the topic to change to this approach, and then
squashed it all back together since the net change is now
pretty simple.

Note that supporting pre-2.8.12 clients is again as simple as

 get_property(iface TARGET foo PROPERTY INTERFACE_LINK_LIBRARIES)
 set_property(TARGET foo PROPERTY LINK_INTERFACE_LIBRARIES "${iface}")

and using EXPORT_LINK_INTERFACE_LIBRARIES.

-Brad



More information about the cmake-developers mailing list