From b0de090de49915987f02faab8dd4b85cd51d00ce Mon Sep 17 00:00:00 2001 From: Logan oos Even <46396513+Logan007@users.noreply.github.com> Date: Sun, 29 Aug 2021 08:53:09 +0200 Subject: [PATCH] Revert "correct wrong pthread lib switch logic (#755)" (#756) This reverts commit 8e3fa33863a15090daf95b5de451820d737a19ad. --- CMakeLists.txt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aa02bb2..266e64a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,18 +40,17 @@ add_definitions(-DN2N_VERSION="${N2N_VERSION}" -DN2N_OSNAME="${N2N_OSNAME}") OPTION(BUILD_SHARED_LIBS "BUILD Shared Library" OFF) # N2n specific params -OPTION(N2N_OPTION_USE_PTHREAD "USE PTHREAD Library" ON) +OPTION(N2N_OPTION_USE_PTHREAD "USE PTHREAD Library" OFF) OPTION(N2N_OPTION_USE_OPENSSL "USE OPENSSL Library" OFF) OPTION(N2N_OPTION_USE_PCAPLIB "USE PCAP Library" OFF) OPTION(N2N_OPTION_USE_ZSTD "USE ZSTD Library" OFF) -if(N2N_OPTION_USE_PTHREAD) - find_library(PTHREAD_LIB pthread) - if(PTHREAD_LIB) - ADD_DEFINITIONS("-DHAVE_PTHREAD") - endif(PTHREAD_LIB) -endif(N2N_OPTION_USE_PTHREAD) +find_library(PTHREAD_LIB pthread) +if(PTHREAD_LIB) + set(N2N_OPTION_USE_PTHREAD ON) + ADD_DEFINITIONS("-DHAVE_PTHREAD") +endif(PTHREAD_LIB) if(NOT DEFINED N2N_OPTION_USE_OPENSSL) set(N2N_OPTION_USE_OPENSSL OFF)