Skip to content

Commit 0db08f6

Browse files
Merge pull request #653 from E3SM-Project/jayeshkrishna/disable_nczarr_by_default
Disable support for NCZarr by default. Use PIO_ENABLE_NCZARR config flag to turn it on.
2 parents 9859227 + 907b886 commit 0db08f6

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ option (PIO_SAVE_DECOMPS "Dump the decomposition information" OFF)
5151
option (PIO_LIMIT_CACHED_IO_REGIONS "Limit the number of non-contiguous regions in an IO process" OFF)
5252
option (WITH_PNETCDF "Require the use of PnetCDF" ON)
5353
option (WITH_NETCDF "Require the use of NetCDF" ON)
54+
option (PIO_ENABLE_NCZARR "Enable support for NCZarr (via NetCDF)" OFF)
5455
option (WITH_ADIOS2 "Require the use of ADIOS 2.x" OFF)
5556
option (WITH_HDF5 "Require the use of HDF5" OFF)
5657
option (ADIOS_BP2NC_TEST "Enable testing of BP to NetCDF conversion" OFF)

src/clib/CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,18 @@ if (WITH_NETCDF)
112112
PUBLIC ${NetCDF_C_LIBRARIES})
113113
if (${NetCDF_C_HAS_PARALLEL})
114114
set(PIO_USE_NETCDF4 1)
115+
set(PIO_USE_NETCDF4_NCZARR 0)
115116
if (${NetCDF_C_HAS_NCZARR})
116-
set(PIO_USE_NETCDF4_NCZARR 1)
117-
target_compile_definitions (pioc
118-
PUBLIC _SPIO_HAS_NETCDF4_NCZARR)
117+
if (PIO_ENABLE_NCZARR)
118+
message(STATUS "Enabling support for NCZarr")
119+
set(PIO_USE_NETCDF4_NCZARR 1)
120+
target_compile_definitions (pioc
121+
PUBLIC _SPIO_HAS_NETCDF4_NCZARR)
122+
else ()
123+
message(STATUS "Disabling support for NCZarr (default)")
124+
endif ()
119125
else ()
120-
set(PIO_USE_NETCDF4_NCZARR 0)
126+
message(STATUS "Disabling support for NCZarr (not supported)")
121127
endif ()
122128
else ()
123129
set(PIO_USE_NETCDF4 0)

0 commit comments

Comments
 (0)