diff --git a/CMakeLists.txt b/CMakeLists.txt index 65cd96174..cdd7ea5d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -650,9 +650,11 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) # Determine whether parallel filter operation is supported. IF(${HDF5_VERSION} VERSION_LESS ${HDF5_PAR_FILTER_VERSION}) - SET(HDF5_HAS_PAR_FILTERS, "no") + SET(HDF5_HAS_PAR_FILTERS FALSE CACHE BOOL "") + SET(HAS_PAR_FILTERS no CACHE STRING "") ELSE() - SET(HDF5_HAS_PAR_FILTERS, "yes") + SET(HDF5_HAS_PAR_FILTERS TRUE CACHE BOOL "") + SET(HAS_PAR_FILTERS yes CACHE STRING "") ENDIF() ## @@ -1151,7 +1153,7 @@ IF(ENABLE_ZERO_LENGTH_COORD_BOUND) ENDIF() # Enable Parallel Tests. -OPTION(ENABLE_PARALLEL_TESTS "Enable Parallel IO Tests. Requires HDF5/NetCDF4 with parallel I/O Support." ${USE_PARALLEL}) +OPTION(ENABLE_PARALLEL_TESTS "Enable Parallel IO Tests. Requires HDF5/NetCDF4 with parallel I/O Support." "${HDF5_PARALLEL}") IF(ENABLE_PARALLEL_TESTS AND USE_PARALLEL) SET(TEST_PARALLEL ON CACHE BOOL "") IF(USE_NETCDF4) @@ -1978,8 +1980,8 @@ is_enabled(JNA HAS_JNA) is_enabled(ENABLE_ZERO_LENGTH_COORD_BOUND RELAX_COORD_BOUND) is_enabled(USE_CDF5 HAS_CDF5) is_enabled(ENABLE_ERANGE_FILL HAS_ERANGE_FILL) -is_enabled(HDF5_HAS_PAR_FILTERS HAS_PAR_FILTERS) is_enabled(HAVE_H5Z_SZIP HAS_SZLIB) +is_enabled(HDF5_HAS_PAR_FILTERS HAS_PAR_FILTERS) # Generate file from template. CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libnetcdf.settings.in" diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 7506065ed..4c3031238 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -7,6 +7,8 @@ This file contains a high-level description of this package's evolution. Release ## 4.8.0 - TBD +* [Bug Fix][cmake] Correct an issue with parallel filter test logic in CMake-based builds. + ## 4.7.4 - March 27, 2020 * [Windows] Bumped packaged HDF5 to 1.10.6, HDF4 to 4.2.14, and libcurl to 7.60.0. diff --git a/config.h.cmake.in b/config.h.cmake.in index 390497273..bbeb7a346 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -381,6 +381,10 @@ are set when opening a binary file on Windows. */ /* if true, hdf5 has parallelism enabled */ #cmakedefine HDF5_PARALLEL 1 +/* if true, HDF5 is at least version 1.10. 3 and allows parallel I/O +with zip */ +#cmakedefine HDF5_SUPPORTS_PAR_FILTERS 1 + /* if true, include JNA bug fix */ #cmakedefine JNA 1 diff --git a/nc_test4/run_par_test.sh.in b/nc_test4/run_par_test.sh.in index 3b7ed4fe6..77f2e9676 100644 --- a/nc_test4/run_par_test.sh.in +++ b/nc_test4/run_par_test.sh.in @@ -5,6 +5,8 @@ # Ed Hartnett, Dennis Heimbigner, Ward Fisher +set -e + if test "x$srcdir" = x ; then srcdir=`pwd`; fi . ../test_common.sh