Skip to content

Commit

Permalink
cmake: add mpi detour to root listfile and link to ngen
Browse files Browse the repository at this point in the history
  • Loading branch information
program-- committed Mar 15, 2024
1 parent 9821ac4 commit 7cf8df5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/utilities/mpi/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
add_library(MPIDetour SHARED "${CMAKE_CURRENT_LIST_DIR}/MPIDetour.c")
add_library(NGen::MPI_Detour ALIAS MPIDetour)

0 comments on commit 7cf8df5

Please sign in to comment.