From 3c4593110a38932e207d961e57cfa5df53f09b58 Mon Sep 17 00:00:00 2001 From: Alexej Doronin Date: Fri, 15 Nov 2024 11:33:30 +0200 Subject: [PATCH] Add Pthreads to tests --- test/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ac2d8bc..d4d38a1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -24,7 +24,12 @@ SOFTWARE. enable_testing() +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_package(Threads REQUIRED) + add_library(rpcxx-test-deps INTERFACE) +target_link_libraries(rpcxx-test-deps INTERFACE Threads::Threads) + if(RPCXX_TEST_SANITIZERS AND NOT MSVC) target_compile_options(rpcxx-test-deps INTERFACE -fsanitize=undefined,address) target_link_options(rpcxx-test-deps INTERFACE -fsanitize=undefined,address)