aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--remote-processor/CMakeLists.txt8
1 files changed, 6 insertions, 2 deletions
diff --git a/remote-processor/CMakeLists.txt b/remote-processor/CMakeLists.txt
index 60b6ff2..7b2cf0c 100644
--- a/remote-processor/CMakeLists.txt
+++ b/remote-processor/CMakeLists.txt
@@ -8,9 +8,13 @@ add_library(remote-processor SHARED
RemoteProcessorServer.cpp
RemoteProcessorServerBuilder.cpp)
+set(CMAKE_THREAD_PREFER_PTHREAD 1)
include(FindThreads)
-# TODO: use the "prefer pthread" option; check if we are using pthread (what to
-# do else ?)
+if(NOT CMAKE_USE_PTHREADS_INIT)
+ message(SEND_ERROR "
+ pthread library not found! Please install the POSIX thread library and
+ headers.")
+endif(NOT CMAKE_USE_PTHREADS_INIT)
target_link_libraries(remote-processor ${CMAKE_THREAD_LIBS_INIT})
install(TARGETS remote-processor LIBRARY DESTINATION lib)