trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: December 2013

tdelibs FTBFS: cmake 2.8.12: INTERFACE_LINK_LIBRARIES vs. LINK_INTERFACE_LIBRARIES

From: "Darrell Anderson" <darrella@...>
Date: Thu, 05 Dec 2013 20:54:49 -0600
All,

I gave a pass at compiling R14 on the newly released Slackware 
14.1, which contains cmake 2.8.12.

The arts package compiled with cmake warnings I never saw before 
and tdelibs FTBFS with the same warnings. The arts warnings:

CMake Warning (dev) in libltdl/CMakeLists.txt:
CMake Warning (dev) in flow/gsl/CMakeLists.txt:
CMake Warning (dev) in libltdl/CMakeLists.txt:
CMake Warning (dev) in libltdl/CMakeLists.txt:
CMake Warning (dev) in libltdl/CMakeLists.txt:
CMake Warning (dev) in flow/gsl/CMakeLists.txt:
CMake Warning (dev) in libltdl/CMakeLists.txt:
CMake Warning (dev) in libltdl/CMakeLists.txt:

tdelibs:

CMake Warning (dev) in tdecore/tdehw/CMakeLists.txt:
CMake Warning (dev) in tdecore/tdehw/networkbackends/network-
manager/CMakeLists.txt:
CMake Warning (dev) in libltdl/CMakeLists.txt:
CMake Warning (dev) in tdecore/svgicons/CMakeLists.txt:
CMake Warning (dev) in tdeio/tdeio/CMakeLists.txt:
CMake Warning (dev) in libltdl/CMakeLists.txt:
CMake Warning (dev) in tdehtml/java/CMakeLists.txt:

Following the colon of each warning:

Common to both arts and tdelibs:

CMake Warning (dev) in libltdl/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.

  Static library target "ltdlc-static" has a 
INTERFACE_LINK_LIBRARIES
  property.  This should be preferred as the source of the link 
interface for
  this library.  Ignoring the property and using the link 
implementation as
  the link interface instead.
This warning is for project developers.  Use -Wno-dev to suppress 
it.


If I understand correctly from reading around the web, the cause is 
cmake 2.8.12 changed LINK_INTERFACE_LIBRARIES to 
INTERFACE_LINK_LIBRARIES.

If that is correct, then seems TDEMacros.cmake:696 needs to be 
updated to handle both variables:

target_link_libraries( ${_target} LINK_INTERFACE_LIBRARIES 
${_shared_libs} )

I'm wild guessing something similar to this (I'm not a cmake guru):

If (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${ 
CMAKE_PATCH_VERSION } GREATER 2.8.11)
  target_link_libraries( ${_target} INTERFACE_LINK_LIBRARIES 
${_shared_libs} )
else()
  target_link_libraries( ${_target} LINK_INTERFACE_LIBRARIES 
${_shared_libs} )
endif()

I presume others will experience these same warnings and build 
failures when they update to cmake 2.8.12.

Regardless, this requires a change to the common cmake sources, 
which need to be propogated through the source tree.

Darrell