1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-31 00:03:07 +03:00

ConfigureChecks: Stop checking for CMAKE_HAVE_THREADS_LIBRARY.

libssh is primarily interested in whether pthreads is present and can be
used. Checking for CMAKE_HAVE_THREADS_LIBRARY is not the same thing, as
there are cases where pthread exists but CMAKE_HAVE_THREADS_LIBRARY is not
set (for example, FreeBSD passes -DTHREADS_HAVE_PTHREAD_ARG=1 to CMake by
default as a way to skip the checks for -lpthread, -lpthreads and others and
tell the build system that -pthread is the one expected to be used).

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Raphael Kubo da Costa
2014-02-03 12:58:36 +02:00
committed by Andreas Schneider
parent 95782ada1f
commit 79a80cdc77

View File

@ -169,11 +169,9 @@ if (GCRYPT_FOUND)
endif (GCRYPT_VERSION VERSION_GREATER "1.4.6") endif (GCRYPT_VERSION VERSION_GREATER "1.4.6")
endif (GCRYPT_FOUND) endif (GCRYPT_FOUND)
if (CMAKE_HAVE_THREADS_LIBRARY) if (CMAKE_USE_PTHREADS_INIT)
if (CMAKE_USE_PTHREADS_INIT) set(HAVE_PTHREAD 1)
set(HAVE_PTHREAD 1) endif (CMAKE_USE_PTHREADS_INIT)
endif (CMAKE_USE_PTHREADS_INIT)
endif (CMAKE_HAVE_THREADS_LIBRARY)
# OPTIONS # OPTIONS
check_c_source_compiles(" check_c_source_compiles("