summaryrefslogtreecommitdiffstats
path: root/remote-processor
diff options
context:
space:
mode:
authorDavid Wagner <david.wagner@intel.com>2014-02-20 12:15:50 +0100
committerDavid Wagner <david.wagner@intel.com>2014-02-20 12:15:50 +0100
commit7ab2809a1caf90155e789bf818ace60f21387a6a (patch)
tree3e525c8344cffa1d91bfe84b6fa8b99882c879d6 /remote-processor
parentfefdd77a3b254bbe3e566c4592816d37720a58c9 (diff)
downloadexternal_parameter-framework-7ab2809a1caf90155e789bf818ace60f21387a6a.zip
external_parameter-framework-7ab2809a1caf90155e789bf818ace60f21387a6a.tar.gz
external_parameter-framework-7ab2809a1caf90155e789bf818ace60f21387a6a.tar.bz2
CMake: Force POSIX threads to be available
The FindThreads module in CMake can detect several thread libraries. We only want the phtread library, so enforce it. Signed-off-by: David Wagner <david.wagner@intel.com>
Diffstat (limited to 'remote-processor')
-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)