Skip to content

Commit

Permalink
Merge pull request #1343 from igchor/add_pthread_umf
Browse files Browse the repository at this point in the history
[UR] Add missing Threads library to common
  • Loading branch information
kbenzie authored Feb 15, 2024
2 parents c96e4ae + 619cdbb commit f11823e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,10 @@ target_link_libraries(ur_common PUBLIC
${CMAKE_DL_LIBS}
${PROJECT_NAME}::headers
)

if (UNIX)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)
target_link_libraries(ur_common PUBLIC Threads::Threads)
endif()

0 comments on commit f11823e

Please sign in to comment.