[Kde-pim] Review Request: Build fix - Link to libexecinfo on FreeBSD when necessary
Alexander Neundorf
neundorf at kde.org
Sat Nov 21 23:03:36 GMT 2009
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/2255/#review3229
-----------------------------------------------------------
I think the logic for checking for the library can be improved.
I'd suggest that you first do a "check_function_exists(backtrace BACKTRACE_IN_LIBC)"
If this fails, search for the execinfo library, and append it to CMAKE_REQUIRED_LIBRARIES. Then check again:
check_function_exists(backtrace BACKTRACE_IN_LIBEXEC)
The check for success of EXECINFO_LIBRARY can be done simpler, just:
if(NOT EXECINFO_LIBRARY)
instead of comparing with the full string.
I do not really like that EXECINFO_LIBRARY is set to "" if it was NOTFOUND.
I'd prefer an additional variable like AKONADI_OPTIONAL_LIBS or AKONADI_SYSTEM_DEPENDENT_LIBS or something like this, which is set empty at the beginning, and if libexecinfo was found, it is appended to this variable.
Then this variable is used in TARGET_LINK_LIBRARIES().
Alex
- Alexander
On 2009-11-21 04:38:57, Raphael Kubo da Costa wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/2255/
> -----------------------------------------------------------
>
> (Updated 2009-11-21 04:38:57)
>
>
> Review request for KDE PIM.
>
>
> Summary
> -------
>
> At least on FreeBSD, execinfo isn't provided directly by libc, but by a separate port/package which, besides providing execinfo.h, also has a libexecinfo to link to when using functions such as backtrace().
>
> This patch looks for libexecinfo and adds it to the libraries used to link akonadiprivate when necessary.
>
>
> Diffs
> -----
>
> /trunk/kdesupport/akonadi/CMakeLists.txt 1051744
> /trunk/kdesupport/akonadi/server/CMakeLists.txt 1051744
> /trunk/kdesupport/akonadi/server/akonadictl/CMakeLists.txt 1051744
> /trunk/kdesupport/akonadi/server/control/CMakeLists.txt 1051744
>
> Diff: http://reviewboard.kde.org/r/2255/diff
>
>
> Testing
> -------
>
> After the changes, a FreeBSD build of akonadi with execinfo installed has succeeded.
>
>
> Thanks,
>
> Raphael
>
>
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list