Merge pull request #2895 from K20shores/prefix_options

Prefix all options with NETCDF_
This commit is contained in:
Ward Fisher 2024-03-20 12:07:23 -06:00 committed by GitHub
commit 37e6b92703
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
132 changed files with 868 additions and 814 deletions

View File

@ -72,20 +72,20 @@ 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_HDF4=--disable-hdf4" >> $GITHUB_ENV
echo "ENABLE_HDF5=--disable-hdf5" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF4=--disable-hdf4" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF5=--disable-hdf5" >> $GITHUB_ENV
if: matrix.use_nc4 == 'nc3'
- run: |
echo "ENABLE_HDF4=--enable-hdf4" >> $GITHUB_ENV
echo "ENABLE_HDF5=--enable-hdf5" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF4=--enable-hdf4" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF5=--enable-hdf5" >> $GITHUB_ENV
if: matrix.use_nc4 == 'nc4'
- run: echo "ENABLE_DAP=--disable-dap" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_DAP=--disable-dap" >> $GITHUB_ENV
if: matrix.use_dap == 'dap_off'
- run: echo "ENABLE_DAP=--enable-dap" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_DAP=--enable-dap" >> $GITHUB_ENV
if: matrix.use_dap == 'dap_on'
- run: echo "ENABLE_NCZARR=--disable-nczarr" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_NCZARR=--disable-nczarr" >> $GITHUB_ENV
if: matrix.use_nczarr == 'nczarr_off'
- run: echo "ENABLE_NCZARR=--enable-nczarr" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_NCZARR=--enable-nczarr" >> $GITHUB_ENV
if: matrix.use_nczarr == 'nczarr_on'
###
@ -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} ${ENABLE_DAP} ${ENABLE_NCZARR}
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./configure ${NETCDF_ENABLE_HDF5} ${NETCDF_ENABLE_DAP} ${NETCDF_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="${ENABLE_HDF4} ${ENABLE_HDF5} ${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} ${NETCDF_ENABLE_NCZARR}" make distcheck
# if: ${{ success() }}
#- name: Start SSH Debug
@ -177,20 +177,20 @@ 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_HDF4=OFF" >> $GITHUB_ENV
echo "ENABLE_HDF5=OFF" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF4=OFF" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF5=OFF" >> $GITHUB_ENV
if: matrix.use_nc4 == 'nc3'
- run: |
echo "ENABLE_HDF4=ON" >> $GITHUB_ENV
echo "ENABLE_HDF5=ON" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF4=ON" >> $GITHUB_ENV
echo "NETCDF_ENABLE_HDF5=ON" >> $GITHUB_ENV
if: matrix.use_nc4 == 'nc4'
- run: echo "ENABLE_DAP=OFF" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_DAP=OFF" >> $GITHUB_ENV
if: matrix.use_dap == 'dap_off'
- run: echo "ENABLE_DAP=ON" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_DAP=ON" >> $GITHUB_ENV
if: matrix.use_dap == 'dap_on'
- run: echo "ENABLE_NCZARR=OFF" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_NCZARR=OFF" >> $GITHUB_ENV
if: matrix.use_nczarr == 'nczarr_off'
- run: echo "ENABLE_NCZARR=ON" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_NCZARR=ON" >> $GITHUB_ENV
if: matrix.use_nczarr == 'nczarr_on'
- run: echo "CTEST_OUTPUT_ON_FAILURE=1" >> $GITHUB_ENV
@ -218,7 +218,7 @@ jobs:
run: |
mkdir build
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DENABLE_DAP=${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} -DNETCDF_ENABLE_NCZARR=${NETCDF_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} -DENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D 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 -DNETCDF_ENABLE_NCZARR=TRUE -D NETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DNETCDF_ENABLE_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} -DENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D 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 -DNETCDF_ENABLE_NCZARR=TRUE -D NETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DNETCDF_ENABLE_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} -DENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -DENABLE_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 -DNETCDF_ENABLE_NCZARR=TRUE -DNETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DNETCDF_ENABLE_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} -DENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -DENABLE_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 -DNETCDF_ENABLE_NCZARR=TRUE -DNETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DNETCDF_ENABLE_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} -DENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D 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 -DNETCDF_ENABLE_NCZARR=TRUE -D NETCDF_ENABLE_DAP_LONG_TESTS=TRUE -DNETCDF_ENABLE_PNETCDF=TRUE
- name: Print Summary
shell: bash -l {0}
@ -679,18 +679,18 @@ 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 "ENABLE_DAP=--disable-dap" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_DAP=--disable-dap" >> $GITHUB_ENV
if: matrix.use_dap == 'dap_off'
- run: echo "ENABLE_DAP=--enable-dap" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_DAP=--enable-dap" >> $GITHUB_ENV
if: matrix.use_dap == 'dap_on'
- run: echo "ENABLE_NCZARR=--disable-nczarr" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_NCZARR=--disable-nczarr" >> $GITHUB_ENV
if: matrix.use_nczarr == 'nczarr_off'
- run: echo "ENABLE_NCZARR=--enable-nczarr" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_NCZARR=--enable-nczarr" >> $GITHUB_ENV
if: matrix.use_nczarr == 'nczarr_on'
###
@ -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} ${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} ${NETCDF_ENABLE_NCZARR}
if: ${{ success() }}
- name: Look at config.log if error
@ -821,18 +821,18 @@ 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 "ENABLE_DAP=OFF" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_DAP=OFF" >> $GITHUB_ENV
if: matrix.use_dap == 'dap_off'
- run: echo "ENABLE_DAP=ON" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_DAP=ON" >> $GITHUB_ENV
if: matrix.use_dap == 'dap_on'
- run: echo "ENABLE_NCZARR=OFF" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_NCZARR=OFF" >> $GITHUB_ENV
if: matrix.use_nczarr == 'nczarr_off'
- run: echo "ENABLE_NCZARR=ON" >> $GITHUB_ENV
- run: echo "NETCDF_ENABLE_NCZARR=ON" >> $GITHUB_ENV
if: matrix.use_nczarr == 'nczarr_on'
- run: echo "CTEST_OUTPUT_ON_FAILURE=1" >> $GITHUB_ENV
@ -860,7 +860,7 @@ jobs:
run: |
mkdir build
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DENABLE_DAP=${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} -DNETCDF_ENABLE_NCZARR=${NETCDF_ENABLE_NCZARR}
- name: Print Summary
shell: bash -l {0}

File diff suppressed because it is too large Load Diff

View File

@ -69,11 +69,11 @@ would specify it with the '-G' flag.
Common NetCDF/CMake Options
*********************
- ENABLE_NETCDF_4 (On by Default)
- ENABLE_DAP (On by Default)
- NETCDF_ENABLE_NETCDF_4 (On by Default)
- NETCDF_ENABLE_DAP (On by Default)
- BUILD_SHARED_LIBS (Off by Default for Windows,
On by Default for Unix/Linux)
- ENABLE_DLL (Windows Only, Off by Default)
- NETCDF_ENABLE_DLL (Windows Only, Off by Default)
- CMAKE_PREFIX_PATH (Specify list of
This is just a partial list of options available. To see a full list
@ -81,7 +81,7 @@ of options, run 'cmake -L' from the command line, or use a CMake GUI.
To specify an option with CMake, you would use the following syntax:
developer@dummy-machine:/netcdf/build_dir$ cmake .. -D"ENABLE_NETCDF_4=ON"
developer@dummy-machine:/netcdf/build_dir$ cmake .. -D"NETCDF_ENABLE_NETCDF_4=ON"
-D"BUILD_SHARED_LIBS=ON" -D"USE_HDF5=OFF"
Additional References

View File

@ -49,7 +49,7 @@ V2_TEST = nctest
endif
# Does the user want to build ncgen/ncdump?
if BUILD_UTILITIES
if NETCDF_BUILD_UTILITIES
NCGEN3 = ncgen3
NCGEN = ncgen
NCDUMP = ncdump
@ -76,21 +76,21 @@ endif
endif
# Build the dap2 client
if ENABLE_DAP
if NETCDF_ENABLE_DAP
OCLIB = oc2
DAP2 = libdap2
NCDAP2TESTDIR = ncdap_test
endif
if ENABLE_DAP4
if NETCDF_ENABLE_DAP4
DAP4 = libdap4
NCDAP4TESTDIR = dap4_test
XML = libncxml
endif #DAP4
if ENABLE_S3_INTERNAL
if NETCDF_ENABLE_S3_INTERNAL
XML = libncxml # Internal S3 requires XML
endif #ENABLE_S3_INTERNAL
endif #NETCDF_ENABLE_S3_INTERNAL
# Build PnetCDF
if USE_PNETCDF
@ -104,18 +104,18 @@ LIBHDF4 = libhdf4
endif
# Build Plugin support
if ENABLE_PLUGINS
if NETCDF_ENABLE_PLUGINS
NCPOCO = libncpoco
endif
# Build Cloud Storage if desired.
if ENABLE_NCZARR
if NETCDF_ENABLE_NCZARR
ZARR_TEST_DIR = nczarr_test
ZARR = libnczarr
endif
# Optionally build test plugins
if ENABLE_PLUGINS
if NETCDF_ENABLE_PLUGINS
PLUGIN_DIR = plugins
endif
@ -210,7 +210,7 @@ install-data-hook:
# Also track the S3 cleanup id
all-local: liblib/libnetcdf.la
echo ${PACKAGE_VERSION} > VERSION
if ENABLE_S3_TESTALL
if NETCDF_ENABLE_S3_TESTALL
rm -f ${abs_top_builddir}/tmp_@PLATFORMUID@.uids
echo "@TESTUID@" >> ${abs_top_builddir}/s3cleanup_@PLATFORMUID@.uids
cat ${abs_top_builddir}/s3cleanup_@PLATFORMUID@.uids | sort | uniq > ${abs_top_builddir}/tmp_@PLATFORMUID@.uids
@ -218,7 +218,7 @@ if ENABLE_S3_TESTALL
mv ${abs_top_builddir}/tmp_@PLATFORMUID@.uids ${abs_top_builddir}/s3cleanup_@PLATFORMUID@.uids
endif
if ENABLE_S3_TESTALL
if NETCDF_ENABLE_S3_TESTALL
distclean-local:
rm -f ${abs_top_builddir}/s3cleanup_@PLATFORMUID@.uids
endif

View File

@ -7,6 +7,7 @@ This file contains a high-level description of this package's evolution. Release
## 4.9.3 - TBD
* Changed `cmake` build options to be prefaced with `NETCDF`, to bring things in to line with best practices. This will permit a number of overall quality of life improvements to netCDF, in terms of allowing it to be more easily integrated with upstream projects via `FetchContent()`, `subdirectory()`, etc. Currently, the naming convention in use thus far will still work, but will result in warning messages about deprecation, and instructions on how to update your workflow. See [Github #2895](https://github.com/Unidata/netcdf-c/pull/2895) for more information.
* Fix some problems in handling S3 urls with missing regions. See [Github #2819](https://github.com/Unidata/netcdf-c/pull/2819).
* Incorporate a more modern look and feel to user documentation generated by Doxygen. See [Doxygen Awesome CSS](https://github.com/jothepro/doxygen-awesome-css) and [Github #2864](https://github.com/Unidata/netcdf-c/pull/2864) for more information.
* Added infrastructure to allow for `CMAKE_UNITY_BUILD`, (thanks \@jschueller). See [Github #2839](https://github.com/Unidata/netcdf-c/pull/2839) for more information.

View File

@ -36,7 +36,7 @@ build: off
build_script:
- cmd: mkdir build
- cmd: cd build
- cmd: cmake .. -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%INSTALL_LOC% -DENABLE_BASH_SCRIPT_TESTING=OFF -DENABLE_FILTER_TESTING=OFF -DENABLE_BYTERANGE=ON
- cmd: cmake .. -G "%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%INSTALL_LOC% -DNETCDF_ENABLE_BASH_SCRIPT_TESTING=OFF -DNETCDF_ENABLE_FILTER_TESTING=OFF -DNETCDF_ENABLE_BYTERANGE=ON
- cmd: if errorlevel 1 exit 1
- cmd: cmake --build . --config Release -- /maxcpucount:4

View File

@ -14,7 +14,7 @@ find_package(MakeDist)
################################
# HDF4
################################
if(ENABLE_HDF4)
if(NETCDF_ENABLE_HDF4)
set(USE_HDF4 ON )
# Check for include files, libraries.
@ -69,8 +69,8 @@ if(ENABLE_HDF4)
message(STATUS "Found JPEG libraries: ${JPEG_LIB}")
# Option to enable HDF4 file tests.
option(ENABLE_HDF4_FILE_TESTS "Run HDF4 file tests. This fetches sample HDF4 files from the Unidata ftp site to test with (requires curl)." ON)
if(ENABLE_HDF4_FILE_TESTS)
option(NETCDF_ENABLE_HDF4_FILE_TESTS "Run HDF4 file tests. This fetches sample HDF4 files from the Unidata ftp site to test with (requires curl)." ON)
if(NETCDF_ENABLE_HDF4_FILE_TESTS)
find_program(PROG_CURL NAMES curl)
if(PROG_CURL)
set(USE_HDF4_FILE_TESTS ON )
@ -114,10 +114,10 @@ if(USE_HDF5)
# as a shared library, we will use hdf5 as a shared
# library. If we are building netcdf statically,
# we will use a static library. This can be toggled
# by explicitly modifying NC_FIND_SHARED_LIBS.
# by explicitly modifying NETCDF_FIND_SHARED_LIBS.
##
#if (MSVC)
# if(NC_FIND_SHARED_LIBS)
# if(NETCDF_FIND_SHARED_LIBS)
# set(HDF5_USE_STATIC_LIBRARIES OFF)
# else()
# set(HDF5_USE_STATIC_LIBRARIES ON)
@ -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)
@ -240,8 +240,8 @@ set(FOUND_CURL ${FOUND_CURL} TRUE )
# Start disabling if curl not found
if(NOT FOUND_CURL)
message(WARNING "ENABLE_REMOTE_FUNCTIONALITY requires libcurl; disabling")
set(ENABLE_REMOTE_FUNCTIONALITY OFF CACHE BOOL "ENABLE_REMOTE_FUNCTIONALITY requires libcurl; disabling" FORCE )
message(WARNING "NETCDF_ENABLE_REMOTE_FUNCTIONALITY requires libcurl; disabling")
set(NETCDF_ENABLE_REMOTE_FUNCTIONALITY OFF CACHE BOOL "NETCDF_ENABLE_REMOTE_FUNCTIONALITY requires libcurl; disabling" FORCE )
endif()
set (CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS})
@ -346,18 +346,18 @@ endif()
################################
# Zips
################################
IF (ENABLE_FILTER_SZIP)
IF (NETCDF_ENABLE_FILTER_SZIP)
find_package(Szip)
elseif(ENABLE_NCZARR)
elseif(NETCDF_ENABLE_NCZARR)
find_package(Szip)
endif()
IF (ENABLE_FILTER_BZ2)
IF (NETCDF_ENABLE_FILTER_BZ2)
find_package(Bz2)
endif()
IF (ENABLE_FILTER_BLOSC)
IF (NETCDF_ENABLE_FILTER_BLOSC)
find_package(Blosc)
endif()
IF (ENABLE_FILTER_ZSTD)
IF (NETCDF_ENABLE_FILTER_ZSTD)
find_package(Zstd)
endif()
@ -381,7 +381,7 @@ else()
set(STD_FILTERS "${STD_FILTERS} bz2")
endif()
IF (ENABLE_NCZARR_ZIP)
IF (NETCDF_ENABLE_NCZARR_ZIP)
find_package(Zip REQUIRED)
target_include_directories(netcdf
PRIVATE
@ -395,20 +395,20 @@ endif ()
# Note we check for the library after checking for enable_s3
# because for some reason this screws up if we unconditionally test for sdk
# and it is not available. Fix someday
if(ENABLE_S3)
if(NOT ENABLE_S3_INTERNAL)
if(NETCDF_ENABLE_S3)
if(NOT NETCDF_ENABLE_S3_INTERNAL)
# See if aws-s3-sdk is available
find_package(AWSSDK REQUIRED COMPONENTS s3;transfer)
if(AWSSDK_FOUND)
set(ENABLE_S3_AWS ON CACHE BOOL "S3 AWS" FORCE)
set(NETCDF_ENABLE_S3_AWS ON CACHE BOOL "S3 AWS" FORCE)
target_include_directories(netcdf
PRIVATE
${AWSSDK_INCLUDE_DIR}
)
else(AWSSDK_FOUND)
set(ENABLE_S3_AWS OFF CACHE BOOL "S3 AWS" FORCE)
set(NETCDF_ENABLE_S3_AWS OFF CACHE BOOL "S3 AWS" FORCE)
endif(AWSSDK_FOUND)
else(NOT ENABLE_S3_INTERNAL)
else(NOT NETCDF_ENABLE_S3_INTERNAL)
# Find crypto libraries required with testing with the internal s3 api.
#find_library(SSL_LIB NAMES ssl openssl)
find_package(OpenSSL REQUIRED)
@ -421,16 +421,16 @@ if(ENABLE_S3)
# message(FATAL_ERROR "Can't find a crypto library, required by S3_INTERNAL")
#endif(NOT CRYPTO_LIB)
endif(NOT ENABLE_S3_INTERNAL)
endif(NOT NETCDF_ENABLE_S3_INTERNAL)
else()
set(ENABLE_S3_AWS OFF CACHE BOOL "S3 AWS" FORCE)
set(NETCDF_ENABLE_S3_AWS OFF CACHE BOOL "S3 AWS" FORCE)
endif()
################################
# LibXML
################################
# see if we have libxml2
if(ENABLE_LIBXML2)
if(NETCDF_ENABLE_LIBXML2)
find_package(LibXml2)
if(LibXml2_FOUND)
set(HAVE_LIBXML2 TRUE)
@ -442,19 +442,19 @@ if(ENABLE_LIBXML2)
else()
set(HAVE_LIBXML2 FALSE)
endif()
endif(ENABLE_LIBXML2)
endif(NETCDF_ENABLE_LIBXML2)
################################
# MPI
################################
if(ENABLE_PARALLEL4 OR HDF5_PARALLEL)
if(NETCDF_ENABLE_PARALLEL4 OR HDF5_PARALLEL)
find_package(MPI REQUIRED)
endif()
################################
# Parallel IO
################################
if(ENABLE_PNETCDF)
if(NETCDF_ENABLE_PNETCDF)
find_package(PNETCDF 1.6.0 REQUIRED)
if(NOT PNETCDF_HAS_RELAXED_COORD_BOUND)
message(FATAL_ERROR "Pnetcdf must be built with relax-coord-bound enabled")
@ -465,7 +465,7 @@ endif()
# Doxygen
################################
if(ENABLE_DOXYGEN)
if(NETCDF_ENABLE_DOXYGEN)
find_package(Doxygen REQUIRED)
endif()

39
cmake/deprecated.cmake Normal file
View File

@ -0,0 +1,39 @@
#######
# Check for deprecated arguments, provide warning, and set the
# corresponding option.
#
# This file is being added in support of https://github.com/Unidata/netcdf-c/pull/2895 and may eventually
# no longer be necessary and removed in the future.
#
#######
function(check_depr_opt arg)
if(DEFINED ${arg})
set(val ${${arg}})
message(WARNING "${arg} is deprecated and will be removed. Please use NETCDF_${arg} in the future")
set(NETCDF_${arg} ${val} PARENT_SCOPE)
set(DEPR_OPT "${DEPR_OPT}\n\to ${arg} --> NETCDF_${arg}" PARENT_SCOPE)
endif()
endfunction()
message(STATUS "Checking for Deprecated Options")
list(APPEND opts BUILD_UTILITIES ENABLE_BENCHMARKS ENABLE_BYTERANGE ENABLE_CDF5 ENABLE_CONVERSION_WARNINGS)
list(APPEND opts ENABLE_DAP ENABLE_DAP2 ENABLE_DAP4 ENABLE_DISKLESS ENABLE_DOXYGEN ENABLE_ERANGE_FILL)
list(APPEND opts ENABLE_EXAMPLES ENABLE_EXAMPLES_TESTS ENABLE_EXTREME_NUMBERS ENABLE_FFIO ENABLE_FILTER_BLOSC)
list(APPEND opts ENABLEFILTER_BZ2 ENABLE_FILTER_SZIP ENABLE_FILTER_TESTING ENABLE_FILTER_ZSTD ENABLE_FSYNC)
list(APPEND opts ENABLE_HDF4 ENABLE_HDF5 ENABLE_LARGE_FILE_SUPPORT ENABLE_LARGE_FILE_TESTS ENABLE_LIBXML2)
list(APPEND opts ENABLE_LOGGING ENABLE_METADATA_PERF_TESTS ENABLE_MMAP ENABLE_NCZARR ENABLE_NCZARR_FILTERS)
list(APPEND opts ENABLE_NCZARR_S3 ENABLE_NCZARR_ZIP ENABLE_NETCDF_4 ENABLE_PARALLEL4 ENABLE_PARALLEL_TESTS)
list(APPEND opts ENABLE_PLUGINS ENABLE_PNETCDF ENABLE_QUANTIZE ENABLE_REMOTE_FUNCTIONALITY ENABLE_S3 ENABLE_S3_AWS)
list(APPEND opts ENABLE_S3_INTERNAL ENABLE_STDIO ENABLE_STRICT_NULL_BYTE_HEADER_PADDING ENABLE_TESTS ENABLE_UNIT_TESTS)
list(APPEND opts FIND_SHARED_LIBS LIB_NAME)
foreach(opt ${opts})
#MESSAGE(STATUS "Option: ${opt}")
check_depr_opt(${opt})
endforeach()

View File

@ -219,11 +219,11 @@ macro(print_conf_summary)
message("Configuration Summary:")
message("")
message(STATUS "Building Shared Libraries: ${BUILD_SHARED_LIBS}")
message(STATUS "Building netCDF-4: ${ENABLE_NETCDF_4}")
message(STATUS "Building DAP2 Support: ${ENABLE_DAP2}")
message(STATUS "Building DAP4 Support: ${ENABLE_DAP4}")
message(STATUS "Building Byte-range Support: ${ENABLE_BYTERANGE}")
message(STATUS "Building Utilities: ${BUILD_UTILITIES}")
message(STATUS "Building netCDF-4: ${NETCDF_ENABLE_NETCDF_4}")
message(STATUS "Building DAP2 Support: ${NETCDF_ENABLE_DAP2}")
message(STATUS "Building DAP4 Support: ${NETCDF_ENABLE_DAP4}")
message(STATUS "Building Byte-range Support: ${NETCDF_ENABLE_BYTERANGE}")
message(STATUS "Building Utilities: ${NETCDF_BUILD_UTILITIES}")
if(CMAKE_PREFIX_PATH)
message(STATUS "CMake Prefix Path: ${CMAKE_PREFIX_PATH}")
endif()
@ -236,15 +236,15 @@ macro(print_conf_summary)
message("")
endif()
message("Tests Enabled: ${ENABLE_TESTS}")
if(ENABLE_TESTS)
message(STATUS "DAP Remote Tests: ${ENABLE_DAP_REMOTE_TESTS}")
message(STATUS "Extra Tests: ${ENABLE_EXTRA_TESTS}")
message(STATUS "Coverage Tests: ${ENABLE_COVERAGE_TESTS}")
message(STATUS "Parallel Tests: ${ENABLE_PARALLEL_TESTS}")
message(STATUS "Large File Tests: ${ENABLE_LARGE_FILE_TESTS}")
message(STATUS "Extreme Numbers: ${ENABLE_EXTREME_NUMBERS}")
message(STATUS "Unit Tests: ${ENABLE_UNIT_TESTS}")
message("Tests Enabled: ${NETCDF_ENABLE_TESTS}")
if(NETCDF_ENABLE_TESTS)
message(STATUS "DAP Remote Tests: ${NETCDF_ENABLE_DAP_REMOTE_TESTS}")
message(STATUS "Extra Tests: ${NETCDF_ENABLE_EXTRA_TESTS}")
message(STATUS "Coverage Tests: ${NETCDF_ENABLE_COVERAGE_TESTS}")
message(STATUS "Parallel Tests: ${NETCDF_ENABLE_PARALLEL_TESTS}")
message(STATUS "Large File Tests: ${NETCDF_ENABLE_LARGE_FILE_TESTS}")
message(STATUS "Extreme Numbers: ${NETCDF_ENABLE_EXTREME_NUMBERS}")
message(STATUS "Unit Tests: ${NETCDF_ENABLE_UNIT_TESTS}")
endif()
message("")

View File

@ -7,7 +7,7 @@ cmake -G "Visual Studio 15 Win64" ^
-D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
-D BUILD_SHARED_LIBS=ON ^
-D ENABLE_TESTS=ON ^
-D ENABLE_HDF4=ON ^
-D NETCDF_ENABLE_HDF4=ON ^
-D CMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
-D ZLIB_LIBRARY=%LIBRARY_LIB%\zlib.lib ^
-D ZLIB_INCLUDE_DIR=%LIBRARY_INC% ^

View File

@ -113,22 +113,22 @@ are set when opening a binary file on Windows. */
#cmakedefine DLL_NETCDF 1
/* if true, use atexist */
#cmakedefine ENABLE_ATEXIT_FINALIZE 1
#cmakedefine NETCDF_ENABLE_ATEXIT_FINALIZE 1
/* if true, build byte-range Client */
#cmakedefine ENABLE_BYTERANGE 1
#cmakedefine NETCDF_ENABLE_BYTERANGE 1
/* if true, enable ERANGE fill */
#cmakedefine ENABLE_ERANGE_FILL 1
#ifdef ENABLE_ERANGE_FILL
#cmakedefine NETCDF_ENABLE_ERANGE_FILL 1
#ifdef NETCDF_ENABLE_ERANGE_FILL
#define ERANGE_FILL 1
#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 ENABLE_CDF5 1
#cmakedefine NETCDF_ENABLE_CDF5 1
/* if true, enable client side filters */
#cmakedefine ENABLE_CLIENT_FILTERS 1
@ -137,34 +137,34 @@ are set when opening a binary file on Windows. */
#cmakedefine USE_STRICT_NULL_BYTE_HEADER_PADDING 1
/* if true, build DAP2 and DAP4 Client */
#cmakedefine ENABLE_DAP 1
#cmakedefine NETCDF_ENABLE_DAP 1
/* if true, build DAP4 Client */
#cmakedefine ENABLE_DAP4 1
#cmakedefine NETCDF_ENABLE_DAP4 1
/* if true, do remote tests */
#cmakedefine ENABLE_DAP_REMOTE_TESTS 1
#cmakedefine NETCDF_ENABLE_DAP_REMOTE_TESTS 1
/* if true, enable NCZARR */
#cmakedefine ENABLE_NCZARR 1
#cmakedefine NETCDF_ENABLE_NCZARR 1
/* if true, enable nczarr filter support */
#cmakedefine ENABLE_NCZARR_FILTERS 1
#cmakedefine NETCDF_ENABLE_NCZARR_FILTERS 1
/* if true, enable nczarr zip support */
#cmakedefine ENABLE_NCZARR_ZIP 1
#cmakedefine NETCDF_ENABLE_NCZARR_ZIP 1
/* if true, Allow dynamically loaded plugins */
#cmakedefine ENABLE_PLUGINS 1
#cmakedefine NETCDF_ENABLE_PLUGINS 1
/* if true, enable S3 support */
#cmakedefine ENABLE_S3 1
#cmakedefine NETCDF_ENABLE_S3 1
/* if true, AWS S3 SDK is available */
#cmakedefine ENABLE_S3_AWS 1
#cmakedefine NETCDF_ENABLE_S3_AWS 1
/* if true, Force use of S3 internal library */
#cmakedefine ENABLE_S3_INTERNAL 1
#cmakedefine NETCDF_ENABLE_S3_INTERNAL 1
/* if true, enable S3 testing*/
#cmakedefine WITH_S3_TESTING "PUBLIC"
@ -302,7 +302,7 @@ are set when opening a binary file on Windows. */
#cmakedefine HAVE_LIBMFHDF 1
/* Define to 1 if you have the libxml2 library. */
#cmakedefine ENABLE_LIBXML2 1
#cmakedefine NETCDF_ENABLE_LIBXML2 1
/* Define to 1 if you have the <locale.h> header file. */
#cmakedefine HAVE_LOCALE_H 1
@ -484,8 +484,8 @@ with zip */
#cmakedefine NO_IEEE_FLOAT 1
#cmakedefine BUILD_V2 1
#cmakedefine ENABLE_DOXYGEN 1
#cmakedefine ENABLE_INTERNAL_DOCS 1
#cmakedefine NETCDF_ENABLE_DOXYGEN 1
#cmakedefine NETCDF_ENABLE_INTERNAL_DOCS 1
#cmakedefine VALGRIND_TESTS 1
#cmakedefine ENABLE_CDMREMOTE 1
#cmakedefine USE_HDF5 1
@ -493,7 +493,7 @@ with zip */
#cmakedefine TEST_PARALLEL ${TEST_PARALLEL}
#cmakedefine BUILD_RPC 1
#cmakedefine USE_X_GETOPT 1
#cmakedefine ENABLE_EXTREME_NUMBERS 1
#cmakedefine NETCDF_ENABLE_EXTREME_NUMBERS 1
/* do not build the netCDF version 2 API */
#cmakedefine NO_NETCDF_2 1

View File

@ -82,14 +82,14 @@ are set when opening a binary file on Windows. */
#cmakedefine NO_NETCDF_2 1
#cmakedefine USE_FSYNC 1
#cmakedefine JNA 1
#cmakedefine ENABLE_DOXYGEN 1
#cmakedefine ENABLE_INTERNAL_DOCS 1
#cmakedefine NETCDF_ENABLE_DOXYGEN 1
#cmakedefine NETCDF_ENABLE_INTERNAL_DOCS 1
#cmakedefine VALGRIND_TESTS 1
#cmakedefine ENABLE_CDMREMOTE 1
#cmakedefine USE_DAP 1
#cmakedefine ENABLE_DAP 1
#cmakedefine ENABLE_DAP_GROUPS 1
#cmakedefine ENABLE_DAP_REMOTE_TESTS 1
#cmakedefine NETCDF_ENABLE_DAP 1
#cmakedefine NETCDF_ENABLE_DAP_GROUPS 1
#cmakedefine NETCDF_ENABLE_DAP_REMOTE_TESTS 1
#cmakedefine EXTRA_TESTS
#cmakedefine USE_NETCDF4 1
#cmakedefine USE_HDF4 1
@ -110,7 +110,7 @@ are set when opening a binary file on Windows. */
#cmakedefine USE_DISKLESS 1
#cmakedefine USE_SZIP 1
#cmakedefine USE_X_GETOPT 1
#cmakedefine ENABLE_EXTREME_NUMBERS
#cmakedefine NETCDF_ENABLE_EXTREME_NUMBERS
#cmakedefine LARGE_FILE_TESTS 1
#cmakedefine HAVE_DECL_ISFINITE 1
#cmakedefine HAVE_DECL_ISNAN 1

View File

@ -280,8 +280,8 @@ AC_SUBST([DOXYGEN_SERVER_BASED_SEARCH], ["NO"])
AC_ARG_ENABLE([doxygen-pdf-output],
[AS_HELP_STRING([--enable-doxygen-pdf-output],
[Build netCDF library documentation in PDF format. Experimental.])])
AM_CONDITIONAL([NC_ENABLE_DOXYGEN_PDF_OUTPUT], [test "x$enable_doxygen_pdf_output" = xyes])
AC_SUBST([NC_ENABLE_DOXYGEN_PDF_OUTPUT], [$enable_doxygen_pdf_output])
AM_CONDITIONAL([NC_NETCDF_ENABLE_DOXYGEN_PDF_OUTPUT], [test "x$enable_doxygen_pdf_output" = xyes])
AC_SUBST([NC_NETCDF_ENABLE_DOXYGEN_PDF_OUTPUT], [$enable_doxygen_pdf_output])
AC_ARG_ENABLE([dot],
[AS_HELP_STRING([--enable-dot],
@ -596,7 +596,7 @@ XMLPARSER="tinyxml2 (bundled)"
fi
# Need a condition and subst for this
AM_CONDITIONAL(ENABLE_LIBXML2, [test "x$enable_libxml2" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_LIBXML2, [test "x$enable_libxml2" = xyes])
AC_SUBST([XMLPARSER],[${XMLPARSER}])
###
@ -616,9 +616,9 @@ test "x$enable_quantize" = xno || enable_quantize=yes
AC_MSG_RESULT($enable_quantize)
if test "x${enable_quantize}" = xyes; then
AC_DEFINE([ENABLE_QUANTIZE], [1], [if true, enable quantize support])
AC_DEFINE([NETCDF_ENABLE_QUANTIZE], [1], [if true, enable quantize support])
fi
AM_CONDITIONAL(ENABLE_QUANTIZE, [test x$enable_quantize = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_QUANTIZE, [test x$enable_quantize = xyes])
# --enable-dap => enable-dap4
enable_dap4=$enable_dap
@ -682,14 +682,14 @@ AC_DEFINE_UNQUOTED([REMOTETESTSERVERS], ["$REMOTETESTSERVERS"], [the testservers
# Set the config.h flags
if test "x$enable_dap" = xyes; then
AC_DEFINE([USE_DAP], [1], [if true, build DAP Client])
AC_DEFINE([ENABLE_DAP], [1], [if true, build DAP Client])
AC_DEFINE([NETCDF_ENABLE_DAP], [1], [if true, build DAP Client])
fi
if test "x$enable_dap_remote_tests" = xyes; then
AC_DEFINE([ENABLE_DAP_REMOTE_TESTS], [1], [if true, do remote tests])
AC_DEFINE([NETCDF_ENABLE_DAP_REMOTE_TESTS], [1], [if true, do remote tests])
fi
if test "x$enable_external_server_tests" = xyes; then
AC_DEFINE([ENABLE_EXTERNAL_SERVER_TESTS], [1], [if true, do remote external tests])
AC_DEFINE([NETCDF_ENABLE_EXTERNAL_SERVER_TESTS], [1], [if true, do remote external tests])
fi
AC_MSG_CHECKING([whether the time-consuming dap tests should be enabled (default off)])
@ -712,10 +712,10 @@ if test "x$enable_nczarr" = xyes ; then
fi
if test "x$enable_nczarr" = xyes; then
AC_DEFINE([ENABLE_NCZARR], [1], [if true, build NCZarr Client])
AC_SUBST(ENABLE_NCZARR)
AC_DEFINE([NETCDF_ENABLE_NCZARR], [1], [if true, build NCZarr Client])
AC_SUBST(NETCDF_ENABLE_NCZARR)
fi
AM_CONDITIONAL(ENABLE_NCZARR, [test x$enable_nczarr = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_NCZARR, [test x$enable_nczarr = xyes])
##########
# Look for Standardized libraries
@ -877,7 +877,7 @@ else
AC_MSG_RESULT([${enable_nczarr_zip}])
if test "x$enable_nczarr_zip" = xyes ; then
AC_DEFINE([ENABLE_NCZARR_ZIP], [1], [If true, then libzip found])
AC_DEFINE([NETCDF_ENABLE_NCZARR_ZIP], [1], [If true, then libzip found])
fi
# Check for enabling of S3 support
@ -969,23 +969,23 @@ else
fi
if test "x$enable_s3" = xyes ; then
AC_DEFINE([ENABLE_S3], [1], [if true, build netcdf-c with S3 support enabled])
AC_DEFINE([NETCDF_ENABLE_S3], [1], [if true, build netcdf-c with S3 support enabled])
fi
if test "x$enable_s3_aws" = xyes ; then
LIBS="$LIBS$S3LIBS"
AC_DEFINE([ENABLE_S3_AWS], [1], [If true, then use aws S3 library])
AC_DEFINE([NETCDF_ENABLE_S3_AWS], [1], [If true, then use aws S3 library])
fi
if test "x$enable_s3_internal" = xyes ; then
AC_DEFINE([ENABLE_S3_INTERNAL], [1], [If true, then use internal S3 library])
AC_DEFINE([NETCDF_ENABLE_S3_INTERNAL], [1], [If true, then use internal S3 library])
fi
AC_DEFINE_UNQUOTED([WITH_S3_TESTING], [$with_s3_testing], [control S3 testing.])
if test "x$with_s3_testing" = xyes ; then
AC_MSG_WARN([*** DO NOT SPECIFY WITH_S3_TESTING=YES UNLESS YOU HAVE ACCESS TO THE UNIDATA S3 BUCKET! ***])
AC_DEFINE([ENABLE_S3_TESTALL], [yes], [control S3 testing.])
AC_DEFINE([NETCDF_ENABLE_S3_TESTALL], [yes], [control S3 testing.])
fi
fi
@ -1066,7 +1066,7 @@ AC_ARG_ENABLE([utilities],
test "x$nc_build_c" = xno && enable_utilities=no
test "x$enable_utilities" = xno && nc_build_utilities=no
AC_MSG_RESULT($nc_build_utilities)
AM_CONDITIONAL(BUILD_UTILITIES, [test x$nc_build_utilities = xyes])
AM_CONDITIONAL(NETCDF_BUILD_UTILITIES, [test x$nc_build_utilities = xyes])
# Does the user want to disable all tests?
AC_MSG_CHECKING([whether test should be built and run])
@ -1330,7 +1330,7 @@ if test "x$enable_hdf5" = "xno" ; then
fi
if test "x$enable_dap4" = xyes; then
AC_DEFINE([ENABLE_DAP4], [1], [if true, build DAP4 Client])
AC_DEFINE([NETCDF_ENABLE_DAP4], [1], [if true, build DAP4 Client])
fi
# check for useful, but not essential, memio support
@ -1399,7 +1399,7 @@ if test "x$found_curl" = xno && test "x$enable_byterange" = xyes ; then
fi
if test "x$enable_byterange" = xyes; then
AC_DEFINE([ENABLE_BYTERANGE], [1], [if true, support byte-range read of remote datasets.])
AC_DEFINE([NETCDF_ENABLE_BYTERANGE], [1], [if true, support byte-range read of remote datasets.])
fi
# Does the user want to disable atexit?
@ -1422,7 +1422,7 @@ if test "x$enable_atexit_finalize" = xyes ; then
fi
if test "x$enable_atexit_finalize" = xyes ; then
AC_DEFINE([ENABLE_ATEXIT_FINALIZE], [1], [If true, enable nc_finalize via atexit()])
AC_DEFINE([NETCDF_ENABLE_ATEXIT_FINALIZE], [1], [If true, enable nc_finalize via atexit()])
fi
# Need libdl(d) for plugins
@ -1448,9 +1448,9 @@ if test "x$enable_plugins" = xyes && test "x$enable_shared" = xno; then
fi
if test "x$enable_plugins" = xyes; then
AC_DEFINE([ENABLE_PLUGINS], [1], [if true, support dynamically loaded plugins])
AC_DEFINE([NETCDF_ENABLE_PLUGINS], [1], [if true, support dynamically loaded plugins])
fi
AM_CONDITIONAL(ENABLE_PLUGINS, [test "x$enable_plugins" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_PLUGINS, [test "x$enable_plugins" = xyes])
AC_SUBST(USEPLUGINS, [${enable_plugins}])
AC_FUNC_ALLOCA
@ -1530,9 +1530,9 @@ else
fi
if test "x${enable_cdf5}" = xyes; then
AC_DEFINE([ENABLE_CDF5], [1], [if true, enable CDF5 Support])
AC_DEFINE([NETCDF_ENABLE_CDF5], [1], [if true, enable CDF5 Support])
fi
AM_CONDITIONAL(ENABLE_CDF5, [test x$enable_cdf5 = xyes ])
AM_CONDITIONAL(NETCDF_ENABLE_CDF5, [test x$enable_cdf5 = xyes ])
$SLEEPCMD
if test "$ac_cv_type_uchar" = yes ; then
@ -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
@ -1887,15 +1887,15 @@ enable_nczarr_filter_testing=no
fi
if test "x$enable_nczarr_filters" = xyes; then
AC_DEFINE([ENABLE_NCZARR_FILTERS], [1], [if true, enable NCZarr filters])
AC_DEFINE([NETCDF_ENABLE_NCZARR_FILTERS], [1], [if true, enable NCZarr filters])
fi
# Client side filter registration is permanently disabled
enable_clientside_filters=no
AM_CONDITIONAL(ENABLE_CLIENTSIDE_FILTERS, [test x$enable_clientside_filters = xyes])
AM_CONDITIONAL(ENABLE_FILTER_TESTING, [test x$enable_filter_testing = xyes])
AM_CONDITIONAL(ENABLE_NCZARR_FILTERS, [test x$enable_nczarr_filters = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_FILTER_TESTING, [test x$enable_filter_testing = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_NCZARR_FILTERS, [test x$enable_nczarr_filters = xyes])
# Automake conditionals need to be called, whether the answer is yes
# or no.
@ -1904,14 +1904,14 @@ AM_CONDITIONAL(TEST_PARALLEL4, [test "x$enable_parallel4" = xyes -a "x$enable_pa
AM_CONDITIONAL(BUILD_DAP, [test "x$enable_dap" = xyes])
AM_CONDITIONAL(USE_DAP, [test "x$enable_dap" = xyes]) # Alias
# Provide protocol specific flags
AM_CONDITIONAL(ENABLE_DAP, [test "x$enable_dap" = xyes])
AM_CONDITIONAL(ENABLE_DAP4, [test "x$enable_dap4" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_DAP, [test "x$enable_dap" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_DAP4, [test "x$enable_dap4" = xyes])
AM_CONDITIONAL(USE_STRICT_NULL_BYTE_HEADER_PADDING, [test x$enable_strict_null_byte_header_padding = xyes])
AM_CONDITIONAL(ENABLE_CDF5, [test "x$enable_cdf5" = xyes])
AM_CONDITIONAL(ENABLE_DAP_REMOTE_TESTS, [test "x$enable_dap_remote_tests" = xyes])
AM_CONDITIONAL(ENABLE_EXTERNAL_SERVER_TESTS, [test "x$enable_external_server_tests" = xyes])
AM_CONDITIONAL(ENABLE_DAP_AUTH_TESTS, [test "x$enable_dap_auth_tests" = xyes])
AM_CONDITIONAL(ENABLE_DAP_LONG_TESTS, [test "x$enable_dap_long_tests" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_CDF5, [test "x$enable_cdf5" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_DAP_REMOTE_TESTS, [test "x$enable_dap_remote_tests" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_EXTERNAL_SERVER_TESTS, [test "x$enable_external_server_tests" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_DAP_AUTH_TESTS, [test "x$enable_dap_auth_tests" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_DAP_LONG_TESTS, [test "x$enable_dap_long_tests" = xyes])
AM_CONDITIONAL(USE_PNETCDF_DIR, [test ! "x$PNETCDFDIR" = x])
AM_CONDITIONAL(USE_LOGGING, [test "x$enable_logging" = xyes])
AM_CONDITIONAL(CROSS_COMPILING, [test "x$cross_compiling" = xyes])
@ -1926,17 +1926,17 @@ AM_CONDITIONAL(BUILD_MMAP, [test x$enable_mmap = xyes])
AM_CONDITIONAL(BUILD_DOCS, [test x$enable_doxygen = xyes])
AM_CONDITIONAL(SHOW_DOXYGEN_TAG_LIST, [test x$enable_doxygen_tasks = xyes])
AM_CONDITIONAL(ENABLE_METADATA_PERF, [test x$enable_metadata_perf = xyes])
AM_CONDITIONAL(ENABLE_BYTERANGE, [test "x$enable_byterange" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_BYTERANGE, [test "x$enable_byterange" = xyes])
AM_CONDITIONAL(RELAX_COORD_BOUND, [test "xyes" = xyes])
AM_CONDITIONAL(HAS_PAR_FILTERS, [test x$hdf5_supports_par_filters = xyes ])
# We need to simplify the set of S3 and Zarr flag combinations
AM_CONDITIONAL(ENABLE_S3, [test "x$enable_s3" = xyes])
AM_CONDITIONAL(ENABLE_S3_AWS, [test "x$enable_s3_aws" = xyes])
AM_CONDITIONAL(ENABLE_S3_INTERNAL, [test "x$enable_s3_internal" = xyes])
AM_CONDITIONAL(ENABLE_NCZARR, [test "x$enable_nczarr" = xyes])
AM_CONDITIONAL(ENABLE_S3_TESTPUB, [test "x$with_s3_testing" != xno]) # all => public
AM_CONDITIONAL(ENABLE_S3_TESTALL, [test "x$with_s3_testing" = xyes])
AM_CONDITIONAL(ENABLE_NCZARR_ZIP, [test "x$enable_nczarr_zip" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_S3, [test "x$enable_s3" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_S3_AWS, [test "x$enable_s3_aws" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_S3_INTERNAL, [test "x$enable_s3_internal" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_NCZARR, [test "x$enable_nczarr" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_S3_TESTPUB, [test "x$with_s3_testing" != xno]) # all => public
AM_CONDITIONAL(NETCDF_ENABLE_S3_TESTALL, [test "x$with_s3_testing" = xyes])
AM_CONDITIONAL(NETCDF_ENABLE_NCZARR_ZIP, [test "x$enable_nczarr_zip" = xyes])
AM_CONDITIONAL(HAVE_DEFLATE, [test "x$have_deflate" = xyes])
AM_CONDITIONAL(HAVE_SZ, [test "x$have_sz" = xyes])
AM_CONDITIONAL(HAVE_H5Z_SZIP, [test "x$enable_hdf5_szip" = xyes])
@ -2045,7 +2045,7 @@ AC_SUBST(HAS_S3_AWS,[$enable_s3_aws])
AC_SUBST(HAS_S3_INTERNAL,[$enable_s3_internal])
AC_SUBST(HAS_HDF5_ROS3,[$has_hdf5_ros3])
AC_SUBST(HAS_NCZARR,[$enable_nczarr])
AC_SUBST(ENABLE_S3_TESTING,[$with_s3_testing])
AC_SUBST(NETCDF_ENABLE_S3_TESTING,[$with_s3_testing])
AC_SUBST(HAS_NCZARR_ZIP,[$enable_nczarr_zip])
AC_SUBST(DO_NCZARR_ZIP_TESTS,[$enable_nczarr_zip])
AC_SUBST(HAS_QUANTIZE,[$enable_quantize])

View File

@ -34,7 +34,7 @@ find_program(CTEST_GIT_COMMAND NAMES git)
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
set(CTEST_BUILD_OPTIONS "-DENABLE_COVERAGE_TESTS=TRUE -DENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DENABLE_BYTERANGE=TRUE -DENABLE_LARGE_FILE_TESTS=FALSE -DCMAKE_C_COMPILER=${CTEST_COMPILER}")
set(CTEST_BUILD_OPTIONS "-DNETCDF_ENABLE_COVERAGE_TESTS=TRUE -DNETCDF_ENABLE_ERANGE_FILL=TRUE -DNETCDF_ENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DNETCDF_ENABLE_LARGE_FILE_TESTS=FALSE -DCMAKE_C_COMPILER=${CTEST_COMPILER}")
set(CTEST_DROP_METHOD https)

View File

@ -33,7 +33,7 @@ find_program(CTEST_GIT_COMMAND NAMES git)
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
set(CTEST_BUILD_OPTIONS "-DENABLE_COVERAGE_TESTS=FALSE -DENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DENABLE_BYTERANGE=TRUE -DENABLE_LARGE_FILE_TESTS=FALSE")
set(CTEST_BUILD_OPTIONS "-DNETCDF_ENABLE_COVERAGE_TESTS=FALSE -DNETCDF_ENABLE_ERANGE_FILL=TRUE -DNETCDF_ENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DNETCDF_ENABLE_LARGE_FILE_TESTS=FALSE")
set(CTEST_DROP_METHOD https)

View File

@ -33,7 +33,7 @@ find_program(CTEST_GIT_COMMAND NAMES git)
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
set(CTEST_BUILD_OPTIONS "-DENABLE_COVERAGE_TESTS=TRUE -DENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DENABLE_BYTERANGE=TRUE -DENABLE_LARGE_FILE_TESTS=FALSE")
set(CTEST_BUILD_OPTIONS "-DNETCDF_ENABLE_COVERAGE_TESTS=TRUE -DNETCDF_ENABLE_ERANGE_FILL=TRUE -DNETCDF_ENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DNETCDF_ENABLE_LARGE_FILE_TESTS=FALSE")
set(CTEST_DROP_METHOD https)

View File

@ -33,7 +33,7 @@ find_program(CTEST_GIT_COMMAND NAMES git)
find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
set(CTEST_BUILD_OPTIONS "-DENABLE_COVERAGE_TESTS=TRUE -DENABLE_ERANGE_FILL=TRUE -DENABLE_LOGGING=TRUE -DENABLE_BYTERANGE=TRUE -DENABLE_LARGE_FILE_TESTS=FALSE -DENABLE_DAP_REMOTE_TESTS=TRUE")
set(CTEST_BUILD_OPTIONS "-DNETCDF_ENABLE_COVERAGE_TESTS=TRUE -DNETCDF_ENABLE_ERANGE_FILL=TRUE -DNETCDF_ENABLE_LOGGING=TRUE -DNETCDF_ENABLE_BYTERANGE=TRUE -DNETCDF_ENABLE_LARGE_FILE_TESTS=FALSE -DNETCDF_ENABLE_DAP_REMOTE_TESTS=TRUE")
set(CTEST_DROP_METHOD https)

View File

@ -21,21 +21,21 @@ FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE)
IF(ENABLE_DAP_REMOTE_TESTS)
IF(NETCDF_ENABLE_DAP_REMOTE_TESTS)
# Change name (add '4') to avoid cmake
# complaint about duplicate targets.
BUILD_BIN_TEST(findtestserver4)
BUILD_BIN_TEST(pingurl4)
ENDIF()
IF(ENABLE_TESTS)
IF(NETCDF_ENABLE_TESTS)
# Base tests
# The tests are set up as a combination of shell scripts and executables that
# must be run in a particular order. It is painful but will use macros to help
# keep it from being too bad.
IF(BUILD_UTILITIES)
IF(NETCDF_BUILD_UTILITIES)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/libdap4)
build_bin_test(test_parse)
build_bin_test(test_meta)
@ -48,9 +48,9 @@ ENDIF()
add_sh_test(dap4_test test_raw)
add_sh_test(dap4_test test_meta)
add_sh_test(dap4_test test_data)
ENDIF(BUILD_UTILITIES)
ENDIF(NETCDF_BUILD_UTILITIES)
IF(ENABLE_DAP_REMOTE_TESTS)
IF(NETCDF_ENABLE_DAP_REMOTE_TESTS)
add_sh_test(dap4_test test_remote)
add_sh_test(dap4_test test_hyrax)
add_sh_test(dap4_test test_dap4url)
@ -66,9 +66,9 @@ ENDIF()
IF(RUN_IGNORED_TESTS)
add_sh_test(dap4_test test_thredds)
ENDIF()
ENDIF(ENABLE_DAP_REMOTE_TESTS)
ENDIF(NETCDF_ENABLE_DAP_REMOTE_TESTS)
ENDIF(ENABLE_TESTS)
ENDIF(NETCDF_ENABLE_TESTS)
#FILE(COPY ./baseline DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})
#FILE(COPY ./baselineraw DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -42,8 +42,8 @@ pingurl4_SOURCES = pingurl4.c
dump_SOURCES = dump.c
# Disable Dap4 Remote Tests until the test server is working
if BUILD_UTILITIES
if ENABLE_DAP_REMOTE_TESTS
if NETCDF_BUILD_UTILITIES
if NETCDF_ENABLE_DAP_REMOTE_TESTS
TESTS += test_remote.sh
TESTS += test_constraints.sh

View File

@ -8,7 +8,7 @@
#####
# Build doxygen documentation, if need be.
#####
IF(ENABLE_DOXYGEN)
IF(NETCDF_ENABLE_DOXYGEN)
# The following is redundant but does not hurt anything.
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.html ${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_CURRENT_SOURCE_DIR}/*.doc ${CMAKE_CURRENT_SOURCE_DIR}/*.xml ${CMAKE_CURRENT_SOURCE_DIR}/*.m4 ${CMAKE_CURRENT_SOURCE_DIR}/*.texi ${CMAKE_SOURCE_DIR}/oc2/auth.html.in)
@ -43,9 +43,9 @@ IF(ENABLE_DOXYGEN)
# If ENABLE_DOXYGEN_LATEX_OUTPUT is true, automatically build
# If NETCDF_ENABLE_DOXYGEN_LATEX_OUTPUT is true, automatically build
# the PDF files.
IF(ENABLE_DOXYGEN_PDF_OUTPUT)
IF(NETCDF_ENABLE_DOXYGEN_PDF_OUTPUT)
# Process 'main' netcdf documentation.
FIND_PROGRAM(NC_MAKE NAMES make)
FIND_PROGRAM(NC_PDFLATEX NAMES pdflatex)
@ -82,7 +82,7 @@ IF(ENABLE_DOXYGEN)
DESTINATION "${CMAKE_INSTALL_DOCDIR}/html"
COMPONENT documentation)
ENDIF(ENABLE_DOXYGEN)
ENDIF(NETCDF_ENABLE_DOXYGEN)
# Should match list in Makefile.am
SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST}

View File

@ -1986,7 +1986,7 @@ EXTRA_SEARCH_MAPPINGS =
# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
# The default value is: YES.
GENERATE_LATEX = @NC_ENABLE_DOXYGEN_PDF_OUTPUT@
GENERATE_LATEX = @NC_NETCDF_ENABLE_DOXYGEN_PDF_OUTPUT@
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of

View File

@ -32,7 +32,7 @@ currently do any sort of optimization or caching.
This capability is enabled using the option *--enable-byterange* option
to the *./configure* command for Automake. For Cmake, the option flag is
*-DENABLE_BYTERANGE=true*.
*-DNETCDF_ENABLE_BYTERANGE=true*.
This capability requires access to *libcurl*, and an error will occur
if byterange is enabled, but *libcurl* could not be located.

View File

@ -119,8 +119,8 @@ Note also that if S3 support is enabled, then you need to have a C++ compiler in
The necessary CMake flags are as follows (with defaults)
1. *-DENABLE_S3* -- Controll S3 support
2. *-DENABLE_S3_INTERNAL* -- Force use of the *nch5s3comms* SDK instead of the *aws-cpp-sdk*.
1. *-DNETCDF_ENABLE_S3* -- Controll S3 support
2. *-DNETCDF_ENABLE_S3_INTERNAL* -- Force use of the *nch5s3comms* SDK instead of the *aws-cpp-sdk*.
3. *-DWITH-S3-TESTING_=ON|OFF|PUBLIC -- "ON" means do all S3 tests, "OFF" means do no S3 testing, "PUBLIC" means do only those tests that involve publically accessible S3 data.
Note that unlike Automake, CMake can properly locate C++ libraries, so it should not be necessary to specify _-laws-cpp-sdk-s3_ assuming that the aws s3 libraries are installed in the default location.
@ -267,7 +267,7 @@ This is an experimental SDK provided internally in the netcdf-c library.
### Build Options
In order to enable this SDK, the Automake option *--enable-s3-internal* or the CMake option *-DENABLE_S3_INTERNAL=ON* must be specified.
In order to enable this SDK, the Automake option *--enable-s3-internal* or the CMake option *-DNETCDF_ENABLE_S3_INTERNAL=ON* must be specified.
### Testing S3 Support {#nccloud_testing_S3_support}

View File

@ -711,7 +711,7 @@ and specific script files.
The actual cleanup requires different approaches for cmake and for automake.
In cmake, the CTestCustom.cmake mechanism is used and contains the following command:
````
IF(ENABLE_S3_TESTING)
IF(NETCDF_ENABLE_S3_TESTING)
# Assume run in top-level CMAKE_BINARY_DIR
set(CTEST_CUSTOM_POST_TEST "bash -x ${CMAKE_BINARY_DIR}/s3cleanup.sh")
ENDIF()
@ -722,7 +722,7 @@ because it is invoked after all tests are run in the nczarr_test
directory. So nczarr_test/Makefile.am contains the following
equivalent code:
````
if ENABLE_S3_TESTALL
if NETCDF_ENABLE_S3_TESTALL
check-local:
bash -x ${top_srcdir}/s3cleanup.sh
endif

View File

@ -45,9 +45,9 @@ To build netcdf-c with logging using autotools, add the
## Building netcdf-c with Logging using the CMake Build
To build netcdf-c with logging using CMake, set the ENABLE_LOGGING option to ON:
To build netcdf-c with logging using CMake, set the NETCDF_ENABLE_LOGGING option to ON:
`cmake -DENABLE_LOGGING=ON -DCMAKE_PREFIX_PATH=/usr/local/hdf5-1.14.0 ..`
`cmake -DNETCDF_ENABLE_LOGGING=ON -DCMAKE_PREFIX_PATH=/usr/local/hdf5-1.14.0 ..`
## Checking that Logging was Enabled

View File

@ -503,7 +503,7 @@ The relevant ./configure options are as follows.
The relevant CMake flags are as follows.
1. *-DENABLE_NCZARR=off* -- equivalent to the Automake *--disable-nczarr* option.
1. *-DNETCDF_ENABLE_NCZARR=off* -- equivalent to the Automake *--disable-nczarr* option.
## Testing NCZarr S3 Support {#nczarr_testing_S3_support}
The relevant tests for S3 support are in the _nczarr_test_ directory.
@ -527,7 +527,7 @@ also test S3 support with this option.
Enabling S3 support is controlled by this cmake option:
````
-DENABLE_S3=ON
-DNETCDF_ENABLE_S3=ON
````
However, to find the aws sdk libraries,
the following environment variables must be set:

View File

@ -35,8 +35,8 @@ check_PROGRAMS += simple_nc4_wr simple_nc4_rd simple_xy_nc4_wr \
simple_xy_nc4_rd
TESTS += run_examples4.sh
if BUILD_UTILITIES
if ENABLE_FILTER_TESTING
if NETCDF_BUILD_UTILITIES
if NETCDF_ENABLE_FILTER_TESTING
# filter_example.c should be same as nc_test4/test_filter.c
check_PROGRAMS += filter_example
TESTS += run_filter.sh

View File

@ -6,6 +6,6 @@
# See netcdf-c/COPYRIGHT file for more info.
ADD_SUBDIRECTORY(C)
IF(BUILD_UTILITIES)
IF(NETCDF_BUILD_UTILITIES)
ADD_SUBDIRECTORY(CDL)
ENDIF()

View File

@ -8,7 +8,7 @@
# See netcdf-c/COPYRIGHT file for more info.
# Build ncgen/ncdump.
if BUILD_UTILITIES
if NETCDF_BUILD_UTILITIES
CDL_DIR = CDL
endif

View File

@ -21,10 +21,10 @@ check_PROGRAMS = tst_chunk_hdf4 tst_h4_lendian tst_hdf4_extra
TESTS = tst_chunk_hdf4 tst_h4_lendian tst_hdf4_extra
# This test script depends on ncdump and tst_interops2.c.
if BUILD_UTILITIES
if NETCDF_BUILD_UTILITIES
check_PROGRAMS += tst_interops2
TESTS += run_formatx_hdf4.sh
endif # BUILD_UTILITIES
endif # NETCDF_BUILD_UTILITIES
# This test script fetches HDF4 files from an FTP server and uses
# program tst_interops3.c to read them.

View File

@ -35,7 +35,7 @@ INSTALL(FILES ${netCDF_BINARY_DIR}/include/netcdf_dispatch.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT headers)
IF(ENABLE_PNETCDF OR ENABLE_PARALLEL4)
IF(NETCDF_ENABLE_PNETCDF OR NETCDF_ENABLE_PARALLEL4)
INSTALL(FILES ${netCDF_SOURCE_DIR}/include/netcdf_par.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT headers)

View File

@ -26,7 +26,7 @@ if USE_DAP
noinst_HEADERS += ncdap.h
endif
if ENABLE_BYTERANGE
if NETCDF_ENABLE_BYTERANGE
noinst_HEADERS += nchttp.h
endif

View File

@ -62,10 +62,10 @@ typedef struct NC_HDF5_FILE_INFO {
hid_t hdfid;
unsigned transientid; /* counter for transient ids */
NCURI* uri; /* Parse of the incoming path, if url */
#if defined(ENABLE_BYTERANGE)
#if defined(NETCDF_ENABLE_BYTERANGE)
int byterange;
#endif
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
struct NCauth* auth;
#endif
} NC_HDF5_FILE_INFO_T;

View File

@ -104,12 +104,12 @@ extern const NC_Dispatch* NC3_dispatch_table;
extern int NC3_initialize(void);
extern int NC3_finalize(void);
#ifdef ENABLE_DAP
#ifdef NETCDF_ENABLE_DAP
extern const NC_Dispatch* NCD2_dispatch_table;
extern int NCD2_initialize(void);
extern int NCD2_finalize(void);
#endif
#ifdef ENABLE_DAP4
#ifdef NETCDF_ENABLE_DAP4
extern const NC_Dispatch* NCD4_dispatch_table;
extern int NCD4_initialize(void);
extern int NCD4_finalize(void);
@ -138,7 +138,7 @@ extern int HDF4_initialize(void);
extern int HDF4_finalize(void);
#endif
#ifdef ENABLE_NCZARR
#ifdef NETCDF_ENABLE_NCZARR
extern const NC_Dispatch* NCZ_dispatch_table;
extern int NCZ_initialize(void);
extern int NCZ_finalize(void);

View File

@ -26,7 +26,7 @@ typedef struct NC_HTTP_STATE {
struct NCURI* url; /* parsed url */
long httpcode;
char* errmsg; /* do not free if format is HTTPCURL */
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
struct NC_HTTP_S3 {
void* s3client;
struct NCS3INFO* info;

View File

@ -13,15 +13,15 @@ if USE_DAP
AM_CPPFLAGS += -I${top_srcdir}/oc2
endif
if ENABLE_NCZARR
if NETCDF_ENABLE_NCZARR
AM_CPPFLAGS += -I${top_srcdir}/libnczarr
endif
if ENABLE_S3_AWS
if NETCDF_ENABLE_S3_AWS
AM_LDFLAGS += -lstdc++
endif
if ! ENABLE_LIBXML2
if ! NETCDF_ENABLE_LIBXML2
# => tinyxml2
AM_LDFLAGS += -lstdc++
endif

View File

@ -34,7 +34,7 @@ target_compile_options(dap2
-DCURL_STATICLIB=1
)
if (ENABLE_DLL)
if (NETCDF_ENABLE_DLL)
target_compile_definitions(dap2 PRIVATE DLL_NETCDF DLL_EXPORT)
endif()

View File

@ -24,7 +24,7 @@ HDRS= nccommon.h constraints.h ncd2dispatch.h dapincludes.h \
dapodom.h getvara.h dapnc.h daputil.h dapdebug.h dapdump.h \
dceconstraints.h dcetab.h dceparselex.h
if ENABLE_DAP
if NETCDF_ENABLE_DAP
if USE_NETCDF4
AM_CPPFLAGS += -I$(top_srcdir)/libsrc4
@ -44,7 +44,7 @@ libdap2_la_LIBADD =
# ${top_builddir}/oc2/liboc.la \
# ${top_builddir}/libdispatch/libdispatch.la
#
endif # ENABLE_DAP
endif # NETCDF_ENABLE_DAP
# These rule are used if someone wants to rebuild the grammar files.
# Otherwise never invoked, but records how to do it.

View File

@ -27,7 +27,7 @@ target_compile_options(dap4
-DCURL_STATICLIB=1
)
if (ENABLE_DLL)
if (NETCDF_ENABLE_DLL)
target_compile_definitions(dap4 PRIVATE DLL_NETCDF DLL_EXPORT)
endif()

View File

@ -53,7 +53,7 @@ d4odom.h \
d4bytes.h \
d4includes.h
if ENABLE_DAP4
if NETCDF_ENABLE_DAP4
if USE_NETCDF4
AM_CPPFLAGS += -I$(top_srcdir)/libsrc4
endif
@ -64,4 +64,4 @@ libdap4_la_SOURCES = $(SRC) $(HDRS)
libdap4_la_CPPFLAGS += $(AM_CPPFLAGS)
libdap4_la_LIBADD =
endif # ENABLE_DAP4
endif # NETCDF_ENABLE_DAP4

View File

@ -13,7 +13,7 @@ target_sources(dispatch
dcrc32.c dcrc32.h dcrc64.c ncexhash.c ncxcache.c ncjson.c ds3util.c dparallel.c dmissing.c
)
if (ENABLE_DLL)
if (NETCDF_ENABLE_DLL)
target_compile_definitions(dispatch PRIVATE DLL_NETCDF DLL_EXPORT)
endif()
@ -43,15 +43,15 @@ if(BUILD_V2)
)
endif(BUILD_V2)
if(ENABLE_BYTERANGE)
if(NETCDF_ENABLE_BYTERANGE)
target_sources(dispatch
PRIVATE
dhttp.c
)
ENDIF(ENABLE_BYTERANGE)
ENDIF(NETCDF_ENABLE_BYTERANGE)
IF(ENABLE_S3)
if(ENABLE_S3_INTERNAL)
IF(NETCDF_ENABLE_S3)
if(NETCDF_ENABLE_S3_INTERNAL)
target_sources(dispatch
PRIVATE
ncs3sdk_h5.c nch5s3comms.c nch5s3comms.h nccurl_sha256.c nccurl_sha256.h nccurl_hmac.c nccurl_hmac.h nccurl_setup.h
@ -80,16 +80,16 @@ if(STATUS_PARALLEL)
target_link_libraries(dispatch PUBLIC MPI::MPI_C)
endif(STATUS_PARALLEL)
if (ENABLE_PNETCDF)
if (NETCDF_ENABLE_PNETCDF)
target_link_libraries(dispatch PUBLIC PNETCDF::PNETCDF)
endif()
IF(ENABLE_NCZARR)
IF(NETCDF_ENABLE_NCZARR)
target_include_directories(dispatch PUBLIC ../libnczarr)
endif(ENABLE_NCZARR)
endif(NETCDF_ENABLE_NCZARR)
if(ENABLE_S3)
if(ENABLE_S3_AWS)
if(NETCDF_ENABLE_S3)
if(NETCDF_ENABLE_S3_AWS)
target_include_directories(dispatch PUBLIC ${AWSSDK_INCLUDE_DIRS})
if(NOT MSVC)
target_compile_features(dispatch PUBLIC cxx_std_11)
@ -99,7 +99,7 @@ if(ENABLE_S3)
endif()
endif()
if(ENABLE_TESTS)
if(NETCDF_ENABLE_TESTS)
BUILD_BIN_TEST(ncrandom)
endif()

View File

@ -43,12 +43,12 @@ libnetcdf2_la_SOURCES = dv2i.c
libnetcdf2_la_CPPFLAGS = ${AM_CPPFLAGS} -DDLL_EXPORT
endif # BUILD_V2
if ENABLE_BYTERANGE
if NETCDF_ENABLE_BYTERANGE
libdispatch_la_SOURCES += dhttp.c
endif # ENABLE_BYTERANGE
endif # NETCDF_ENABLE_BYTERANGE
if ENABLE_S3
if ENABLE_S3_INTERNAL
if NETCDF_ENABLE_S3
if NETCDF_ENABLE_S3_INTERNAL
# Renamed to avoid conflicts with the HDF5 files
libdispatch_la_SOURCES += ncs3sdk_h5.c nch5s3comms.c nch5s3comms.h ncutil.h nccurl_setup.h \
nccurl_sha256.c nccurl_sha256.h nccurl_hmac.c nccurl_hmac.h

View File

@ -24,11 +24,11 @@ See LICENSE.txt for license information.
#include <direct.h>
#endif
#if defined(ENABLE_BYTERANGE) || defined(ENABLE_DAP) || defined(ENABLE_DAP4)
#if defined(NETCDF_ENABLE_BYTERANGE) || defined(NETCDF_ENABLE_DAP) || defined(NETCDF_ENABLE_DAP4)
#include <curl/curl.h>
#endif
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
#include "ncs3sdk.h"
#endif
@ -118,7 +118,7 @@ NCDISPATCH_initialize(void)
/* Compute type alignments */
NC_compute_alignments();
#if defined(ENABLE_BYTERANGE) || defined(ENABLE_DAP) || defined(ENABLE_DAP4)
#if defined(NETCDF_ENABLE_BYTERANGE) || defined(NETCDF_ENABLE_DAP) || defined(NETCDF_ENABLE_DAP4)
/* Initialize curl if it is being used */
{
CURLcode cstat = curl_global_init(CURL_GLOBAL_ALL);
@ -134,10 +134,10 @@ int
NCDISPATCH_finalize(void)
{
int status = NC_NOERR;
#if defined(ENABLE_BYTERANGE) || defined(ENABLE_DAP) || defined(ENABLE_DAP4)
#if defined(NETCDF_ENABLE_BYTERANGE) || defined(NETCDF_ENABLE_DAP) || defined(NETCDF_ENABLE_DAP4)
curl_global_cleanup();
#endif
#if defined(ENABLE_DAP4)
#if defined(NETCDF_ENABLE_DAP4)
ncxml_finalize();
#endif
NC_freeglobalstate(); /* should be one of the last things done */

View File

@ -1884,7 +1884,7 @@ NC_create(const char *path0, int cmode, size_t initialsz,
if (model.impl == NC_FORMATX_PNETCDF)
{stat = NC_ENOTBUILT; goto done;}
#endif
#ifndef ENABLE_CDF5
#ifndef NETCDF_ENABLE_CDF5
if (model.impl == NC_FORMATX_NC3 && (cmode & NC_64BIT_DATA))
{stat = NC_ENOTBUILT; goto done;}
#endif
@ -1909,7 +1909,7 @@ NC_create(const char *path0, int cmode, size_t initialsz,
dispatcher = UDF1_dispatch_table;
break;
#endif /* USE_NETCDF4 */
#ifdef ENABLE_NCZARR
#ifdef NETCDF_ENABLE_NCZARR
case NC_FORMATX_NCZARR:
dispatcher = NCZ_dispatch_table;
break;
@ -2047,10 +2047,10 @@ NC_open(const char *path0, int omode, int basepe, size_t *chunksizehintp,
#ifdef USE_HDF4
hdf4built = 1;
#endif
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
cdf5built = 1;
#endif
#ifdef ENABLE_NCZARR
#ifdef NETCDF_ENABLE_NCZARR
nczarrbuilt = 1;
#endif
if(UDF0_dispatch_table != NULL)
@ -2081,13 +2081,13 @@ NC_open(const char *path0, int omode, int basepe, size_t *chunksizehintp,
#ifdef USE_HDF4
| (1<<NC_FORMATX_NC_HDF4)
#endif
#ifdef ENABLE_NCZARR
#ifdef NETCDF_ENABLE_NCZARR
| (1<<NC_FORMATX_NCZARR)
#endif
#ifdef ENABLE_DAP
#ifdef NETCDF_ENABLE_DAP
| (1<<NC_FORMATX_DAP2)
#endif
#ifdef ENABLE_DAP4
#ifdef NETCDF_ENABLE_DAP4
| (1<<NC_FORMATX_DAP4)
#endif
#ifdef USE_PNETCDF
@ -2101,7 +2101,7 @@ NC_open(const char *path0, int omode, int basepe, size_t *chunksizehintp,
/* Verify */
if((built & (1 << model.impl)) == 0)
{stat = NC_ENOTBUILT; goto done;}
#ifndef ENABLE_CDF5
#ifndef NETCDF_ENABLE_CDF5
/* Special case because there is no separate CDF5 dispatcher */
if(model.impl == NC_FORMATX_NC3 && (omode & NC_64BIT_DATA))
{stat = NC_ENOTBUILT; goto done;}
@ -2111,17 +2111,17 @@ NC_open(const char *path0, int omode, int basepe, size_t *chunksizehintp,
/* Figure out what dispatcher to use */
if (!dispatcher) {
switch (model.impl) {
#ifdef ENABLE_DAP
#ifdef NETCDF_ENABLE_DAP
case NC_FORMATX_DAP2:
dispatcher = NCD2_dispatch_table;
break;
#endif
#ifdef ENABLE_DAP4
#ifdef NETCDF_ENABLE_DAP4
case NC_FORMATX_DAP4:
dispatcher = NCD4_dispatch_table;
break;
#endif
#ifdef ENABLE_NCZARR
#ifdef NETCDF_ENABLE_NCZARR
case NC_FORMATX_NCZARR:
dispatcher = NCZ_dispatch_table;
break;

View File

@ -25,7 +25,7 @@
#include "hdf5internal.h"
#endif
#ifdef ENABLE_NCZARR
#ifdef NETCDF_ENABLE_NCZARR
#include "zdispatch.h"
#endif

View File

@ -26,7 +26,7 @@
#include "ncuri.h"
#include "ncauth.h"
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
#include "ncs3sdk.h"
#endif
#include "nchttp.h"
@ -100,7 +100,7 @@ nc_http_open_verbose(const char* path, int verbose, NC_HTTP_STATE** statep)
{stat = NCTHROW(NC_ENOMEM); goto done;}
state->path = strdup(path);
state->url = uri; uri = NULL;
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
state->format = (NC_iss3(state->url,NULL)?HTTPS3:HTTPCURL);
#else
state->format = HTTPCURL;
@ -122,7 +122,7 @@ nc_http_open_verbose(const char* path, int verbose, NC_HTTP_STATE** statep)
if(cstat != CURLE_OK) {stat = NCTHROW(NC_ECURL); goto done;}
}
} break;
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
case HTTPS3: {
if((state->s3.info = (NCS3INFO*)calloc(1,sizeof(NCS3INFO)))==NULL)
{stat = NCTHROW(NC_ENOMEM); goto done;}
@ -158,7 +158,7 @@ nc_http_close(NC_HTTP_STATE* state)
ncbytesfree(state->curl.response.buf);
nclistfreeall(state->curl.request.headers); state->curl.request.headers = NULL;
break;
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
case HTTPS3: {
if(state->s3.s3client)
NC_s3sdkclose(state->s3.s3client, state->s3.info, 0, NULL);
@ -203,7 +203,7 @@ nc_http_reset(NC_HTTP_STATE* state)
(void)CURLERR(curl_easy_setopt(state->curl.curl, CURLOPT_READDATA, NULL));
headersoff(state);
break;
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
case HTTPS3:
break; /* Done automatically */
#endif
@ -250,7 +250,7 @@ nc_http_read(NC_HTTP_STATE* state, size64_t start, size64_t count, NCbytes* buf)
if((stat = execute(state)))
goto done;
break;
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
case HTTPS3: {
/* Make sure buf has enough space allocated */
ncbytessetalloc(buf,count);
@ -301,7 +301,7 @@ nc_http_write(NC_HTTP_STATE* state, NCbytes* payload)
if((stat = execute(state)))
goto done;
break;
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
case HTTPS3:
if((stat = NC_s3sdkwriteobject(state->s3.s3client,
state->s3.info->bucket,
@ -357,7 +357,7 @@ nc_http_size(NC_HTTP_STATE* state, long long* sizep)
if((stat = lookupheader(state,"content-length",&hdr))==NC_NOERR)
sscanf(hdr,"%llu",sizep);
break;
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
case HTTPS3: {
size64_t len = 0;
if((stat = NC_s3sdkinfo(state->s3.s3client,state->s3.info->bucket,state->s3.info->rootkey,&len,&state->errmsg))) goto done;

View File

@ -27,7 +27,7 @@
#include "nclog.h"
#include "ncrc.h"
#include "nchttp.h"
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
#include "ncs3sdk.h"
#endif
@ -61,7 +61,7 @@ struct MagicFile {
#endif
char* curlurl; /* url to use with CURLOPT_SET_URL */
NC_HTTP_STATE* state;
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
NCS3INFO s3;
void* s3client;
char* errmsg;
@ -902,7 +902,7 @@ NC_infermodel(const char* path, int* omodep, int iscreate, int useparallel, void
ncurisetfragments(uri,sfrag);
nullfree(sfrag); sfrag = NULL;
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
/* If s3, then rebuild the url */
if(NC_iss3(uri,NULL)) {
NCURI* newuri = NULL;
@ -1323,7 +1323,7 @@ openmagic(struct MagicFile* file)
goto done;
}
if(file->uri != NULL) {
#ifdef ENABLE_BYTERANGE
#ifdef NETCDF_ENABLE_BYTERANGE
/* Construct a URL minus any fragment */
file->curlurl = ncuribuild(file->uri,NULL,NULL,NCURISVC);
/* Open the curl handle */
@ -1411,7 +1411,7 @@ readmagic(struct MagicFile* file, long pos, char* magic)
printmagic("XXX: readmagic",magic,file);
#endif
} else if(file->uri != NULL) {
#ifdef ENABLE_BYTERANGE
#ifdef NETCDF_ENABLE_BYTERANGE
fileoffset_t start = (size_t)pos;
fileoffset_t count = MAGIC_NUMBER_LEN;
status = nc_http_read(file->state, start, count, buf);
@ -1466,7 +1466,7 @@ closemagic(struct MagicFile* file)
if(fIsSet(file->omode,NC_INMEMORY)) {
/* noop */
} else if(file->uri != NULL) {
#ifdef ENABLE_BYTERANGE
#ifdef NETCDF_ENABLE_BYTERANGE
status = nc_http_close(file->state);
#endif
nullfree(file->curlurl);

View File

@ -30,7 +30,7 @@ Currently two operations are defined:
necessary in order to get to the right NC* instance.
*/
#if defined(ENABLE_DAP4) || defined(ENABLE_DAP2)
#if defined(NETCDF_ENABLE_DAP4) || defined(NETCDF_ENABLE_DAP2)
EXTERNL NC* NCD4_get_substrate(NC* nc);
EXTERNL NC* NCD2_get_substrate(NC* nc);
static NC*

View File

@ -124,7 +124,7 @@ nc_set_default_format(int format, int *old_formatp)
*old_formatp = default_create_format;
/* Make sure only valid format is set. */
#ifndef ENABLE_CDF5
#ifndef NETCDF_ENABLE_CDF5
if (format == NC_FORMAT_CDF5)
return NC_ENOTBUILT;
#endif

View File

@ -18,7 +18,7 @@ target_sources(netcdfhdf4
hdf4var.c
)
if (ENABLE_DLL)
if (NETCDF_ENABLE_DLL)
target_compile_definitions(netcdfhdf4 PRIVATE DLL_NETCDF DLL_EXPORT)
endif()

View File

@ -17,11 +17,11 @@ target_sources(netcdfhdf5 PRIVATE
hdf5set_format_compatibility.c hdf5debug.c
)
if (ENABLE_DLL)
if (NETCDF_ENABLE_DLL)
target_compile_definitions(netcdfhdf5 PRIVATE DLL_NETCDF DLL_EXPORT)
endif()
if(ENABLE_BYTERANGE)
if(NETCDF_ENABLE_BYTERANGE)
target_sources(netcdfhdf5 PRIVATE
H5FDhttp.c
)

View File

@ -18,7 +18,7 @@ hdf5dim.c hdf5grp.c hdf5type.c hdf5internal.c hdf5create.c hdf5open.c \
hdf5var.c nc4mem.c nc4memcb.c hdf5dispatch.c hdf5filter.c \
hdf5set_format_compatibility.c hdf5debug.c hdf5debug.h hdf5err.h
if ENABLE_BYTERANGE
if NETCDF_ENABLE_BYTERANGE
libnchdf5_la_SOURCES += H5FDhttp.c H5FDhttp.h
endif

View File

@ -11,7 +11,7 @@
#include "config.h"
#include "hdf5internal.h"
#ifdef ENABLE_BYTERANGE
#ifdef NETCDF_ENABLE_BYTERANGE
#include "H5FDhttp.h"
#endif
@ -127,7 +127,7 @@ NC_HDF5_initialize(void)
if (!nc4_hdf5_initialized)
nc4_hdf5_initialize();
#ifdef ENABLE_BYTERANGE
#ifdef NETCDF_ENABLE_BYTERANGE
(void)H5FD_http_init();
#endif
return NC4_provenance_init();
@ -142,7 +142,7 @@ NC_HDF5_initialize(void)
int
NC_HDF5_finalize(void)
{
#ifdef ENABLE_BYTERANGE
#ifdef NETCDF_ENABLE_BYTERANGE
(void)H5FD_http_finalize();
#endif
(void)nc4_hdf5_finalize();

View File

@ -221,7 +221,7 @@ nc4_close_netcdf4_file(NC_FILE_INFO_T *h5, int abort, NC_memio *memio)
NC4_clear_provenance(&h5->provenance);
ncurifree(hdf5_info->uri);
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
/* Free the http info */
NC_authfree(hdf5_info->auth);
#endif

View File

@ -20,11 +20,11 @@
#include "ncpathmgr.h"
#include <stddef.h>
#ifdef ENABLE_BYTERANGE
#ifdef NETCDF_ENABLE_BYTERANGE
#include "H5FDhttp.h"
#endif
#ifdef ENABLE_HDF5_ROS3
#ifdef NETCDF_ENABLE_HDF5_ROS3
#include <H5FDros3.h>
#include "ncs3sdk.h"
#endif
@ -743,7 +743,7 @@ nc4_open_file(const char *path, int mode, void* parameters, int ncid)
h5 = (NC_HDF5_FILE_INFO_T*)nc4_info->format_file_info;
#ifdef ENABLE_BYTERANGE
#ifdef NETCDF_ENABLE_BYTERANGE
/* Do path as URL processing */
ncuriparse(path,&h5->uri);
if(h5->uri != NULL) {
@ -755,7 +755,7 @@ nc4_open_file(const char *path, int mode, void* parameters, int ncid)
parameters = NULL; /* kill off parallel */
}
}
#endif /*ENABLE_BYTERANGE*/
#endif /*NETCDF_ENABLE_BYTERANGE*/
nc4_info->mem.inmemory = ((mode & NC_INMEMORY) == NC_INMEMORY);
nc4_info->mem.diskless = ((mode & NC_DISKLESS) == NC_DISKLESS);
@ -882,10 +882,10 @@ nc4_open_file(const char *path, int mode, void* parameters, int ncid)
if ((h5->hdfid = nc4_H5Fopen(path, flags, fapl_id)) < 0)
BAIL(NC_EHDFERR);
}
#ifdef ENABLE_BYTERANGE
#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

@ -42,7 +42,7 @@ if(USE_HDF4)
)
endif()
if(ENABLE_DAP2)
if(NETCDF_ENABLE_DAP2)
target_sources(netcdf
PRIVATE
$<TARGET_OBJECTS:oc2>
@ -50,7 +50,7 @@ if(ENABLE_DAP2)
)
endif()
if(ENABLE_DAP4)
if(NETCDF_ENABLE_DAP4)
target_sources(netcdf
PRIVATE
$<TARGET_OBJECTS:dap4>
@ -58,21 +58,21 @@ if(ENABLE_DAP4)
)
endif()
if(ENABLE_NCZARR)
if(NETCDF_ENABLE_NCZARR)
target_sources(netcdf
PRIVATE
$<TARGET_OBJECTS:nczarr>
)
endif()
if(ENABLE_S3_INTERNAL)
if(NETCDF_ENABLE_S3_INTERNAL)
target_sources(netcdf
PRIVATE
$<TARGET_OBJECTS:ncxml>
)
endif()
if(ENABLE_PLUGINS)
if(NETCDF_ENABLE_PLUGINS)
target_sources(netcdf
PRIVATE
$<TARGET_OBJECTS:ncpoco>
@ -114,7 +114,7 @@ set(TLL_LIBS ${TLL_LIBS} ${HAVE_LIBM} ${ZLIB_LIBRARY})
# Add extra dependencies specified via NC_EXTRA_DEPS
set(TLL_LIBS ${TLL_LIBS} ${EXTRA_DEPS})
if(ENABLE_NCZARR_ZIP)
if(NETCDF_ENABLE_NCZARR_ZIP)
set(TLL_LIBS ${TLL_LIBS} ${Zip_LIBRARIES})
endif()
@ -135,7 +135,7 @@ if(HAVE_LIBDL)
set(TLL_LIBS ${LIBDL} ${TLL_LIBS})
endif()
if(ENABLE_NCZARR_ZIP)
if(NETCDF_ENABLE_NCZARR_ZIP)
set(TLL_LIBS ${TLL_LIBS} ${Zip_LIBRARIES})
endif()
@ -151,21 +151,21 @@ if(USE_HDF4)
set(TLL_LIBS ${HDF4_LIBRARIES} ${TLL_LIBS})
endif()
if(ENABLE_PNETCDF)
if(NETCDF_ENABLE_PNETCDF)
SET(TLL_LIBS ${TLL_LIBS} PNETCDF::PNETCDF)
endif()
if(ENABLE_S3)
if(ENABLE_S3_AWS)
if(NETCDF_ENABLE_S3)
if(NETCDF_ENABLE_S3_AWS)
target_link_directories(netcdf PUBLIC ${AWSSDK_LIB_DIR})
set(TLL_LIBS ${AWSSDK_LINK_LIBRARIES} ${TLL_LIBS})
elseif(ENABLE_S3_INTERNAL)
elseif(NETCDF_ENABLE_S3_INTERNAL)
if(OPENSSL_FOUND)
set(TLL_LIBS ${OPENSSL_SSL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARIES} ${TLL_LIBS})
endif(OPENSSL_FOUND)
endif(ENABLE_S3_AWS)
endif(ENABLE_S3)
endif(NETCDF_ENABLE_S3_AWS)
endif(NETCDF_ENABLE_S3)
if(HAVE_LIBXML2)
set(TLL_LIBS ${TLL_LIBS} ${LIBXML2_LIBRARIES})
@ -193,12 +193,12 @@ if(MSVC)
)
endif()
if(ENABLE_SHARED_LIBRARY_VERSION)
if(NETCDF_ENABLE_SHARED_LIBRARY_VERSION)
set_target_properties(netcdf PROPERTIES
VERSION ${netCDF_LIB_VERSION}
SOVERSION ${netCDF_SO_VERSION}
)
endif(ENABLE_SHARED_LIBRARY_VERSION)
endif(NETCDF_ENABLE_SHARED_LIBRARY_VERSION)
install(
TARGETS netcdf EXPORT netCDFTargets

View File

@ -53,25 +53,25 @@ libnetcdf_la_LIBADD += ${top_builddir}/libhdf4/libnchdf4.la
endif # USE_HDF4
# + dap
if ENABLE_DAP
if NETCDF_ENABLE_DAP
AM_CPPFLAGS += -I${top_srcdir}/libdap2 -I${top_srcdir}/oc
libnetcdf_la_LIBADD += ${top_builddir}/libdap2/libdap2.la
libnetcdf_la_LIBADD += ${top_builddir}/oc2/liboc.la
endif # ENABLE_DAP
endif # NETCDF_ENABLE_DAP
if ENABLE_DAP4
if NETCDF_ENABLE_DAP4
AM_CPPFLAGS += -I${top_srcdir}/libdap4
libnetcdf_la_LIBADD += ${top_builddir}/libdap4/libdap4.la
endif # ENABLE_DAP4
endif # NETCDF_ENABLE_DAP4
AM_CPPFLAGS += -I${top_srcdir}/libncxml
if ENABLE_DAP4
if NETCDF_ENABLE_DAP4
libnetcdf_la_LIBADD += ${top_builddir}/libncxml/libncxml.la
else
if ENABLE_S3_INTERNAL
if NETCDF_ENABLE_S3_INTERNAL
libnetcdf_la_LIBADD += ${top_builddir}/libncxml/libncxml.la
endif
endif # ENABLE_S3_INTERNAL || ENABLE_DAP4
endif # NETCDF_ENABLE_S3_INTERNAL || NETCDF_ENABLE_DAP4
# NetCDF-4 ...
if USE_NETCDF4
@ -79,18 +79,18 @@ AM_CPPFLAGS += -I${top_srcdir}/libsrc4
libnetcdf_la_LIBADD += ${top_builddir}/libsrc4/libnetcdf4.la
endif #USE_NETCDF4
if ENABLE_NCZARR
if NETCDF_ENABLE_NCZARR
AM_CPPFLAGS += -I${top_srcdir}/libnczarr
libnetcdf_la_LIBADD += ${top_builddir}/libnczarr/libnczarr.la
if ENABLE_S3_AWS
if NETCDF_ENABLE_S3_AWS
libnetcdf_la_LIBADD += ${aws_cpp_sdk_core_LIBS} ${aws_cpp_sdk_s3_LIBS}
endif
endif #ENABLE_NCZARR
endif #NETCDF_ENABLE_NCZARR
if ENABLE_PLUGINS
if NETCDF_ENABLE_PLUGINS
AM_CPPFLAGS += -I${top_srcdir}/libncpoco
libnetcdf_la_LIBADD += ${top_builddir}/libncpoco/libncpoco.la
endif #ENABLE_PLUGINS
endif #NETCDF_ENABLE_PLUGINS
if ISCYGWIN
# Force binary mode for file read/write

View File

@ -26,12 +26,12 @@ extern int NC_HDF5_initialize(void);
extern int NC_HDF5_finalize(void);
#endif
#ifdef ENABLE_DAP2
#ifdef NETCDF_ENABLE_DAP2
extern int NCD2_initialize(void);
extern int NCD2_finalize(void);
#endif
#ifdef ENABLE_DAP4
#ifdef NETCDF_ENABLE_DAP4
extern int NCD4_initialize(void);
extern int NCD4_finalize(void);
#endif
@ -59,7 +59,7 @@ EXTERNL int NC_s3sdkfinalize(void);
int NC_initialized = 0;
int NC_finalized = 1;
#ifdef ENABLE_ATEXIT_FINALIZE
#ifdef NETCDF_ENABLE_ATEXIT_FINALIZE
/* Provide the void function to give to atexit() */
static void
finalize_atexit(void)
@ -91,10 +91,10 @@ nc_initialize()
/* Initialize each active protocol */
if((stat = NC3_initialize())) goto done;
#ifdef ENABLE_DAP
#ifdef NETCDF_ENABLE_DAP
if((stat = NCD2_initialize())) goto done;
#endif
#ifdef ENABLE_DAP4
#ifdef NETCDF_ENABLE_DAP4
if((stat = NCD4_initialize())) goto done;
#endif
#ifdef USE_PNETCDF
@ -112,11 +112,11 @@ nc_initialize()
#ifdef ENABLE_S3
if((stat = NC_s3sdkinitialize())) goto done;
#endif
#ifdef ENABLE_NCZARR
#ifdef NETCDF_ENABLE_NCZARR
if((stat = NCZ_initialize())) goto done;
#endif
#ifdef ENABLE_ATEXIT_FINALIZE
#ifdef NETCDF_ENABLE_ATEXIT_FINALIZE
/* Use atexit() to invoke nc_finalize */
if(atexit(finalize_atexit))
fprintf(stderr,"atexit failed\n");
@ -147,10 +147,10 @@ nc_finalize(void)
/* Finalize each active protocol */
#ifdef ENABLE_DAP2
#ifdef NETCDF_ENABLE_DAP2
if((stat = NCD2_finalize())) failed = stat;
#endif
#ifdef ENABLE_DAP4
#ifdef NETCDF_ENABLE_DAP4
if((stat = NCD4_finalize())) failed = stat;
#endif
@ -170,7 +170,7 @@ nc_finalize(void)
if((stat = NC_HDF5_finalize())) failed = stat;
#endif
#ifdef ENABLE_NCZARR
#ifdef NETCDF_ENABLE_NCZARR
if((stat = NCZ_finalize())) failed = stat;
#endif

View File

@ -8,7 +8,7 @@ endif()
add_library(ncpoco OBJECT ${libncpoco_SOURCES})
if (ENABLE_DLL)
if (NETCDF_ENABLE_DLL)
target_compile_definitions(ncpoco PRIVATE DLL_NETCDF DLL_EXPORT)
endif()

View File

@ -19,7 +19,7 @@ else()
)
endif(HAVE_LIBXML2)
if (ENABLE_DLL)
if (NETCDF_ENABLE_DLL)
target_compile_definitions(ncxml PRIVATE DLL_NETCDF DLL_EXPORT)
endif()

View File

@ -11,7 +11,7 @@
include $(top_srcdir)/lib_flags.am
if ENABLE_LIBXML2
if NETCDF_ENABLE_LIBXML2
AM_CPPFLAGS += ${XML2FLAGS}
endif
@ -20,7 +20,7 @@ noinst_LTLIBRARIES = libncxml.la
libncxml_la_LIBADD =
libncxml_la_LDFLAGS =
if ENABLE_LIBXML2
if NETCDF_ENABLE_LIBXML2
libncxml_la_SOURCES = ncxml_xml2.c
else
AM_CXXFLAGS = -std=c++11

View File

@ -46,11 +46,11 @@ zfilter.h
zdebug.h
)
if(ENABLE_NCZARR_ZIP)
if(NETCDF_ENABLE_NCZARR_ZIP)
set(libnczarr_SOURCES ${libnczarr_SOURCES} zmap_zip.c)
endif()
if(ENABLE_S3)
if(NETCDF_ENABLE_S3)
set(libnczarr_SOURCES ${libnczarr_SOURCES} zmap_s3sdk.c)
endif()
@ -69,7 +69,7 @@ if(STATUS_PARALLEL)
target_link_libraries(nczarr PUBLIC MPI::MPI_C)
endif(STATUS_PARALLEL)
if (ENABLE_DLL)
if (NETCDF_ENABLE_DLL)
target_compile_definitions(nczarr PRIVATE DLL_NETCDF DLL_EXPORT)
endif()

View File

@ -15,7 +15,7 @@ AM_CXXFLAGS =
libnczarr_la_LIBADD =
libnczarr_la_LDFLAGS =
# Remember ENABLE_NCZARR implies USE_NETCDF4
# Remember NETCDF_ENABLE_NCZARR implies USE_NETCDF4
# We may have to add to these later.
DISTCLEANFILES =
@ -64,17 +64,17 @@ zprovenance.h \
zfilter.h \
zdebug.h
if ENABLE_NCZARR_ZIP
if NETCDF_ENABLE_NCZARR_ZIP
libnczarr_la_SOURCES += zmap_zip.c
endif
if ENABLE_NCZARR_FILTERS
if NETCDF_ENABLE_NCZARR_FILTERS
libnczarr_la_SOURCES += zfilter.c
endif
if ENABLE_S3
if NETCDF_ENABLE_S3
libnczarr_la_SOURCES += zmap_s3sdk.c
if ENABLE_S3_AWS
if NETCDF_ENABLE_S3_AWS
AM_CXXFLAGS += -std=c++11
endif
endif

View File

@ -102,7 +102,7 @@ ncz_get_att_special(NC_FILE_INFO_T* h5, NC_VAR_INFO_T* var, const char* name,
/* Handle the per-var case(s) first */
if(var != NULL) {
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
if(strcmp(name,NC_ATT_CODECS)==0) {
NClist* filters = (NClist*)var->filters;

View File

@ -161,7 +161,7 @@ NCZ_zclose_var1(NC_VAR_INFO_T* var)
nullfree(zatt);
att->format_att_info = NULL; /* avoid memory errors */
}
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
/* Reclaim filters */
if(var->filters != NULL) {
(void)NCZ_filter_freelists(var);

View File

@ -157,7 +157,7 @@ NCZ_show_metadata(int ncid)
return NC_NOERR;
}
#ifndef ENABLE_NCZARR_FILTERS
#ifndef NETCDF_ENABLE_NCZARR_FILTERS
int
NCZ_def_var_filter(int ncid, int varid, unsigned int id , size_t n , const unsigned int *params)
{
@ -199,7 +199,7 @@ NCZ_inq_filter_avail(int ncid, unsigned id)
}
#endif /*ENABLE_NCZARR_FILTERS*/
#endif /*NETCDF_ENABLE_NCZARR_FILTERS*/
/**************************************************/
/* Following functions call into libsrc4 */

View File

@ -523,7 +523,7 @@ nc_var_filter_remove(int ncid, int varid, unsigned int filterid)
}
#endif
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
int
NCZ_def_var_filter(int ncid, int varid, unsigned int id, size_t nparams,
const unsigned int* params)
@ -743,7 +743,7 @@ done:
return ZUNTRACE(stat);
}
#endif /*ENABLE_NCZARR_FILTERS*/
#endif /*NETCDF_ENABLE_NCZARR_FILTERS*/
/**************************************************/
/* Filter application functions */
@ -760,7 +760,7 @@ NCZ_filter_initialize(void)
codec_defaults = nclistnew();
NCZ_filter_initialized = 1;
memset(loaded_plugins,0,sizeof(loaded_plugins));
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
if((stat = NCZ_load_all_plugins())) goto done;
#endif
@ -775,7 +775,7 @@ NCZ_filter_finalize(void)
int i;
ZTRACE(6,"");
if(!NCZ_filter_initialized) goto done;
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
/* Reclaim all loaded filters */
#ifdef DEBUGL
fprintf(stderr,">>> DEBUGL: finalize reclaim:\n");

View File

@ -82,10 +82,10 @@ NCZ_finalize_internal(void)
{
/* Reclaim global resources */
ncz_initialized = 0;
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
NCZ_filter_finalize();
#endif
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
NCZ_s3finalize();
#endif
return NC_NOERR;

View File

@ -19,10 +19,10 @@ nczmap_features(NCZM_IMPL impl)
{
switch (impl) {
case NCZM_FILE: return zmap_file.features;
#ifdef ENABLE_NCZARR_ZIP
#ifdef NETCDF_ENABLE_NCZARR_ZIP
case NCZM_ZIP: return zmap_zip.features;
#endif
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
case NCZM_S3: return zmap_s3sdk.features;
#endif
default: break;
@ -52,13 +52,13 @@ nczmap_create(NCZM_IMPL impl, const char *path, int mode, size64_t flags, void*
stat = zmap_file.create(path, mode, flags, parameters, &map);
if(stat) goto done;
break;
#ifdef ENABLE_NCZARR_ZIP
#ifdef NETCDF_ENABLE_NCZARR_ZIP
case NCZM_ZIP:
stat = zmap_zip.create(path, mode, flags, parameters, &map);
if(stat) goto done;
break;
#endif
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
case NCZM_S3:
stat = zmap_s3sdk.create(path, mode, flags, parameters, &map);
if(stat) goto done;
@ -90,13 +90,13 @@ nczmap_open(NCZM_IMPL impl, const char *path, int mode, size64_t flags, void* pa
stat = zmap_file.open(path, mode, flags, parameters, &map);
if(stat) goto done;
break;
#ifdef ENABLE_NCZARR_ZIP
#ifdef NETCDF_ENABLE_NCZARR_ZIP
case NCZM_ZIP:
stat = zmap_zip.open(path, mode, flags, parameters, &map);
if(stat) goto done;
break;
#endif
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
case NCZM_S3:
stat = zmap_s3sdk.open(path, mode, flags, parameters, &map);
if(stat) goto done;
@ -122,12 +122,12 @@ nczmap_truncate(NCZM_IMPL impl, const char *path)
case NCZM_FILE:
if((stat = zmap_file.truncate(path))) goto done;
break;
#ifdef ENABLE_NCZARR_ZIP
#ifdef NETCDF_ENABLE_NCZARR_ZIP
case NCZM_ZIP:
if((stat = zmap_zip.truncate(path))) goto done;
break;
#endif
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
case NCZM_S3:
if((stat = zmap_s3sdk.truncate(path))) goto done;
break;

View File

@ -217,10 +217,10 @@ extern NCZMAP_DS_API zmap_file;
#ifdef USE_HDF5
extern NCZMAP_DS_API zmap_nz4;
#endif
#ifdef ENABLE_NCZARR_ZIP
#ifdef NETCDF_ENABLE_NCZARR_ZIP
extern NCZMAP_DS_API zmap_zip;
#endif
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
extern NCZMAP_DS_API zmap_s3sdk;
#endif
@ -323,7 +323,7 @@ EXTERNL int nczmap_close(NCZMAP* map, int deleteit);
EXTERNL int nczmap_create(NCZM_IMPL impl, const char *path, int mode, size64_t constraints, void* parameters, NCZMAP** mapp);
EXTERNL int nczmap_open(NCZM_IMPL impl, const char *path, int mode, size64_t constraints, void* parameters, NCZMAP** mapp);
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
EXTERNL void NCZ_s3finalize(void);
#endif

View File

@ -296,7 +296,7 @@ ncz_sync_var_meta(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, int isclose)
int purezarr = 0;
size64_t shape[NC_MAX_VAR_DIMS];
NCZ_VAR_INFO_T* zvar = var->format_var_info;
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
NClist* filterchain = NULL;
NCjson* jfilter = NULL;
#endif
@ -316,7 +316,7 @@ ncz_sync_var_meta(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, int isclose)
if((stat = NCZ_adjust_var_cache(var))) goto done;
/* rebuild the fill chunk */
if((stat = NCZ_ensure_fill_chunk(zvar->cache))) goto done;
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
/* Build the filter working parameters for any filters */
if((stat = NCZ_filter_setup(var))) goto done;
#endif
@ -413,7 +413,7 @@ ncz_sync_var_meta(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, int isclose)
/* From V2 Spec: A JSON object identifying the primary compression codec and providing
configuration parameters, or ``null`` if no compressor is to be used. */
if((stat = NCJaddstring(jvar,NCJ_STRING,"compressor"))) goto done;
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
filterchain = (NClist*)var->filters;
if(nclistlength(filterchain) > 0) {
struct NCZ_Filter* filter = (struct NCZ_Filter*)nclistget(filterchain,nclistlength(filterchain)-1);
@ -435,7 +435,7 @@ ncz_sync_var_meta(NC_FILE_INFO_T* file, NC_VAR_INFO_T* var, int isclose)
/* A list of JSON objects providing codec configurations, or ``null``
if no filters are to be applied. */
if((stat = NCJaddstring(jvar,NCJ_STRING,"filters"))) goto done;
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
if(nclistlength(filterchain) > 1) {
size_t k;
/* jtmp holds the array of filters */
@ -1486,7 +1486,7 @@ define_vars(NC_FILE_INFO_T* file, NC_GRP_INFO_T* grp, NClist* varnames)
int vtypelen = 0;
int rank = 0;
int zarr_rank = 0; /* Need to watch out for scalars */
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
NCjson* jfilter = NULL;
int chainindex = 0;
#endif
@ -1736,7 +1736,7 @@ define_vars(NC_FILE_INFO_T* file, NC_GRP_INFO_T* grp, NClist* varnames)
object MUST contain a "id" key identifying the codec to be used. */
/* Do filters key before compressor key so final filter chain is in correct order */
{
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
if(var->filters == NULL) var->filters = (void*)nclistnew();
if(zvar->incompletefilters == NULL) zvar->incompletefilters = (void*)nclistnew();
chainindex = 0; /* track location of filter in the chain */
@ -1759,7 +1759,7 @@ define_vars(NC_FILE_INFO_T* file, NC_GRP_INFO_T* grp, NClist* varnames)
/* compressor key */
/* From V2 Spec: A JSON object identifying the primary compression codec and providing
configuration parameters, or ``null`` if no compressor is to be used. */
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
{
if(var->filters == NULL) var->filters = (void*)nclistnew();
if((stat = NCZ_filter_initialize())) goto done;
@ -1783,7 +1783,7 @@ define_vars(NC_FILE_INFO_T* file, NC_GRP_INFO_T* grp, NClist* varnames)
}
}
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
if(!suppress) {
/* At this point, we can finalize the filters */
if((stat = NCZ_filter_setup(var))) goto done;

View File

@ -389,7 +389,7 @@ NCZ_def_var(int ncid, const char *name, nc_type xtype, int ndims,
var->meta_read = NC_TRUE;
var->atts_read = NC_TRUE;
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
/* Set the filter list */
assert(var->filters == NULL);
var->filters = (void*)nclistnew();
@ -558,7 +558,7 @@ ncz_def_var_extra(int ncid, int varid, int *shuffle, int *unused1,
/* Can't turn on parallel and deflate/fletcher32/szip/shuffle
* before HDF5 1.10.3. */
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
#ifndef HDF5_SUPPORTS_PAR_FILTERS
if (h5->parallel == NC_TRUE)
if (nclistlength(((NClist*)var->filters)) > 0 || fletcher32 || shuffle)

View File

@ -675,7 +675,7 @@ put_chunk(NCZChunkCache* cache, NCZCacheEntry* entry)
}
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
/* Make sure the entry is in filtered state */
if(!entry->isfiltered) {
NC_VAR_INFO_T* var = cache->var;
@ -792,7 +792,7 @@ get_chunk(NCZChunkCache* cache, NCZCacheEntry* entry)
if((stat = NCZ_copy_data(file,cache->var,cache->fillchunk,cache->chunkcount,ZREADING,entry->data))) goto done;
stat = NC_NOERR;
}
#ifdef ENABLE_NCZARR_FILTERS
#ifdef NETCDF_ENABLE_NCZARR_FILTERS
/* Make sure the entry is in unfiltered state */
if(!empty && entry->isfiltered) {
NC_VAR_INFO_T* var = cache->var;

View File

@ -40,26 +40,26 @@ else (USE_FFIO)
list(APPEND libsrc_SOURCES posixio.c)
ENDif (USE_FFIO)
if (ENABLE_BYTERANGE)
if (NETCDF_ENABLE_BYTERANGE)
list(APPEND libsrc_SOURCES httpio.c)
if (ENABLE_S3)
if (NETCDF_ENABLE_S3)
list(APPEND libsrc_SOURCES s3io.c)
endif(ENABLE_S3)
endif(ENABLE_BYTERANGE)
endif(NETCDF_ENABLE_S3)
endif(NETCDF_ENABLE_BYTERANGE)
add_library(netcdf3 OBJECT ${libsrc_SOURCES})
if (ENABLE_DLL)
if (NETCDF_ENABLE_DLL)
target_compile_definitions(netcdf3 PRIVATE DLL_NETCDF DLL_EXPORT)
endif()
if (ENABLE_BYTERANGE)
if (NETCDF_ENABLE_BYTERANGE)
target_include_directories(netcdf3 PUBLIC ${CURL_INCLUDE_DIRS})
target_compile_options(netcdf3
PRIVATE
-DCURL_STATICLIB=1
)
endif (ENABLE_BYTERANGE)
endif (NETCDF_ENABLE_BYTERANGE)
if(STATUS_PARALLEL)
target_link_libraries(netcdf3 PUBLIC MPI::MPI_C)

View File

@ -29,14 +29,14 @@ libnetcdf3_la_SOURCES += posixio.c
endif !USE_STDIO
endif !USE_FFIO
if ENABLE_BYTERANGE
if NETCDF_ENABLE_BYTERANGE
libnetcdf3_la_SOURCES += httpio.c
if ENABLE_S3
if NETCDF_ENABLE_S3
libnetcdf3_la_SOURCES += s3io.c
endif
endif ENABLE_BYTERANGE
endif NETCDF_ENABLE_BYTERANGE
noinst_LTLIBRARIES = libnetcdf3.la

View File

@ -92,7 +92,7 @@ err:
int
nc3_cktype(int mode, nc_type type)
{
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
if (mode & NC_CDF5) { /* CDF-5 format */
if (type >= NC_BYTE && type < NC_STRING) return NC_NOERR;
} else
@ -1134,7 +1134,7 @@ nc_set_default_format(int format, int *old_formatp)
return NC_EINVAL;
#else
if (format != NC_FORMAT_CLASSIC && format != NC_FORMAT_64BIT_OFFSET
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
&& format != NC_FORMAT_CDF5
#endif
)
@ -1563,7 +1563,7 @@ NC3_inq_format(int ncid, int *formatp)
return NC_NOERR;
/* only need to check for netCDF-3 variants, since this is never called for netCDF-4 files */
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
if (fIsSet(nc3->flags, NC_64BIT_DATA))
*formatp = NC_FORMAT_CDF5;
else

View File

@ -37,11 +37,11 @@ extern int ffio_open(const char*,int,off_t,size_t,size_t*,void*,ncio**,void** co
extern int mmapio_open(const char*,int,off_t,size_t,size_t*,void*,ncio**,void** const);
# endif
#ifdef ENABLE_BYTERANGE
#ifdef NETCDF_ENABLE_BYTERANGE
extern int httpio_open(const char*,int,off_t,size_t,size_t*,void*,ncio**,void** const);
#endif
#ifdef ENABLE_S3
#ifdef NETCDF_ENABLE_S3
extern int s3io_open(const char*,int,off_t,size_t,size_t*,void*,ncio**,void** const);
#endif
@ -49,7 +49,7 @@ extern int ffio_open(const char*,int,off_t,size_t,size_t*,void*,ncio**,void** co
extern int memio_open(const char*,int,off_t,size_t,size_t*,void*,ncio**,void** const);
/* Forward */
#ifdef ENABLE_BYTERANGE
#ifdef NETCDF_ENABLE_BYTERANGE
static int urlmodetest(const char* path);
#endif
@ -85,7 +85,7 @@ ncio_open(const char *path, int ioflags,
void* parameters,
ncio** iopp, void** const mempp)
{
#ifdef ENABLE_BYTERANGE
#ifdef NETCDF_ENABLE_BYTERANGE
int modetest = urlmodetest(path);
#endif
@ -103,16 +103,16 @@ ncio_open(const char *path, int ioflags,
return mmapio_open(path,ioflags,igeto,igetsz,sizehintp,parameters,iopp,mempp);
}
# endif /*USE_MMAP*/
# ifdef ENABLE_BYTERANGE
# ifdef NETCDF_ENABLE_BYTERANGE
if(modetest == NC_HTTP) {
return httpio_open(path,ioflags,igeto,igetsz,sizehintp,parameters,iopp,mempp);
}
# ifdef ENABLE_S3
# ifdef NETCDF_ENABLE_S3
if(modetest == NC_S3SDK) {
return s3io_open(path,ioflags,igeto,igetsz,sizehintp,parameters,iopp,mempp);
}
# endif
# endif /*ENABLE_BYTERANGE*/
# endif /*NETCDF_ENABLE_BYTERANGE*/
#ifdef USE_STDIO
return stdio_open(path,ioflags,igeto,igetsz,sizehintp,parameters,iopp,mempp);
@ -181,7 +181,7 @@ NC_HTTP => byterange
NC_S3SDK => s3
0 => Not URL
*/
#ifdef ENABLE_BYTERANGE
#ifdef NETCDF_ENABLE_BYTERANGE
static int
urlmodetest(const char* path)
{

View File

@ -11,7 +11,7 @@ nc4internal.c nc4type.c nc4var.c ncfunc.c ncindex.c nc4cache.c)
add_library(netcdf4 OBJECT ${libsrc4_SOURCES})
if (ENABLE_DLL)
if (NETCDF_ENABLE_DLL)
target_compile_definitions(netcdf4 PRIVATE DLL_NETCDF DLL_EXPORT)
endif()

View File

@ -16,7 +16,7 @@
#include <stddef.h>
#if 0
#ifdef ENABLE_DAP4
#ifdef NETCDF_ENABLE_DAP4
EXTERNL NC* NCD4_get_substrate_nc(int ncid);
#endif
#endif

View File

@ -10,7 +10,7 @@ target_link_libraries(netcdfp PUBLIC PNETCDF::PNETCDF)
target_sources(netcdfp PRIVATE ncpdispatch.c)
if (ENABLE_DLL)
if (NETCDF_ENABLE_DLL)
target_compile_definitions(netcdfp PRIVATE DLL_NETCDF DLL_EXPORT)
endif()

View File

@ -16,14 +16,14 @@ libs="-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ @NC_LIBS@"
libsprivate="@LIBS@"
HAS_STATIC=""
has_dap2="@ENABLE_DAP2@"
has_dap2="@NETCDF_ENABLE_DAP2@"
if [ -z $has_dap2 -o "$has_dap2" = "OFF" ]; then
has_dap2="no"
else
has_dap2="yes"
fi
has_dap4="@ENABLE_DAP4@"
has_dap4="@NETCDF_ENABLE_DAP4@"
if [ -z $has_dap4 -o "$has_dap4" = "OFF" ]; then
has_dap4="no"
else
@ -46,7 +46,7 @@ else
has_nc4="yes"
fi
has_logging="@ENABLE_LOGGING@"
has_logging="@NETCDF_ENABLE_LOGGING@"
if [ -z "$has_logging" -o "$has_logging" = "OFF" ]; then
has_logging="no"
else
@ -81,7 +81,7 @@ else
has_szlib="yes"
fi
has_cdf5="@ENABLE_CDF5@"
has_cdf5="@NETCDF_ENABLE_CDF5@"
if [ -z "$has_cdf5" -o "$has_cdf5" = "OFF" -o "$has_cdf5" = "FALSE" ]; then
has_cdf5="no"
else
@ -102,7 +102,7 @@ else
has_parallel="yes"
fi
has_nczarr="@ENABLE_NCZARR@"
has_nczarr="@NETCDF_ENABLE_NCZARR@"
if [ -z "$has_nczarr" -o "$has_nczarr" = "OFF" -o "$has_nczarr" = "FALSE" ]; then
has_nczarr="no"
else

View File

@ -32,7 +32,7 @@ add_sh_test(nc_perf perftest)
add_sh_test(nc_perf run_tst_chunks)
add_sh_test(nc_perf run_bm_elena)
IF(BUILD_UTILITIES)
IF(NETCDF_BUILD_UTILITIES)
add_sh_test(nc_perf run_bm_test1)
add_sh_test(nc_perf run_bm_test2)
@ -41,7 +41,7 @@ IF(TEST_PARALLEL4)
add_bin_test(nc_perf tst_compress_par tst_utils.c)
add_sh_test(nc_perf run_par_bm_test)
ENDIF(TEST_PARALLEL4)
ENDIF(BUILD_UTILITIES)
ENDIF(NETCDF_BUILD_UTILITIES)
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
FILE(COPY ${COPY_FILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/ FILE_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE)

View File

@ -54,7 +54,7 @@ tst_bm_rando tst_compress
run_bm_elena.log: tst_create_files.log
if BUILD_UTILITIES
if NETCDF_BUILD_UTILITIES
TESTS += run_bm_test1.sh run_bm_test2.sh
# tst_create_files creates files for other tests.
@ -68,7 +68,7 @@ tst_compress_par_LDFLAGS = -no-install
TESTS += run_par_bm_test.sh run_gfs_test.sh
run_par_bm_test.log: tst_create_files.log run_bm_test1.log
endif # TEST_PARALLEL4
endif # BUILD_UTILITIES
endif # NETCDF_BUILD_UTILITIES
# Extra files for the dist. Note that parallel tests end in .in,
# because configure substitute in the launcher (usually mpiexec).

View File

@ -101,7 +101,7 @@ ENDFOREACH()
ADD_TEST(nc_test ${EXECUTABLE_OUTPUT_PATH}/nc_test)
IF(BUILD_UTILITIES)
IF(NETCDF_BUILD_UTILITIES)
add_sh_test(nc_test run_diskless)
IF(BUILD_MMAP)
@ -118,8 +118,8 @@ IF(BUILD_UTILITIES)
ENDIF()
ENDIF()
IF(ENABLE_BYTERANGE)
IF(ENABLE_EXTERNAL_SERVER_TESTS)
IF(NETCDF_ENABLE_BYTERANGE)
IF(NETCDF_ENABLE_EXTERNAL_SERVER_TESTS)
build_bin_test_no_prefix(tst_byterange)
add_sh_test(nc_test test_byterange)
ENDIF()
@ -129,7 +129,7 @@ IF(BUILD_UTILITIES)
add_sh_test(nc_test run_mmap)
ENDIF()
ENDIF(BUILD_UTILITIES)
ENDIF(NETCDF_BUILD_UTILITIES)
# Copy some test files from current source dir to out-of-tree build dir.
FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.nc ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)

View File

@ -39,7 +39,7 @@ tst_formatx_pnetcdf tst_default_format_pnetcdf
endif
if USE_PNETCDF
if ENABLE_CDF5
if NETCDF_ENABLE_CDF5
check_PROGRAMS += tst_cdf5format
endif
endif
@ -75,10 +75,10 @@ endif
TESTS = $(TESTPROGRAMS)
if BUILD_UTILITIES
if NETCDF_BUILD_UTILITIES
if ENABLE_BYTERANGE
if ENABLE_EXTERNAL_SERVER_TESTS
if NETCDF_ENABLE_BYTERANGE
if NETCDF_ENABLE_EXTERNAL_SERVER_TESTS
tst_byterange_SOURCES = tst_byterange.c
check_PROGRAMS += tst_byterange
TESTS += test_byterange.sh
@ -105,7 +105,7 @@ else
TESTS += t_nc tst_atts3 tst_nofill nc_test tst_small
endif
endif # BUILD_UTILITIES
endif # NETCDF_BUILD_UTILITIES
# The .c files that are generated with m4 are already distributed, but
# we also include the original m4 files, plus test scripts data.
@ -125,7 +125,7 @@ tst_diskless4.cdl ref_tst_diskless4.cdl benchmark.nc \
tst_http_nc3.cdl tst_http_nc4?.cdl tmp*.cdl tmp*.nc
EXTRA_DIST += bad_cdf5_begin.nc run_cdf5.sh nc_enddef.cdl
if ENABLE_CDF5
if NETCDF_ENABLE_CDF5
# bad_cdf5_begin.nc is a corrupted CDF-5 file with bad variable starting
# file offsets. It is to be used by tst_open_cdf5.c to check if it can
# detect and report error code NC_ENOTNC.

View File

@ -134,7 +134,7 @@ main(int argc, char *argv[])
break;
case NC_FORMAT_CDF5:
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
nc_set_default_format(NC_FORMAT_CDF5, NULL);
fprintf(stderr, "\n\nSwitching to 64-bit data format.\n");
strcpy(testfile, "nc_test_cdf5.nc");

View File

@ -358,7 +358,7 @@ main(int argc, char *argv[])
#ifdef USE_PNETCDF
MPI_Init(&argc, &argv);
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
cmode |= (NC_64BIT_DATA);
#endif
ret = nc_create_par(fname,cmode, MPI_COMM_WORLD, MPI_INFO_NULL, &id);

View File

@ -2440,7 +2440,7 @@ APIFunc(get_file_version)(char *path, int *version)
if (strncmp(magic, "CDF", MAGIC_NUM_LEN-1)==0) {
if (magic[MAGIC_NUM_LEN-1] == NC_FORMAT_CLASSIC ||
magic[MAGIC_NUM_LEN-1] == NC_FORMAT_64BIT_OFFSET
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
|| magic[MAGIC_NUM_LEN-1] == NC_FORMAT_CDF5
#endif
)

View File

@ -55,7 +55,7 @@ int main(int argc, char** argv) {
buf = (int*) malloc(NY*NX * sizeof(int));
for (k=0; k<5; k++) {
#ifndef ENABLE_CDF5
#ifndef NETCDF_ENABLE_CDF5
if (formats[k] == NC_FORMAT_CDF5) continue;
#endif
#ifndef USE_HDF5

View File

@ -52,7 +52,7 @@ create_check(char *fname, int cmode, int exp_format)
if (cmode & NC_NETCDF4)
exp_err = NC_ENOTBUILT;
#endif
#ifndef ENABLE_CDF5
#ifndef NETCDF_ENABLE_CDF5
if (cmode & NC_64BIT_DATA)
exp_err = NC_ENOTBUILT;
#endif
@ -155,7 +155,7 @@ int main(int argc, char *argv[])
cmode = NC_64BIT_DATA;
nerrs += create_check(fname, cmode, NC_FORMAT_64BIT_DATA);
#ifndef ENABLE_CDF5
#ifndef NETCDF_ENABLE_CDF5
err = nc_set_default_format(NC_FORMAT_64BIT_DATA, NULL); EXP_ERR(NC_ENOTBUILT)
#else
/* set default file format to NC_FORMAT_64BIT_DATA --------------------*/

View File

@ -54,7 +54,7 @@ create_check_pnetcdf(char *fname, int cmode, int exp_format)
exp_str = formatstr(exp_format);
#ifndef ENABLE_CDF5
#ifndef NETCDF_ENABLE_CDF5
if (cmode & NC_64BIT_DATA) exp_err = NC_ENOTBUILT;
#endif
@ -119,7 +119,7 @@ int main(int argc, char *argv[])
cmode = NC_64BIT_OFFSET;
nerrs += create_check_pnetcdf(fname, cmode, NC_FORMAT_64BIT_OFFSET);
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
/* create a file in CDF5 format */
cmode = NC_64BIT_DATA;
nerrs += create_check_pnetcdf(fname, cmode, NC_FORMAT_64BIT_DATA);
@ -133,7 +133,7 @@ int main(int argc, char *argv[])
cmode = 0;
nerrs += create_check_pnetcdf(fname, cmode, NC_FORMAT_64BIT_OFFSET);
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
/* create a file in CDF5 format (this should ignore default) */
cmode = NC_64BIT_DATA;
nerrs += create_check_pnetcdf(fname, cmode, NC_FORMAT_64BIT_DATA);

View File

@ -44,10 +44,10 @@ determine_test_formats(int *num_formats, int *format)
#endif /* USE_HDF5 */
/* Do we have CDF5? */
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
num++;
format[ind++] = NC_FORMAT_CDF5;
#endif /* ENABLE_CDF5 */
#endif /* NETCDF_ENABLE_CDF5 */
*num_formats = num;
}

View File

@ -38,7 +38,7 @@ main(int argc, char **argv)
num_formats += 2;
#endif
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
num_formats++;
#endif
@ -47,7 +47,7 @@ main(int argc, char **argv)
formats[n++] = 0;
formats[n++] = NC_64BIT_OFFSET;
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
formats[n++] = NC_64BIT_DATA;
#endif
#ifdef USE_HDF5

View File

@ -81,7 +81,7 @@ int main(int argc, char **argv) {
}
SUMMARIZE_ERR;
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
printf("\n* Testing nc_inq_type with CDF5\n");
{
if(nc_create(FILE_NAME,NC_CLOBBER|NC_CDF5,&ncid)) ERR;
@ -111,7 +111,7 @@ int main(int argc, char **argv) {
if (nc_close(ncid)) ERR;
}
SUMMARIZE_ERR;
#endif /* ENABLE_CDF5 */
#endif /* NETCDF_ENABLE_CDF5 */
#ifdef USE_HDF5
printf("\n* Testing nc_inq_type with netcdf-4 + Classic Model\n");

View File

@ -225,7 +225,7 @@ main(int argc, char **argv)
NC_FORMAT_CLASSIC
,
NC_FORMAT_64BIT_OFFSET
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
,
NC_FORMAT_CDF5
#endif

View File

@ -55,7 +55,7 @@ static int file_create(const char *filename, int cmode, int *ncid)
#ifdef USE_PNETCDF
if (default_format == NC_FORMAT_CLASSIC ||
default_format == NC_FORMAT_64BIT_OFFSET
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
|| default_format == NC_FORMAT_64BIT_DATA
#endif
)
@ -523,7 +523,7 @@ main(int argc, char **argv)
printf("Switching to 64-bit offset format.\n");
strcpy(testfile, "tst_small_64bit.nc");
break;
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
case NC_FORMAT_CDF5:
nc_set_default_format(NC_FORMAT_CDF5, NULL);
printf("Switching to 64-bit data format.\n");

View File

@ -31,7 +31,7 @@ ENDIF()
# Note, renamegroup needs to be compiled before run_grp_rename
IF(BUILD_UTILITIES)
IF(NETCDF_BUILD_UTILITIES)
SET(NC4_TESTS ${NC4_TESTS} tst_xplatform)
build_bin_test(renamegroup)
add_sh_test(nc_test4 run_grp_rename)
@ -41,7 +41,7 @@ IF(BUILD_UTILITIES)
build_bin_test(tst_fillonly)
ADD_SH_TEST(nc_test4 test_fillonly)
ADD_SH_TEST(nc_test4 tst_fixedstring)
IF(USE_HDF5 AND ENABLE_FILTER_TESTING)
IF(USE_HDF5 AND NETCDF_ENABLE_FILTER_TESTING)
build_bin_test(tst_filterparser)
build_bin_test(test_filter)
build_bin_test(test_filter_misc)
@ -63,9 +63,9 @@ IF(USE_HDF5 AND ENABLE_FILTER_TESTING)
# manually invoked if desired
ADD_SH_TEST(nc_test4 tst_filterinstall)
ENDIF(FALSE)
ENDIF(USE_HDF5 AND ENABLE_FILTER_TESTING)
ENDIF(USE_HDF5 AND NETCDF_ENABLE_FILTER_TESTING)
ENDIF(BUILD_UTILITIES)
ENDIF(NETCDF_BUILD_UTILITIES)
IF(${HDF5_VERSION} VERSION_GREATER "1.10.0")
SET(NC4_TESTS ${NC4_TESTS} tst_virtual_datasets)
@ -95,7 +95,7 @@ ENDIF()
IF(HAVE_H5Z_SZIP)
BUILD_BIN_TEST(test_szip)
BUILD_BIN_TEST(h5testszip)
IF(BUILD_UTILITIES)
IF(NETCDF_BUILD_UTILITIES)
add_sh_test(nc_test4 tst_szip)
ENDIF()
ENDIF()

View File

@ -61,7 +61,7 @@ TESTS += tst_v2
endif # BUILD_V2
# The rest of the tests require ncgen/ncdump.
if BUILD_UTILITIES
if NETCDF_BUILD_UTILITIES
check_PROGRAMS += renamegroup
TESTS += run_grp_rename.sh tst_misc.sh
@ -79,7 +79,7 @@ endif
# Filter Tests (requires ncdump and ncgen and HDF5)
if USE_HDF5
if ENABLE_FILTER_TESTING
if NETCDF_ENABLE_FILTER_TESTING
extradir =
check_PROGRAMS += test_filter test_filter_misc test_filter_order test_filter_repeat
check_PROGRAMS += tst_multifilter tst_filter_vlen
@ -107,9 +107,9 @@ if AX_MANUAL
TESTS += tst_filterinstall.sh
endif
endif # ENABLE_FILTER_TESTING
endif # NETCDF_ENABLE_FILTER_TESTING
endif # USE_HDF5
endif # BUILD_UTILITIES
endif # NETCDF_BUILD_UTILITIES
# This are extra tests that will only be run if netcdf-4 is configured
# with --enable-parallel-tests.

View File

@ -51,10 +51,10 @@ determine_test_formats(int *num_formats, int *format)
#endif /* USE_HDF5 */
/* Do we have CDF5? */
#ifdef ENABLE_CDF5
#ifdef NETCDF_ENABLE_CDF5
num++;
format[ind++] = NC_FORMAT_CDF5;
#endif /* ENABLE_CDF5 */
#endif /* NETCDF_ENABLE_CDF5 */
*num_formats = num;
}

Some files were not shown because too many files have changed in this diff Show More