[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/2] Stop using CMAKE_HAVE_THREADS_LIBRARY in the build system


Hi everyone,

This patch series was born after I noticed that libssh_threads.so was not
being built on FreeBSD in our ports tree: we pass
-DTHREADS_HAVE_PTHREAD_ARG=1 by default to CMake there. It means all the
checks for -lpthread, -lpthreads, -lthread etc are skipped and CMake knows
that pthreads is present and -pthread is supposed to be passed to the
compiler.

A side-effect of this is that CMAKE_HAVE_THREADS_LIBRARY is not set (as far
as I understood, it is supposed to mean that a separate threading library
like libthread.so or libpthreads.so is present on the system).

This can be "fixed" in the build system by checking for the availability of
pthreads in the system in question, since that's ultimately what is needed
and used.


Follow-Ups:
[PATCH 1/2] ConfigureChecks: Stop checking for CMAKE_HAVE_THREADS_LIBRARY.Raphael Kubo da Costa <rakuco@xxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org