vcpkg/ports/netcdf-c/mpi.patch
Alexander Neumann d19c61353d [netcdf-c] Fix builds with hdf5[parallel] (#9721)
* [netcdf-c] Fix builds with hdf5[parallel]

* Update mpi.patch
2020-01-27 12:04:35 -08: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 "")