From 4837f616017592793614e53c8d0f6f9f8795c835 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Tue, 8 Aug 2017 10:25:17 +0100 Subject: [PATCH] Use the new way to set -pthread. --- src/kamokan_impl/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kamokan_impl/CMakeLists.txt b/src/kamokan_impl/CMakeLists.txt index e7bc17c..54f3ead 100644 --- a/src/kamokan_impl/CMakeLists.txt +++ b/src/kamokan_impl/CMakeLists.txt @@ -1,6 +1,9 @@ project(kamokan_impl VERSION 0.2.5 LANGUAGES CXX) +set(THREADS_PREFER_PTHREAD_FLAG ON) + find_package(SourceHighlight REQUIRED) +find_package(Threads REQUIRED) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -44,9 +47,8 @@ target_link_libraries(${PROJECT_NAME} PRIVATE incredis PRIVATE ${SourceHighlight_LIBRARIES} PUBLIC mstch - PRIVATE pthread + PRIVATE Threads::Threads PUBLIC tawashi - PRIVATE pthread ) target_compile_definitions(${PROJECT_NAME} PRIVATE BOOST_SPIRIT_USE_PHOENIX_V3=1