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

[PATCH] build: Use Threads_FOUND to decide whether to build ssh_threads.

Follow-up to 4e04ec8, which caused a regression on OS X.

Checking the value of CMAKE_THREAD_LIBS_INIT to decide whether any threading
library is present on a system turns out to be wrong -- in OS X, for
example, usage of pthreads does not depend on any additional linker or
compiler flags, so CMAKE_THREAD_LIBS_INIT is empty and our check in
src/CMakeLists.txt failed (it used to work before 4e04ec8 because

Instead, just look for Threads_FOUND, which FindThreads sets just like any
other Find module when it has found what it was looking for.
 src/CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index fa8c5c2..1891a00 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -288,6 +288,6 @@ if (WITH_STATIC_LIB)
+if (Threads_FOUND)
+endif (Threads_FOUND)

Archive administrator: postmaster@lists.cynapses.org