Skip to content

Commit

Permalink
find_package(Threads) regardless of BUILD_ONLY_LIB
Browse files Browse the repository at this point in the history
  • Loading branch information
zxjtan committed Jan 5, 2024
1 parent ed86578 commit 715c7fe
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions .CMake/compiler_opts.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 715c7fe

Please sign in to comment.