[cmake-developers] CMake 2.8.12 transitive link regression?

Clinton Stimpson clinton at elemtech.com
Mon Nov 4 11:34:47 EST 2013


On Monday, November 04, 2013 09:16:11 AM Clinton Stimpson wrote:
> On Monday, November 04, 2013 10:40:15 AM Brad King wrote:
> > On 11/04/2013 10:31 AM, Clinton Stimpson wrote:
> > > But I see 2 others new problems.
> > 
> > Those are features and they work together as intended.
> > 
> > > 1)
> > > cmake_minimum_required(VERSION 2.8)
> > > add_library(foo SHARED foo.cpp)
> > > add_library(bar SHARED bar.cpp)
> > > target_link_libraries(bar foo)
> > > set_target_properties(bar PROPERTIES LINK_INTERFACE_LIBRARIES "")
> > > add_executable(exe exe.cpp)
> > > target_link_libraries(exe bar)
> > > 
> > > With 2.8.12.1, I now get a new warning that I did not get with 2.8.12.
> > > I'm
> > > not sure why I'm getting that warning because the linking of exe looks
> > > correct.
> > > 
> > > CMake Warning (dev) in CMakeLists.txt:
> > >   Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
> > >   interface.  Run "cmake --help-policy CMP0022" for policy details.  Use
> > >   the
> > >   cmake_policy command to set the policy and suppress this warning.
> > >   
> > >   Target "bar" has an INTERFACE_LINK_LIBRARIES property which differs
> > >   from
> > >   its LINK_INTERFACE_LIBRARIES properties.
> > >   
> > >   INTERFACE_LINK_LIBRARIES:
> > >     foo
> > >   
> > >   LINK_INTERFACE_LIBRARIES:
> > This is a correct warning according to the definition of CMP0022.
> > The bug you reported in 2.8.12.0 also caused it to not warn here.
> > Prior to my fix CMake did not track the new INTERFACE_LINK_LIBRARIES
> > value correctly for the plain tll signature so it didn't realize
> > that things would change and therefore did not warn.
> > 

And I think that is part of why I submitted bug 
http://cmake.org/Bug/view.php?id=14512
where I was not getting a warning when I should have.  It was possible to go 
from CMake 2.8.10 to CMake 2.8.12 and not get any warning about behavior 
change.

Thanks for fixing this.

Clint





More information about the cmake-developers mailing list