diff --git a/kokkos-testing/fd_catalog/CMakeLists.txt b/kokkos-testing/fd_catalog/CMakeLists.txt index a6f85c540ea35cb3f231233eb1689e794777b6b5..d715441356a4f1637b2da709b1db62d5e2e3a832 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()