From f6e6818ca70bae01afdeee31e252fda66539041b Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 5 Nov 2018 10:25:36 +0800 Subject: [PATCH] freebsd: clang requires -pthread In the now default case that THREADPOOL is enabled... not sure what OSX will make of that as previously it blew up with -pthread on clang cmdline at link time --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba4f3f9a6..9aba77220 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1210,8 +1210,12 @@ if ((CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) AND NOT LWS_WITHOUT_TE endif() if ((CMAKE_C_COMPILER_ID MATCHES "Clang") OR (CMAKE_CXX_COMPILER_ID MATCHES "Clang")) + # otherwise osx blows a bunch of openssl deprecated api errors set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated-declarations" ) + if (UNIX AND LWS_HAVE_PTHREAD_H) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread" ) + endif() endif() source_group("Headers Private" FILES ${HDR_PRIVATE})