Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[netcdf-c] Fix linkage error #14421

Merged
merged 1 commit into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions ports/netcdf-c/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Source: netcdf-c
Version: 4.7.4
Port-Version: 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.
19 changes: 19 additions & 0 deletions ports/netcdf-c/fix-linkage-error.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/liblib/CMakeLists.txt b/liblib/CMakeLists.txt
index 8aeeab7..5b578f7 100644
--- a/liblib/CMakeLists.txt
+++ b/liblib/CMakeLists.txt
@@ -70,8 +70,14 @@ ENDIF()
IF(USE_HDF5 OR USE_NETCDF4)
if(TARGET hdf5::hdf5-shared)
SET(TLL_LIBS ${TLL_LIBS} hdf5::hdf5-shared hdf5::hdf5_hl-shared)
+ if(USE_PARALLEL)
+ list(APPEND TLL_LIBS ${MPI_C_LIBRARIES})
+ endif()
else()
SET(TLL_LIBS ${TLL_LIBS} hdf5::hdf5-static hdf5::hdf5_hl-static)
+ if(USE_PARALLEL)
+ list(APPEND TLL_LIBS ${MPI_C_LIBRARIES})
+ endif()
endif()
ENDIF()

1 change: 1 addition & 0 deletions ports/netcdf-c/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ vcpkg_from_github(
config-pkg-location.patch
use_targets.patch
fix-dependency-libmath.patch
fix-linkage-error.patch
)

#Remove outdated find modules
Expand Down