Replace ENABLE_HDF5 with NETCDF_ENABLE_HDF5

This commit is contained in:
Kyle Shores 2024-03-18 15:36:59 -05:00
parent 376f6b8314
commit c5f24df396
8 changed files with 39 additions and 39 deletions

View File

@ -73,11 +73,11 @@ jobs:
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
- run: |
echo "NETCDF_ENABLE_HDF4=--disable-hdf4" >> $GITHUB_ENV
echo "ENABLE_HDF5=--disable-hdf5" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF5=--disable-hdf5" >> $GITHUB_ENV
if: matrix.use_nc4 == 'nc3'
- run: |
echo "NETCDF_ENABLE_HDF4=--enable-hdf4" >> $GITHUB_ENV
echo "ENABLE_HDF5=--enable-hdf5" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF5=--enable-hdf5" >> $GITHUB_ENV
if: matrix.use_nc4 == 'nc4'
- run: echo "NETCDF_ENABLE_DAP=--disable-dap" >> $GITHUB_ENV
if: matrix.use_dap == 'dap_off'
@ -116,7 +116,7 @@ jobs:
- name: Configure
shell: bash -l {0}
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./configure ${ENABLE_HDF5} ${NETCDF_ENABLE_DAP} ${ENABLE_NCZARR}
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./configure ${NETCDF_ENABLE_HDF5} ${NETCDF_ENABLE_DAP} ${ENABLE_NCZARR}
if: ${{ success() }}
- name: Look at config.log if error
@ -145,7 +145,7 @@ jobs:
# - name: Make Distcheck
# shell: bash -l {0}
# run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} DISTCHECK_CONFIGURE_FLAGS="${NETCDF_ENABLE_HDF4} ${ENABLE_HDF5} ${NETCDF_ENABLE_DAP} ${ENABLE_NCZARR}" make distcheck
# run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} DISTCHECK_CONFIGURE_FLAGS="${NETCDF_ENABLE_HDF4} ${NETCDF_ENABLE_HDF5} ${NETCDF_ENABLE_DAP} ${ENABLE_NCZARR}" make distcheck
# if: ${{ success() }}
#- name: Start SSH Debug
@ -178,11 +178,11 @@ jobs:
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
- run: |
echo "NETCDF_ENABLE_HDF4=OFF" >> $GITHUB_ENV
echo "ENABLE_HDF5=OFF" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF5=OFF" >> $GITHUB_ENV
if: matrix.use_nc4 == 'nc3'
- run: |
echo "NETCDF_ENABLE_HDF4=ON" >> $GITHUB_ENV
echo "ENABLE_HDF5=ON" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF5=ON" >> $GITHUB_ENV
if: matrix.use_nc4 == 'nc4'
- run: echo "NETCDF_ENABLE_DAP=OFF" >> $GITHUB_ENV
if: matrix.use_dap == 'dap_off'
@ -218,7 +218,7 @@ jobs:
run: |
mkdir build
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=${NETCDF_ENABLE_DAP} -DENABLE_HDF5=${ENABLE_HDF5} -DENABLE_NCZARR=${ENABLE_NCZARR}
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=${NETCDF_ENABLE_DAP} -DNETCDF_ENABLE_HDF5=${NETCDF_ENABLE_HDF5} -DENABLE_NCZARR=${ENABLE_NCZARR}
- name: Print Summary
shell: bash -l {0}
@ -375,7 +375,7 @@ jobs:
run: |
mkdir build
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D NETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DENABLE_LIBXML2=FALSE
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DNETCDF_ENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D NETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DENABLE_LIBXML2=FALSE
- name: Print Summary
shell: bash -l {0}
@ -450,7 +450,7 @@ jobs:
run: |
mkdir build
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D NETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DENABLE_LIBXML2=FALSE -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DNETCDF_ENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D NETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DENABLE_LIBXML2=FALSE -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
- name: Print Summary
shell: bash -l {0}

View File

@ -440,7 +440,7 @@ jobs:
run: |
mkdir build
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -DNETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DENABLE_LIBXML2=FALSE
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DNETCDF_ENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -DNETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DENABLE_LIBXML2=FALSE
- name: Print Summary
shell: bash -l {0}
@ -521,7 +521,7 @@ jobs:
run: |
mkdir build
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -DNETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DENABLE_LIBXML2=FALSE -DBUILD_SHARED_LIBS=FALSE -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DNETCDF_ENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -DNETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DENABLE_LIBXML2=FALSE -DBUILD_SHARED_LIBS=FALSE -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}
- name: Print Summary
shell: bash -l {0}
@ -602,7 +602,7 @@ jobs:
run: |
mkdir build
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_C_COMPILER=mpicc -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D NETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DENABLE_PNETCDF=TRUE
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_C_COMPILER=mpicc -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=TRUE -DNETCDF_ENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D NETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DENABLE_PNETCDF=TRUE
- name: Print Summary
shell: bash -l {0}
@ -679,10 +679,10 @@ jobs:
- run: echo "LDFLAGS=-L${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
- run: |
echo "ENABLE_HDF5=--disable-hdf5" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF5=--disable-hdf5" >> $GITHUB_ENV
if: matrix.use_nc4 == 'nc3'
- run: |
echo "ENABLE_HDF5=--enable-hdf5" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF5=--enable-hdf5" >> $GITHUB_ENV
if: matrix.use_nc4 == 'nc4'
- run: echo "NETCDF_ENABLE_DAP=--disable-dap" >> $GITHUB_ENV
if: matrix.use_dap == 'dap_off'
@ -738,7 +738,7 @@ jobs:
done
current_directory="$(pwd)"
mkdir ../build
cd ../build && CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} "${current_directory}/configure" ${ENABLE_HDF5} ${NETCDF_ENABLE_DAP} ${ENABLE_NCZARR}
cd ../build && CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} "${current_directory}/configure" ${NETCDF_ENABLE_HDF5} ${NETCDF_ENABLE_DAP} ${ENABLE_NCZARR}
if: ${{ success() }}
- name: Look at config.log if error
@ -821,10 +821,10 @@ jobs:
- run: echo "CMAKE_PREFIX_PATH=${HOME}/environments/${{ matrix.hdf5 }}/" >> $GITHUB_ENV
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
- run: |
echo "ENABLE_HDF5=OFF" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF5=OFF" >> $GITHUB_ENV
if: matrix.use_nc4 == 'nc3'
- run: |
echo "ENABLE_HDF5=ON" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF5=ON" >> $GITHUB_ENV
if: matrix.use_nc4 == 'nc4'
- run: echo "NETCDF_ENABLE_DAP=OFF" >> $GITHUB_ENV
if: matrix.use_dap == 'dap_off'
@ -860,7 +860,7 @@ jobs:
run: |
mkdir build
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=${NETCDF_ENABLE_DAP} -DENABLE_HDF5=${ENABLE_HDF5} -DENABLE_NCZARR=${ENABLE_NCZARR}
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DNETCDF_ENABLE_DAP=${NETCDF_ENABLE_DAP} -DNETCDF_ENABLE_HDF5=${NETCDF_ENABLE_HDF5} -DENABLE_NCZARR=${ENABLE_NCZARR}
- name: Print Summary
shell: bash -l {0}

View File

@ -431,14 +431,14 @@ endif()
# but for back compatability, we need to treat enable-netcdf4
# as equivalent to enable-hdf5.
# We detect this using these rules:
# 1. if ENABLE_HDF5 is off then disable hdf5
# 1. if NETCDF_ENABLE_HDF5 is off then disable hdf5
# 2. if ENABLE_NETCDF4 is off then disable hdf5
# 3. else enable hdf5
option(ENABLE_NETCDF_4 "Use HDF5." ON)
option(ENABLE_NETCDF4 "Use HDF5." ON)
option(ENABLE_HDF5 "Use HDF5." ON)
if(NOT ENABLE_HDF5 OR NOT ENABLE_NETCDF4 OR NOT ENABLE_NETCDF_4)
set(ENABLE_HDF5 OFF CACHE BOOL "Use HDF5" FORCE)
option(NETCDF_ENABLE_HDF5 "Use HDF5." ON)
if(NOT NETCDF_ENABLE_HDF5 OR NOT ENABLE_NETCDF4 OR NOT ENABLE_NETCDF_4)
set(NETCDF_ENABLE_HDF5 OFF CACHE BOOL "Use HDF5" FORCE)
endif()
option(NETCDF_ENABLE_HDF4 "Build netCDF-4 with HDF4 read capability(HDF4, HDF5 and Zlib required)." OFF)
option(NETCDF_ENABLE_DAP "Enable DAP2 and DAP4 Client." ON)
@ -449,7 +449,7 @@ option(NETCDF_ENABLE_CDF5 "Enable CDF5 support" ON)
# Netcdf-4 support (i.e. libsrc4) is required by more than just HDF5 (e.g. NCZarr)
# So depending on what above formats are enabled, enable netcdf-4
if(ENABLE_HDF5 OR NETCDF_ENABLE_HDF4 OR ENABLE_NCZARR)
if(NETCDF_ENABLE_HDF5 OR NETCDF_ENABLE_HDF4 OR ENABLE_NCZARR)
set(ENABLE_NETCDF_4 ON CACHE BOOL "Enable netCDF-4 API" FORCE)
set(ENABLE_NETCDF4 ON CACHE BOOL "Enable netCDF4 Alias" FORCE)
endif()
@ -517,19 +517,19 @@ endif(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING)
# 3. is nczarr enabled?
# We need separate flags for cases 1 and 2
set(USE_HDF5 ${ENABLE_HDF5})
set(USE_HDF5 ${NETCDF_ENABLE_HDF5})
if(NETCDF_ENABLE_DAP)
set(USE_DAP ON CACHE BOOL "")
set(NETCDF_ENABLE_DAP2 ON CACHE BOOL "")
if(ENABLE_HDF5)
if(NETCDF_ENABLE_HDF5)
message(STATUS "Enabling DAP4")
set(NETCDF_ENABLE_DAP4 ON CACHE BOOL "")
else()
message(STATUS "Disabling DAP4")
set(NETCDF_ENABLE_DAP4 OFF CACHE BOOL "")
endif(ENABLE_HDF5)
endif(NETCDF_ENABLE_HDF5)
else()
set(NETCDF_ENABLE_DAP2 OFF CACHE BOOL "")
@ -714,7 +714,7 @@ if(NOT ENABLE_REMOTE_FUNCTIONALITY)
set(ENABLE_S3 OFF CACHE BOOL "" FORCE)
set(ENABLE_S3_INTERNAL OFF CACHE BOOL "" FORCE)
set(ENABLE_NCZARR_S3 OFF CACHE BOOL "" FORCE)
set(ENABLE_HDF5_ROS3 OFF CACHE BOOL "Use ROS3" FORCE)
set(NETCDF_ENABLE_HDF5_ROS3 OFF CACHE BOOL "Use ROS3" FORCE)
set(WITH_S3_TESTING OFF CACHE STRING "" FORCE)
endif()
@ -740,9 +740,9 @@ endif()
option(ENABLE_LIBXML2 "Link against libxml2 if it is available, use the packaged tinyxml2 parser otherwise." ON)
set(XMLPARSER "tinyxml2 (bundled)")
if(NOT NETCDF_ENABLE_BYTERANGE AND ENABLE_HDF5_ROS3)
if(NOT NETCDF_ENABLE_BYTERANGE AND NETCDF_ENABLE_HDF5_ROS3)
message(WARNING "ROS3 support requires NETCDF_ENABLE_BYTERANGE=TRUE; disabling ROS3 support")
set(ENABLE_HDF5_ROS3 OFF CACHE BOOL "ROS3 support" FORCE)
set(NETCDF_ENABLE_HDF5_ROS3 OFF CACHE BOOL "ROS3 support" FORCE)
endif()
##
@ -851,7 +851,7 @@ if(ENABLE_LARGE_FILE_SUPPORT)
endif()
option(NETCDF_ENABLE_EXAMPLE_TESTS "Run extra example tests. Requires GNU Sed. Ignored if HDF5 is not Enabled" OFF)
if(NOT ENABLE_HDF5 AND NETCDF_ENABLE_EXAMPLE_TESTS)
if(NOT NETCDF_ENABLE_HDF5 AND NETCDF_ENABLE_EXAMPLE_TESTS)
set(NETCDF_ENABLE_EXAMPLE_TESTS OFF)
endif()
@ -869,7 +869,7 @@ include(cmake/dependencies.cmake)
set(STATUS_PARALLEL "OFF")
set(IMPORT_MPI "")
option(ENABLE_PARALLEL4 "Build netCDF-4 with parallel IO" "${HDF5_PARALLEL}")
if(ENABLE_PARALLEL4 AND ENABLE_HDF5)
if(ENABLE_PARALLEL4 AND NETCDF_ENABLE_HDF5)
if(NOT HDF5_PARALLEL)
set(USE_PARALLEL OFF CACHE BOOL "")
message(STATUS "Cannot find HDF5 library built with parallel support. Disabling parallel build.")
@ -967,7 +967,7 @@ endif()
option(NETCDF_ENABLE_FILTER_TESTING "Enable filter testing. Ignored if shared libraries or netCDF4 are not enabled" ${ENABLE_PLUGINS})
if(NETCDF_ENABLE_FILTER_TESTING)
if(NOT ENABLE_HDF5 AND NOT ENABLE_NCZARR)
if(NOT NETCDF_ENABLE_HDF5 AND NOT ENABLE_NCZARR)
message(WARNING "NETCDF_ENABLE_FILTER_TESTING requires HDF5 and/or NCZarr. Disabling.")
set(NETCDF_ENABLE_FILTER_TESTING OFF CACHE BOOL "Enable Filter Testing" FORCE)
endif()

View File

@ -201,7 +201,7 @@ if(USE_HDF5)
# Record if ROS3 Driver is available
if(HAS_HDF5_ROS3)
set(ENABLE_HDF5_ROS3 ON )
set(NETCDF_ENABLE_HDF5_ROS3 ON )
endif()
IF (HDF5_SUPPORTS_PAR_FILTERS)

View File

@ -125,7 +125,7 @@ are set when opening a binary file on Windows. */
#endif
/* if true, use hdf5 S3 virtual file reader */
#cmakedefine ENABLE_HDF5_ROS3 1
#cmakedefine NETCDF_ENABLE_HDF5_ROS3 1
/* if true, enable CDF5 Support */
#cmakedefine NETCDF_ENABLE_CDF5 1

View File

@ -1639,7 +1639,7 @@ if test "x$enable_hdf5" = xyes; then
# See if hdf5 library supports Read-Only S3 (byte-range) driver
AC_SEARCH_LIBS([H5Pset_fapl_ros3],[hdf5_hldll hdf5_hl], [has_hdf5_ros3=yes], [has_hdf5_ros3=no])
if test "x$has_hdf5_ros3" = xyes && test "x$enable_byterange" = xyes; then
AC_DEFINE([ENABLE_HDF5_ROS3], [1], [if true, support byte-range using hdf5 virtual file driver.])
AC_DEFINE([NETCDF_ENABLE_HDF5_ROS3], [1], [if true, support byte-range using hdf5 virtual file driver.])
fi
# Check to see if HDF5 library is 1.10.3 or greater. If so, allows

View File

@ -24,7 +24,7 @@
#include "H5FDhttp.h"
#endif
#ifdef ENABLE_HDF5_ROS3
#ifdef NETCDF_ENABLE_HDF5_ROS3
#include <H5FDros3.h>
#include "ncs3sdk.h"
#endif
@ -885,7 +885,7 @@ nc4_open_file(const char *path, int mode, void* parameters, int ncid)
#ifdef NETCDF_ENABLE_BYTERANGE
else if(h5->byterange) { /* Arrange to use the byte-range drivers */
char* newpath = NULL;
#ifdef ENABLE_HDF5_ROS3
#ifdef NETCDF_ENABLE_HDF5_ROS3
H5FD_ros3_fapl_t fa;
const char* awsaccessid0 = NULL;
const char* awssecretkey0 = NULL;

View File

@ -19,14 +19,14 @@ IF(USE_X_GETOPT)
SET(XGETOPTSRC "${CMAKE_CURRENT_SOURCE_DIR}/../libdispatch/XGetopt.c")
ENDIF()
IF(ENABLE_HDF5)
IF(NETCDF_ENABLE_HDF5)
IF(NOT MSVC)
add_bin_test(unit_test tst_nclist)
add_bin_test(unit_test tst_nc4internal)
ENDIF(NOT MSVC)
build_bin_test(tst_reclaim ${XGETOPTSRC})
add_sh_test(unit_test run_reclaim_tests)
ENDIF(ENABLE_HDF5)
ENDIF(NETCDF_ENABLE_HDF5)
# Path convert test(s)
add_bin_test(unit_test test_pathcvt)