From 7cf8df5b3816e429c26246774f802b8a865a38a7 Mon Sep 17 00:00:00 2001 From: program-- Date: Fri, 15 Mar 2024 15:29:24 -0700 Subject: [PATCH] cmake: add mpi detour to root listfile and link to ngen --- CMakeLists.txt | 5 +++++ src/utilities/mpi/CMakeLists.txt | 1 + 2 files changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f4e604a5c9..39f86278ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -330,6 +330,7 @@ add_subdirectory("src/forcing") add_subdirectory("src/utilities/mdarray") add_subdirectory("src/utilities/mdframe") add_subdirectory("src/utilities/logging") +add_subdirectory("src/utilities/mpi") target_link_libraries(ngen PUBLIC @@ -344,6 +345,10 @@ target_link_libraries(ngen NGen::logging ) +if(NGEN_WITH_MPI) + target_link_libraries(ngen PUBLIC NGen::MPI_Detour) +endif() + if(NGEN_WITH_SQLITE) add_subdirectory("src/geopackage") target_link_libraries(ngen PUBLIC NGen::geopackage) diff --git a/src/utilities/mpi/CMakeLists.txt b/src/utilities/mpi/CMakeLists.txt index 6e1bdac4b0..6a60ce387b 100644 --- a/src/utilities/mpi/CMakeLists.txt +++ b/src/utilities/mpi/CMakeLists.txt @@ -1 +1,2 @@ add_library(MPIDetour SHARED "${CMAKE_CURRENT_LIST_DIR}/MPIDetour.c") +add_library(NGen::MPI_Detour ALIAS MPIDetour)