[cmake-developers] Policy for INTERFACE_LINK_LIBRARIES
Brad King
brad.king at kitware.com
Fri Nov 30 09:01:43 EST 2012
On 11/30/2012 08:39 AM, Brad King wrote:
> On 11/29/2012 04:35 PM, Stephen Kelly wrote:
>> I've pushed add-INTERFACE_LINK_LIBRARIES-property to my gitorious clone.
>
> I'll look at this one now.
This still appears to use the policy in ComputeImportInfo.
In our current design CMake >= 2.8.11 should always use the
new interface if it is available. There is no need to check
the policy at all there. In fact the policy should not apply
to imported targets at all. It's only the value when a target
is originally created that matters in determining which of the
two interfaces it exposes to consumers.
In ComputeLinkInterface it appears you store newInterfaceLibs
in iface.Libraries after evaluating generator expressions with
the target as its own context (and similarly in ComputeImportInfo).
IIRC we planned to expose the generator expressions in the link
interface so they would be ultimately evaluated in the context of
the consuming target.
I think evaluating the new link interface with a target as its
own context is good enough to handle the policy warning, but
it should not become the ultimately visible link interface
inside the project. Otherwise the entire feature you're trying
to introduce won't work, no?
Thanks,
-Brad
More information about the cmake-developers
mailing list