mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-04-24 18:30:51 +08:00
Replace ENABLE_NETCDF_4 with NETCDF_ENABLE_NETCDF_4
This commit is contained in:
parent
b51234b06a
commit
1ada3f6717
@ -434,10 +434,10 @@ endif()
|
||||
# 1. if NETCDF_ENABLE_HDF5 is off then disable hdf5
|
||||
# 2. if NETCDF_ENABLE_NETCDF4 is off then disable hdf5
|
||||
# 3. else enable hdf5
|
||||
option(ENABLE_NETCDF_4 "Use HDF5." ON)
|
||||
option(NETCDF_ENABLE_NETCDF_4 "Use HDF5." ON)
|
||||
option(NETCDF_ENABLE_NETCDF4 "Use HDF5." ON)
|
||||
option(NETCDF_ENABLE_HDF5 "Use HDF5." ON)
|
||||
if(NOT NETCDF_ENABLE_HDF5 OR NOT NETCDF_ENABLE_NETCDF4 OR NOT ENABLE_NETCDF_4)
|
||||
if(NOT NETCDF_ENABLE_HDF5 OR NOT NETCDF_ENABLE_NETCDF4 OR NOT NETCDF_ENABLE_NETCDF_4)
|
||||
set(NETCDF_ENABLE_HDF5 OFF CACHE BOOL "Use HDF5" FORCE)
|
||||
endif()
|
||||
option(NETCDF_ENABLE_HDF4 "Build netCDF-4 with HDF4 read capability(HDF4, HDF5 and Zlib required)." OFF)
|
||||
@ -450,7 +450,7 @@ option(NETCDF_ENABLE_CDF5 "Enable CDF5 support" ON)
|
||||
# Netcdf-4 support (i.e. libsrc4) is required by more than just HDF5 (e.g. NCZarr)
|
||||
# So depending on what above formats are enabled, enable netcdf-4
|
||||
if(NETCDF_ENABLE_HDF5 OR NETCDF_ENABLE_HDF4 OR NETCDF_ENABLE_NCZARR)
|
||||
set(ENABLE_NETCDF_4 ON CACHE BOOL "Enable netCDF-4 API" FORCE)
|
||||
set(NETCDF_ENABLE_NETCDF_4 ON CACHE BOOL "Enable netCDF-4 API" FORCE)
|
||||
set(NETCDF_ENABLE_NETCDF4 ON CACHE BOOL "Enable netCDF4 Alias" FORCE)
|
||||
endif()
|
||||
|
||||
@ -475,9 +475,9 @@ endif()
|
||||
# Did the user specify a default minimum blocksize for posixio?
|
||||
set(NCIO_MINBLOCKSIZE 256 CACHE STRING "Minimum I/O Blocksize for netCDF classic and 64-bit offset format files.")
|
||||
|
||||
if(ENABLE_NETCDF_4)
|
||||
if(NETCDF_ENABLE_NETCDF_4)
|
||||
set(USE_NETCDF4 ON CACHE BOOL "")
|
||||
set(ENABLE_NETCDF_4 ON CACHE BOOL "")
|
||||
set(NETCDF_ENABLE_NETCDF_4 ON CACHE BOOL "")
|
||||
set(NETCDF_ENABLE_NETCDF4 ON CACHE BOOL "")
|
||||
else()
|
||||
set(USE_HDF4_FILE_TESTS OFF)
|
||||
@ -488,7 +488,7 @@ endif()
|
||||
|
||||
# Option Logging, only valid for netcdf4.
|
||||
option(NETCDF_ENABLE_LOGGING "Enable Logging." OFF)
|
||||
if(NOT ENABLE_NETCDF_4)
|
||||
if(NOT NETCDF_ENABLE_NETCDF_4)
|
||||
set(NETCDF_ENABLE_LOGGING OFF)
|
||||
endif()
|
||||
if(NETCDF_ENABLE_LOGGING)
|
||||
@ -497,7 +497,7 @@ if(NETCDF_ENABLE_LOGGING)
|
||||
set(ENABLE_SET_LOG_LEVEL ON)
|
||||
endif()
|
||||
option(ENABLE_SET_LOG_LEVEL_FUNC "Enable definition of nc_set_log_level()." ON)
|
||||
if(ENABLE_NETCDF_4 AND NOT NETCDF_ENABLE_LOGGING AND ENABLE_SET_LOG_LEVEL_FUNC)
|
||||
if(NETCDF_ENABLE_NETCDF_4 AND NOT NETCDF_ENABLE_LOGGING AND ENABLE_SET_LOG_LEVEL_FUNC)
|
||||
target_compile_definitions(netcdf PRIVATE -DENABLE_SET_LOG_LEVEL)
|
||||
set(ENABLE_SET_LOG_LEVEL ON)
|
||||
endif()
|
||||
@ -1621,7 +1621,7 @@ is_disabled(BUILD_SHARED_LIBS enable_static)
|
||||
is_enabled(BUILD_SHARED_LIBS enable_shared)
|
||||
|
||||
is_enabled(ENABLE_V2_API HAS_NC2)
|
||||
is_enabled(ENABLE_NETCDF_4 HAS_NC4)
|
||||
is_enabled(NETCDF_ENABLE_NETCDF_4 HAS_NC4)
|
||||
is_enabled(NETCDF_ENABLE_HDF4 HAS_HDF4)
|
||||
is_enabled(USE_HDF5 HAS_HDF5)
|
||||
is_enabled(OFF HAS_BENCHMARKS)
|
||||
|
@ -69,7 +69,7 @@ would specify it with the '-G' flag.
|
||||
Common NetCDF/CMake Options
|
||||
*********************
|
||||
|
||||
- ENABLE_NETCDF_4 (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)
|
||||
@ -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
|
||||
|
@ -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: ${ENABLE_NETCDF_4}")
|
||||
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}")
|
||||
|
Loading…
x
Reference in New Issue
Block a user