[cmake-developers] INTERFACE_LINK_LIBRARIES property?
Stephen Kelly
steveire at gmail.com
Thu Jun 27 10:18:51 EDT 2013
Brad King wrote:
> On 06/27/2013 05:28 AM, Stephen Kelly wrote:
>> Please post a snippet of cmake code showing the problems you are seeing
>> so that I can easily understand them.
>
> Consider this code using CMake 2.8.11:
>
> cmake_minimum_required(VERSION 2.8.11)
> #...
> add_library(foo SHARED foo.c)
> target_link_libraries(foo LINK_PUBLIC a)
> set_property(TARGET foo APPEND PROPERTY LINK_INTERFACE_LIBRARIES b)
>
> If someone were to change the first line to require 2.8.12 then
> suddenly the link interface will drop "b" silently.
Thanks. That was the description I was looking for.
>
> With my suggestion then tll will also populate INTERFACE_LINK_LIBRARIES
> if the policy is not set (or a C++-only proxy). From that the existing
> comparison of old and new interface properties will work.
>
I went with the option of setting the INTERFACE_LINK_LIBRARIES
unconditionally in tll. I also added a test for the case above, and added a
FATAL_ERROR in the export file if required, and pushed it all to my clone
again.
Thanks,
Steve.
More information about the cmake-developers
mailing list