windows-amd64-prebuilt-libr.../vcpkg/ports/netcdf-c/mpi.patch
2020-10-10 14:36:42 +02:00

15 lines
489 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 101f97719..b070121b8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1004,6 +1004,8 @@ IF(ENABLE_PARALLEL4 AND ENABLE_NETCDF_4)
IF(MSVC)
FIND_PACKAGE(MPI REQUIRED)
INCLUDE_DIRECTORIES(${MPI_C_INCLUDE_PATH})
+ list(APPEND CMAKE_REQUIRED_LIBRARIES MPI::MPI_C)
+ list(APPEND EXTRA_DEPS MPI::MPI_C)
ENDIF()
SET(HDF5_PARALLEL ON CACHE BOOL "")
SET(USE_PARALLEL ON CACHE BOOL "")