[netcdf-c] Fix builds with hdf5[parallel] (#9721)

* [netcdf-c] Fix builds with hdf5[parallel]

* Update mpi.patch
This commit is contained in:
Alexander Neumann 2020-01-27 21:04:35 +01:00 committed by Victor Romero
parent f787fa4113
commit d19c61353d
3 changed files with 16 additions and 1 deletions

View File

@ -1,5 +1,5 @@
Source: netcdf-c
Version: 4.7.3
Version: 4.7.3-1
Build-Depends: hdf5, curl
Homepage: https://github.com/Unidata/netcdf-c
Description: a set of self-describing, machine-independent data formats that support the creation, access, and sharing of array-oriented scientific data.

14
ports/netcdf-c/mpi.patch Normal file
View File

@ -0,0 +1,14 @@
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 "")

View File

@ -8,6 +8,7 @@ vcpkg_from_github(
no-install-deps.patch
config-pkg-location.patch
use_targets.patch
mpi.patch
)
#Remove outdated find modules