Skip to content

Commit eee9aa7

Browse files
committed
Add lib threads to umf_utils
1 parent 51d9aa4 commit eee9aa7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

benchmark/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

5+
include(FindThreads)
6+
57
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
68
message(WARNING "The ubench SHOULD NOT be run in the Debug build type!")
79
endif()
@@ -29,7 +31,7 @@ target_include_directories(ubench PRIVATE ${UMF_CMAKE_SOURCE_DIR}/include/)
2931
target_link_libraries(ubench
3032
umf
3133
${LIBS_OPTIONAL}
32-
pthread
34+
${CMAKE_THREAD_LIBS_INIT}
3335
m)
3436

3537
if (UMF_BUILD_OS_MEMORY_PROVIDER)

src/utils/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ endif()
2222

2323
add_umf_library(NAME umf_utils
2424
TYPE STATIC
25-
SRCS ${UMF_UTILS_SOURCES})
25+
SRCS ${UMF_UTILS_SOURCES}
26+
LIBS ${CMAKE_THREAD_LIBS_INIT})
2627

2728
add_library(${PROJECT_NAME}::utils ALIAS umf_utils)
2829

0 commit comments

Comments
 (0)