[cmake-developers] INTERFACE_LINK_LIBRARIES property?

Brad King brad.king at kitware.com
Thu Jun 27 08:31:32 EDT 2013


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.

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.

-Brad



More information about the cmake-developers mailing list