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)