Skip to content

Commit

Permalink
switch
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisHeimbigner committed May 19, 2024
1 parent 18c454b commit d3852fb
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 210 deletions.
21 changes: 13 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -432,18 +432,18 @@ endif()
# Format Option checks
################################

# As a long term goal, and because it is now the case that
# -DNETCDF_ENABLE_NCZARR => USE_NETCDF4, so make the external options
# -DNETCDF_ENABLE-NETCDF-4 and _DNETCDF_ENABLE-NETCDF4 obsolete
# in favor of --NETCDF_ENABLE-HDF5.
# As a long term goal, and because it is now the case that --enable-nczarr
# => USE_NETCDF4, make the external options --enable-netcdf-4 and
# --enable-netcdf4 obsolete in favor of --enable-hdf5
# We will do the following for one more release cycle.
# 1. Make --NETCDF_ENABLE-NETCDF-4 be an alias for --NETCDF_ENABLE-NETCDF4.
# 2. Make --NETCDF_ENABLE-NETCDF4 an alias for --NETCDF_ENABLE-HDF5.
# 3. Internally, convert most (but not all) uses of USE_NETCDF_4 and USE_NETCDF4 to USE_HDF5.
# 1. Make --enable-netcdf-4 be an alias for --enable-netcdf4.
# 2. Make --enable-netcdf4 an alias for --enable-hdf5.
# 3. Internally, convert most uses of USE_NETCDF_4 ad USE_NETCDF4 to USE_HDF5

# Collect the values of -DNETCDF_ENABLE-NETCDF-4, -DNETCDF_ENABLE-NETCDF4, and -DNETCDF_ENABLE-HDF5.
# Also determine which have been explicitly set on the command line.

# Figure out which options are defined and process options
# Figure out which options are defined
if(DEFINED NETCDF_ENABLE_NETCDF_4)
set(UNDEF_NETCDF_4 OFF CACHE BOOL "")
option(NETCDF_ENABLE_NETCDF_4 "" ON)
Expand Down Expand Up @@ -485,6 +485,9 @@ if(UNDEF_HDF5)
set(NETCDF_ENABLE_HDF5 ON CACHE BOOL "" FORCE)
endif()

# Turn off enable_netcdf_4 because it is no longer needed
set(NETCDF_ENABLE_NETCDF_4 OFF CACHE BOOL "" FORCE)

# Turn off enable_netcdf4 because it will be used
# as a shorthand for ENABLE_HDF5|ENABLE_HDF4|ENABLE_NCZARR
set(NETCDF_ENABLE_NETCDF4 OFF CACHE BOOL "" FORCE)
Expand Down Expand Up @@ -515,6 +518,8 @@ ENDIF()
# as a short-hand for this boolean expression
if(NETCDF_ENABLE_HDF5 OR NETCDF_ENABLE_HDF4 OR NETCDF_ENABLE_NCZARR)
set(NETCDF_ENABLE_NETCDF4 ON CACHE BOOL "Enable netCDF-4 API" FORCE)
# For convenience, define USE_NETCDF4
set(USE_NETCDF4 ON CACHE BOOL "Enable netCDF-4 API" FORCE)
endif()

# enable|disable all forms of network access
Expand Down
2 changes: 1 addition & 1 deletion cmake/netcdf_functions_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ macro(print_conf_summary)
message("Configuration Summary:")
message("")
message(STATUS "Building Shared Libraries: ${BUILD_SHARED_LIBS}")
message(STATUS "Building netCDF-4: ${NETCDF_ENABLE_NETCDF_4}")
message(STATUS "Building netCDF-4: ${NETCDF_ENABLE_NETCDF4}")
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}")
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ AC_MSG_NOTICE([checking supported formats])

# Collect the values of --enable-netcdf-4, --enable-netcdf4, and --enable-hdf5.
# Also determine which have been explicitly set on the command line.

AC_ARG_ENABLE([netcdf-4], [AS_HELP_STRING([--enable-netcdf-4],
[(Deprecated) Synonym for --enable-hdf5; default yes])])
AC_ARG_ENABLE([netcdf4], [AS_HELP_STRING([--enable-netcdf4],
Expand Down Expand Up @@ -2051,6 +2050,7 @@ AC_SUBST(HAS_NC2,[$nc_build_v2])
AC_SUBST(HAS_CDF5,[$enable_cdf5])
AC_SUBST(HAS_HDF4,[$enable_hdf4])
AC_SUBST(HAS_BENCHMARKS,[$enable_benchmarks])
AC_SUBST(HAS_NC4,[$enable_netcdf4])
AC_SUBST(HAS_HDF5,[$enable_hdf5])
AC_SUBST(HAS_PNETCDF,[$enable_pnetcdf])
AC_SUBST(HAS_LOGGING, [$enable_logging])
Expand Down
1 change: 1 addition & 0 deletions libnetcdf.settings.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ XML Parser: @XMLPARSER@
--------
Benchmarks: @HAS_BENCHMARKS@
NetCDF-2 API: @HAS_NC2@
NetCDF-4 API: @HAS_NC4@
HDF4 Support: @HAS_HDF4@
HDF5 Support: @HAS_HDF5@
CDF5 Support: @HAS_CDF5@
Expand Down
170 changes: 0 additions & 170 deletions nczarr_test/timer_utils.c

This file was deleted.

30 changes: 0 additions & 30 deletions nczarr_test/timer_utils.h

This file was deleted.

0 comments on commit d3852fb

Please sign in to comment.