cmake doesn't follow its own advice :)

David Faure faure at
Thu Jul 17 01:51:48 CEST 2008

Running cmake in akonadi says:

-- Configuring done
CMake Warning (dev) at libs/CMakeLists.txt:16 (add_library):
  Policy CMP0003 should be set before this line.  Add code such as
    if(COMMAND cmake_policy)
      cmake_policy(SET CMP0003 NEW)
    endif(COMMAND cmake_policy)
  as early as possible but after the most recent call to
  cmake_minimum_required or cmake_policy(VERSION).  This warning appears
  because target "akonadiprotocolinternals" links to some libraries for which
  the linker must search:
  and other libraries with known full path:
  CMake is adding directories in the second list to the linker search path in
  case they are needed to find libraries from the first list (for backwards
  compatibility with CMake 2.4).  Set policy CMP0003 to OLD or NEW to enable
  or disable this behavior explicitly.  Run "cmake --help-policy CMP0003" for
 more information.
This warning is for project developers.  Use -Wno-dev to suppress it.

Obviously using a full path for libpthread would be the best solution,
rather than hiding the warning with CMP0003.
But this comes from cmake itself:
FindThreads.cmake:        SET(CMAKE_THREAD_LIBS_INIT "-lpthread")
Shouldn't this look for and set the variable to e.g. /usr/lib/,
to obey the above and avoid the whole issue with -L ordering?

David Faure, faure at, sponsored by Trolltech to work on KDE,
Konqueror (, and KOffice (

More information about the Kde-buildsystem mailing list