[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] ConfigureChecks: Stop checking for CMAKE_HAVE_THREADS_LIBRARY.
[Thread Prev] | [Thread Next]
- Subject: [PATCH 1/2] ConfigureChecks: Stop checking for CMAKE_HAVE_THREADS_LIBRARY.
- From: Raphael Kubo da Costa <rakuco@xxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Mon, 3 Feb 2014 12:58:36 +0200
- To: libssh@xxxxxxxxxx
- Cc: Raphael Kubo da Costa <rakuco-HZy0K5TPuP5AfugRpC6u6w@xxxxxxxxxxxxxxxx>
From: Raphael Kubo da Costa <rakuco-HZy0K5TPuP5AfugRpC6u6w@xxxxxxxxxxxxxxxx> 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). --- ConfigureChecks.cmake | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 472fe79..8f76af8 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -169,11 +169,9 @@ if (GCRYPT_FOUND) endif (GCRYPT_VERSION VERSION_GREATER "1.4.6") endif (GCRYPT_FOUND) -if (CMAKE_HAVE_THREADS_LIBRARY) - if (CMAKE_USE_PTHREADS_INIT) - set(HAVE_PTHREAD 1) - endif (CMAKE_USE_PTHREADS_INIT) -endif (CMAKE_HAVE_THREADS_LIBRARY) +if (CMAKE_USE_PTHREADS_INIT) + set(HAVE_PTHREAD 1) +endif (CMAKE_USE_PTHREADS_INIT) # OPTIONS check_c_source_compiles(" -- 1.8.5.2
[PATCH 2/2] threads: Be less strict when deciding whether to build libssh_threads. | Raphael Kubo da Costa <rakuco@xxxxxxxxxxx> |
[PATCH v2 0/2] Stop using CMAKE_HAVE_THREADS_LIBRARY in the build system | Raphael Kubo da Costa <rakuco@xxxxxxxxxxx> |