From e04f4c9ced6434a0f3081b58ef5e5fc8d4f0e44b Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 25 Jan 2016 20:52:37 +0800 Subject: [PATCH] pthreads only as needed This just lets you build lws 1.6 without pthreads if your OS / toolchain makes that possible, in the case you don't build the test apps (libwebsockets-test-server-pthreads needs it) Signed-off-by: Andy Green --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a6a3a6f3..8e78f5e69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -492,7 +492,7 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX OR (CMAKE_C_COMPILER_ID endif(UNIX) endif () -if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) +if ((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT LWS_WITHOUT_TESTAPPS) if (UNIX) # jeez clang understands -pthread but dies if he sees it at link time! # http://stackoverflow.com/questions/2391194/what-is-gs-pthread-equiv-in-clang