Change linking of MPI with cmake

This commit is contained in:
Matt Borland 2024-07-11 15:26:00 -04:00
parent 0c4584ca0c
commit 9e3f61d233
No known key found for this signature in database
GPG Key ID: 30EFCE23CA65A72C

View File

@ -45,7 +45,6 @@ else()
Boost::fusion
Boost::iterator
Boost::math
Boost::mpi
Boost::mpl
Boost::multi_array
Boost::numeric_ublas
@ -58,6 +57,14 @@ else()
Boost::utility
)
# From CMake 3.30 linking against MPI when it does not exist gives errors
if(BOOST_ENABLE_MPI)
target_link_libraries(boost_numeric_odeint
INTERFACE
Boost::mpi
)
endif()
endif()
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")