Skip to content

Commit

Permalink
Use find_package for pthread dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
ysohma committed Oct 23, 2023
1 parent 08e4bb3 commit d089446
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contrib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ include(GNUInstallDirs)
# Set C++11 as default standard
set(CMAKE_CXX_STANDARD 11)

set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)

get_filename_component(gemmlowp_src ${gemmlowp_SOURCE_DIR} PATH)

if(WIN32)
Expand All @@ -24,7 +27,7 @@ if(WIN32)
add_definitions(-DGEMMLOWP_ALLOW_INLINE_ASM)
endif()
else()
set(EXTERNAL_LIBRARIES "pthread")
set(EXTERNAL_LIBRARIES Threads::Threads)
endif()

# Glob header files
Expand Down

0 comments on commit d089446

Please sign in to comment.