cmake doesn't follow its own advice :)

one forall oneforall at gmail.com
Thu Jul 17 04:11:11 CEST 2008


Hi
here is the patched I made

On 7/16/08, David Faure <faure at kde.org> wrote:
> 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:
>
>     -lpthread
>
>   and other libraries with known full path:
>
>     /usr/lib64/qt4/lib64/libQtCore.so
>
>   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 pthread.so and set the variable to e.g.
> /usr/lib/libpthread.so,
> to obey the above and avoid the whole issue with -L ordering?
>
> --
> David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
> Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
> _______________________________________________
> Kde-buildsystem mailing list
> Kde-buildsystem at kde.org
> https://mail.kde.org/mailman/listinfo/kde-buildsystem
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMakeLists.txt-CMP0003-NEW.diff
Type: application/octet-stream
Size: 2928 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20080716/b7776497/attachment.obj 


More information about the Kde-buildsystem mailing list