trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: December 2013

Re: [trinity-devel] tdelibs FTBFS: cmake 2.8.12: INTERFACE_LINK_LIBRARIES vs. LINK_INTERFACE_LIBRARIES

From: Slávek Banko <slavek.banko@...>
Date: Wed, 18 Dec 2013 22:05:04 +0100
On Friday 06 of December 2013 03:54:49 Darrell Anderson wrote:
> 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
>

I dove into research the problem and I noticed that on Jessie is reported 
another problem. For example:

CMake Warning (dev) in tdefx/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 "tdefx-shared" has an INTERFACE_LINK_LIBRARIES property which
  differs from its LINK_INTERFACE_LIBRARIES properties.

  INTERFACE_LINK_LIBRARIES:

    tqt;tqt-mt;Xrender;X11;c;tqt;tqt-mt;Xrender;X11;c

  LINK_INTERFACE_LIBRARIES:

    tqt;tqt-mt;Xrender;X11;c

This warning is for project developers.  Use -Wno-dev to suppress it.

Therefore, I have prepared a patch that could solve both of these problems. 
Please, test it.

Slavek
-- 

Attachments: