1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

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
This commit is contained in:
Andy Green 2018-11-05 10:25:36 +08:00
parent cbb8b1d3e9
commit f6e6818ca7

View file

@ -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})