diff --git a/src/nvector/manyvector/CMakeLists.txt b/src/nvector/manyvector/CMakeLists.txt index 9c2f2a867d..60c4e81e0c 100644 --- a/src/nvector/manyvector/CMakeLists.txt +++ b/src/nvector/manyvector/CMakeLists.txt @@ -59,7 +59,8 @@ if(BUILD_NVECTOR_MPIMANYVECTOR) ${SUNDIALS_SOURCE_DIR}/include/nvector/nvector_mpimanyvector.h INCLUDE_SUBDIR nvector - LINK_LIBRARIES MPI::MPI_C + LINK_LIBRARIES + PUBLIC MPI::MPI_C OBJECT_LIBRARIES sundials_generic_obj COMPILE_DEFINITIONS diff --git a/src/nvector/mpiplusx/CMakeLists.txt b/src/nvector/mpiplusx/CMakeLists.txt index b36f525d85..cf8c47a923 100644 --- a/src/nvector/mpiplusx/CMakeLists.txt +++ b/src/nvector/mpiplusx/CMakeLists.txt @@ -32,7 +32,8 @@ sundials_add_library(sundials_nvecmpiplusx ${SUNDIALS_SOURCE_DIR}/include/nvector/nvector_mpiplusx.h INCLUDE_SUBDIR nvector - LINK_LIBRARIES MPI::MPI_C + LINK_LIBRARIES + PUBLIC MPI::MPI_C OBJECT_LIBRARIES sundials_generic_obj sundials_nvecmpimanyvector_obj diff --git a/src/nvector/parallel/CMakeLists.txt b/src/nvector/parallel/CMakeLists.txt index a1f05db62a..d13a32ae18 100644 --- a/src/nvector/parallel/CMakeLists.txt +++ b/src/nvector/parallel/CMakeLists.txt @@ -32,7 +32,8 @@ sundials_add_library(sundials_nvecparallel ${SUNDIALS_SOURCE_DIR}/include/nvector/nvector_parallel.h INCLUDE_SUBDIR nvector - LINK_LIBRARIES MPI::MPI_C + LINK_LIBRARIES + PUBLIC MPI::MPI_C OBJECT_LIBRARIES sundials_generic_obj OUTPUT_NAME