[cmake-developers] Policy for INTERFACE_LINK_LIBRARIES
Stephen Kelly
steveire at gmail.com
Fri Dec 7 08:35:30 EST 2012
Brad King wrote:
>> Brad King wrote:
>>> How can we ever stop exporting the old interface when it comes from the
>>> link implementation?
>
> 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.
I've added another patch to my clone to solve this problem:
Export link implementation as old link interface if it does not contain
generator expressions.
That way,
target_link_libraries(foo bar)
will export the old and new link interfaces, and
target_link_libraries(foo $<1:bar>)
will export only the new one, which is appropriate anyway because only that
can handle the generator expressions.
Thanks,
Steve.
More information about the cmake-developers
mailing list