Skip to content

Commit f11823e

Browse files
authored
Merge pull request oneapi-src#1343 from igchor/add_pthread_umf
[UR] Add missing Threads library to common
2 parents c96e4ae + 619cdbb commit f11823e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

source/common/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,10 @@ target_link_libraries(ur_common PUBLIC
4747
${CMAKE_DL_LIBS}
4848
${PROJECT_NAME}::headers
4949
)
50+
51+
if (UNIX)
52+
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
53+
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
54+
find_package(Threads REQUIRED)
55+
target_link_libraries(ur_common PUBLIC Threads::Threads)
56+
endif()

0 commit comments

Comments
 (0)