switch cmake build to check for func H5Dread_chunk to detect 1.10.3 or later

This commit is contained in:
Edward Hartnett 2020-01-21 07:42:14 -07:00
parent a15126e2d2
commit 0735a45178
2 changed files with 5 additions and 5 deletions

View File

@ -751,8 +751,8 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
SET(HDF5_CC h5cc)
ENDIF()
# Check to see if this is hdf5-1.10.2 or later.
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5DOread_chunk "" HDF5_SUPPORTS_PAR_FILTERS)
# Check to see if this is hdf5-1.10.3 or later.
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Dread_chunk "" HDF5_SUPPORTS_PAR_FILTERS)
SET(H5_USE_16_API 1)
OPTION(NC_ENABLE_HDF_16_API "Enable HDF5 1.6.x Compatibility(Required)" ON)

View File

@ -1055,12 +1055,12 @@ if test "x$enable_hdf5" = xyes; then
AC_MSG_CHECKING([whether parallel io is enabled in hdf5])
AC_MSG_RESULT([$hdf5_parallel])
# Check to see if HDF5 library is 1.10.2 or greater. If so, allows parallel_zip.
# Check to see if HDF5 library is 1.10.3 or greater. If so, allows parallel_zip.
if test "x$ac_cv_func_H5Dread_chunk" = xyes; then
AC_DEFINE([HDF5_SUPPORTS_PAR_FILTERS], [1], [if true, HDF5 is at least version 1.10.2 and allows parallel I/O with zip])
AC_DEFINE([HDF5_SUPPORTS_PAR_FILTERS], [1], [if true, HDF5 is at least version 1.10.3 and allows parallel I/O with zip])
hdf5_supports_par_filters=yes
fi
AC_MSG_CHECKING([whether HDF5 is version 1.10.2 or greater])
AC_MSG_CHECKING([whether HDF5 is version 1.10.3 or greater])
AC_MSG_RESULT([$ac_cv_func_H5Dread_chunk])
AC_SUBST([HAS_PAR_FILTERS], [$hdf5_supports_par_filters])