[cmake-developers] New INTERFACE_LINK_LIBRARIES policy approach

Brad King brad.king at kitware.com
Thu Jan 3 16:38:55 EST 2013


On 12/29/2012 05:10 AM, Stephen Kelly wrote:
> Brad King wrote:
> 
>> Now, on to exporting.  Unlike the previous iteration the policy
>> affects it too.
>>
>> When the policy is OLD/WARN we export only the old interface and
>> not the new interface.
> 
> We spent some time figuring out how to not export the old interface if it is 
> not needed, based only on what API had been used and what the policy state 
> was. Adding API to make install(EXPORT) not export the old interface was 
> always an option, but was disregarded before. 

This time it's the other way around because the new policy proposal does
affect the export while the old one did not.  This time I mean that when
the policy is NEW the old interface is NOT exported by default.  A new
property can be set to ENABLE export of the old interface only for
compatibility with older CMake clients.

An advantage of the new approach is that projects will not have to try
to set both the old and new link interface properties.  They can just
set the new one and request that it be exported as both the old and new
interfaces if they want to support older CMake clients.

In my new proposal when the policy is NEW tll() will populate only the
new interface even in its old LINK_INTERFACE_LIBRARIES mode.  It is
less likely projects will have to change code to populate the new
interface.  This will be less disruptive and should make the transition
painless in standard use cases.

-Brad



More information about the cmake-developers mailing list