On 12/06/2012 03:53 PM, Stephen Kelly wrote:
> Brad King wrote:
>> How can we ever stop exporting the old interface when it comes from the
>> link implementation?
> 
> The approach I was thinking was to deal with it the same way we deal with 
> LINK_PUBLIC and LINK_PRIVATE - Make it depend on the policy.

The new interface is not exported unless the policy is NEW.  If the
policy is NEW then the old interface is not exported.  Essentially the
policy decides whether the link impl becomes the old or new interface,
but never both.

Now even projects that have never touched LINK_INTERFACE_LIBRARIES will
have to be fixed to manually set it to a copy of the link implementation
in order to remain compatible with older CMake versions once they set the
policy to NEW.  I'm not currently sure whether this is okay.

>> Actually, how do
>> we even handle this for cross-export target references that were added
>> recently?
> 
> I have not looked into that yet, but I don't think it's related to this.
> 
>  install(EXPORT fooTargets NAMESPACE foo_ ...)
>  install(EXPORT barTargets NAMESPACE bar_ ...)
> 
> should not be affected by this. Or do you have a case in mind where it could 
> be? Or is that not the case you are thinking of?

If some of barTargets's exports depend on fooTarget's exports then
the properties generated in barTargets that list those dependencies
need to refer to fooTarget's imports with "foo_" rather than "bar_".
I haven't checked if/how this currently works.  It needs to work in
the new interfaces too.

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to