From 068a2cf28665794fc06e9f7430363f839d3cd36c Mon Sep 17 00:00:00 2001 From: Jolene Tan Date: Fri, 5 Jan 2024 13:32:21 -0500 Subject: [PATCH] find_package(Threads) regardless of BUILD_ONLY_LIB --- .CMake/compiler_opts.cmake | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.CMake/compiler_opts.cmake b/.CMake/compiler_opts.cmake index 083529b32c..33fd2c24db 100644 --- a/.CMake/compiler_opts.cmake +++ b/.CMake/compiler_opts.cmake @@ -104,10 +104,8 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang") add_link_options("-Wl,-z,noexecstack") endif() - if(NOT ${OQS_BUILD_ONLY_LIB}) - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads) - endif() + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads) if(${OQS_DEBUG_BUILD}) add_compile_options(-g3) @@ -165,10 +163,8 @@ elseif(CMAKE_C_COMPILER_ID STREQUAL "GNU") endif() endif() - if(NOT ${OQS_BUILD_ONLY_LIB}) - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads) - endif() + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(Threads) if(${OQS_DEBUG_BUILD}) add_compile_options (-Wstrict-overflow)