From 76070d777ee1f9b37108d12ad7d7ea57190f4d98 Mon Sep 17 00:00:00 2001 From: Matteo Cicuttin <datafl4sh@toxicnet.eu> Date: Mon, 23 Mar 2020 16:52:40 +0100 Subject: [PATCH] Added pthreads to CMakeLists.txt. --- kokkos-testing/fd_catalog/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kokkos-testing/fd_catalog/CMakeLists.txt b/kokkos-testing/fd_catalog/CMakeLists.txt index a6f85c5..d715441 100644 --- a/kokkos-testing/fd_catalog/CMakeLists.txt +++ b/kokkos-testing/fd_catalog/CMakeLists.txt @@ -6,6 +6,9 @@ include(FetchContent) set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_package(Threads REQUIRED) + option(ENABLE_KOKKOS "Enable Kokkos" ON) if (ENABLE_KOKKOS) FetchContent_Declare(kokkos @@ -54,6 +57,7 @@ if (ENABLE_SINGLE) endif() target_compile_definitions(fd_catalog_single PUBLIC -DSINGLE_PRECISION) target_link_libraries(fd_catalog_single siloh5) + target_link_libraries(fd_catalog_single Threads::Threads) endif() option(ENABLE_DOUBLE "Enable double precision build" ON) @@ -67,4 +71,5 @@ if (ENABLE_DOUBLE) add_executable(fd_catalog_double fd_main.cpp) endif() target_link_libraries(fd_catalog_double siloh5) + target_link_libraries(fd_catalog_double Threads::Threads) endif() -- GitLab