Skip to content
Snippets Groups Projects
Commit 76070d77 authored by Matteo Cicuttin's avatar Matteo Cicuttin
Browse files

Added pthreads to CMakeLists.txt.

parent 374afe26
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,9 @@ include(FetchContent) ...@@ -6,6 +6,9 @@ include(FetchContent)
set(CMAKE_CXX_STANDARD 14) set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
option(ENABLE_KOKKOS "Enable Kokkos" ON) option(ENABLE_KOKKOS "Enable Kokkos" ON)
if (ENABLE_KOKKOS) if (ENABLE_KOKKOS)
FetchContent_Declare(kokkos FetchContent_Declare(kokkos
...@@ -54,6 +57,7 @@ if (ENABLE_SINGLE) ...@@ -54,6 +57,7 @@ if (ENABLE_SINGLE)
endif() endif()
target_compile_definitions(fd_catalog_single PUBLIC -DSINGLE_PRECISION) target_compile_definitions(fd_catalog_single PUBLIC -DSINGLE_PRECISION)
target_link_libraries(fd_catalog_single siloh5) target_link_libraries(fd_catalog_single siloh5)
target_link_libraries(fd_catalog_single Threads::Threads)
endif() endif()
option(ENABLE_DOUBLE "Enable double precision build" ON) option(ENABLE_DOUBLE "Enable double precision build" ON)
...@@ -67,4 +71,5 @@ if (ENABLE_DOUBLE) ...@@ -67,4 +71,5 @@ if (ENABLE_DOUBLE)
add_executable(fd_catalog_double fd_main.cpp) add_executable(fd_catalog_double fd_main.cpp)
endif() endif()
target_link_libraries(fd_catalog_double siloh5) target_link_libraries(fd_catalog_double siloh5)
target_link_libraries(fd_catalog_double Threads::Threads)
endif() endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment