Skip to content

Commit

Permalink
cmake: link MPI-based builds to the MPI targets
Browse files Browse the repository at this point in the history
  • Loading branch information
program-- committed Sep 7, 2023
1 parent c4fe28c commit 152836b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ else ()
)
endif ()

if(NGEN_WITH_MPI)
target_link_libraries(core PUBLIC MPI::MPI_C MPI::MPI_CXX)
endif()

add_subdirectory("catchment")
add_subdirectory("nexus")
add_subdirectory("hydrolocation")
Expand Down
4 changes: 4 additions & 0 deletions src/core/nexus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ target_include_directories(core_nexus PUBLIC
target_link_libraries(core_nexus PUBLIC
Boost::boost # Headers-only Boost
)

if(NGEN_WITH_MPI)
target_link_libraries(core_nexus PUBLIC MPI::MPI_C MPI::MPI_CXX)
endif()

0 comments on commit 152836b

Please sign in to comment.