diff options
author | Kevin Rocard <kevin.rocard@intel.com> | 2015-04-03 20:46:00 +0200 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2015-04-24 13:39:13 -0700 |
commit | 702bf6b441aa7758022f72fcfbc6de7660dddd40 (patch) | |
tree | f2edeb97b528443a05449db8546c677d60541cd1 | |
parent | 09af813fef22c2c3cbb34795e290ebab3db65e35 (diff) | |
download | external_parameter-framework-702bf6b441aa7758022f72fcfbc6de7660dddd40.zip external_parameter-framework-702bf6b441aa7758022f72fcfbc6de7660dddd40.tar.gz external_parameter-framework-702bf6b441aa7758022f72fcfbc6de7660dddd40.tar.bz2 |
Require PTHREAD using cmake canonic way
Pthread was required by included directly findPthread.cmake
then testing for success.
Use the find_package command and require success with the REQUIRED
option.
Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
-rw-r--r-- | remote-processor/CMakeLists.txt | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/remote-processor/CMakeLists.txt b/remote-processor/CMakeLists.txt index 23307a1..598bd4f 100644 --- a/remote-processor/CMakeLists.txt +++ b/remote-processor/CMakeLists.txt @@ -37,12 +37,8 @@ add_library(remote-processor SHARED RemoteProcessorServerBuilder.cpp) set(CMAKE_THREAD_PREFER_PTHREAD 1) -include(FindThreads) -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) +find_package(Threads REQUIRED) + target_link_libraries(remote-processor ${CMAKE_THREAD_LIBS_INIT}) install(TARGETS remote-processor LIBRARY DESTINATION lib) |