[cmake-developers] INTERFACE_LINK_LIBRARIES property?

Brad King brad.king at kitware.com
Wed Jun 26 09:49:12 EDT 2013


On 06/07/2013 09:36 AM, Brad King wrote:
> Great.  One more part to think about is how the warning can work
> for the interface policy.  In what I proposed:
> 
> * OLD behavior uses the old properties for everything
>   (tll sets them, cmTarget reads them)
> * NEW behavior uses the new property for everything
>   (tll sets it, cmTarget reads it)
> 
> Note that in the NEW behavior, even the old-style tll
> LINK_INTERFACE_LIBRARIES signature will set the new property.
> 
> When the policy is not set we will use the old behavior, but
> when would we ever warn to ask developers to set the policy?
> It can't be triggered by "new-style" code because the whole
> point of policy warnings is to trigger for old code not yet
> aware of the policy and the preferred new behavior.
> 
> Perhaps we can warn whenever someone sets the old property
> explicitly through set_property or set_target_properties
> such that it would not be mapped by the policy's changes
> to tll behavior.  Other ideas?

I'm still not sure what is best to do with the above.

> We could also warn when someone sets the new-style properties
> but does not set the policy to NEW.

To clarify, this would be a general warning and not tied to
complaining when the policy is not set.  Obviously such code
is aware of the new properties already.

-Brad



More information about the cmake-developers mailing list