diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-05-24 21:14:37 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-05-24 21:14:50 +0100 |
commit | 361cab554aed4c8cd363ba0f5ed41aeb21d6f3ba (patch) | |
tree | 70f752325cd5d0ce3ff5a8e95e0f39071d632e8a | |
parent | c2eeccf423953c85c31a9eacd5b97ec9ced98ab6 (diff) | |
download | rspamd-361cab554aed4c8cd363ba0f5ed41aeb21d6f3ba.tar.gz rspamd-361cab554aed4c8cd363ba0f5ed41aeb21d6f3ba.zip |
[Minor] Fix pthreads linking
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 388e9914f..71c5d1761 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,8 @@ INCLUDE(OSDep) # Now find libraries and headers LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "m") +LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "pthread") + IF(ENABLE_LUAJIT MATCHES "ON") ProcessPackage(LIBLUAJIT LIBRARY "luajit" "luajit-2.1" @@ -177,7 +179,6 @@ IF(ENABLE_JEMALLOC MATCHES "ON" AND NOT SANITIZE) ProcessPackage(JEMALLOC LIBRARY jemalloc_pic jemalloc INCLUDE jemalloc.h INCLUDE_SUFFIXES include/jemalloc ROOT ${JEMALLOC_ROOT_DIR}) SET(WITH_JEMALLOC "1") - LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "-lpthread") ENDIF() IF(ENABLE_LIBUNWIND MATCHES "ON") @@ -433,7 +434,6 @@ TRY_RUN(_CAN_RUN _CAN_COMPILE CMAKE_FLAGS CMAKE_C_FLAGS="-pthread") IF(_CAN_RUN EQUAL 1) SET(HAVE_PTHREAD_PROCESS_SHARED 1 CACHE INTERNAL "") - LIST(APPEND RSPAMD_REQUIRED_LIBRARIES "-lpthread") ENDIF(_CAN_RUN EQUAL 1) IF(HAVE_PTHREAD_PROCESS_SHARED) MESSAGE(STATUS "pthread_mutexattr_setpshared is supported") |