Skip to content

Commit

Permalink
netcdf-c: add logging variant (spack#43380)
Browse files Browse the repository at this point in the history
Co-authored-by: Massimiliano Culpo <[email protected]>
Co-authored-by: Sergey Kosukhin <[email protected]>
  • Loading branch information
3 people authored Jun 5, 2024
1 parent 8260599 commit 391c4cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions var/spack/repos/builtin/packages/netcdf-c/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ class NetcdfC(CMakePackage, AutotoolsPackage):
variant("fsync", default=False, description="Enable fsync support")
variant("nczarr_zip", default=False, description="Enable NCZarr zipfile format storage")
variant("optimize", default=True, description="Enable -O2 for a more optimized lib")
variant("logging", default=False, description="Enable logging")

variant("szip", default=True, description="Enable Szip compression plugin")
variant("blosc", default=True, description="Enable Blosc compression plugin")
Expand Down Expand Up @@ -337,6 +338,7 @@ def cmake_args(self):
self.define("ENABLE_PARALLEL_TESTS", False),
self.define_from_variant("ENABLE_FSYNC", "fsync"),
self.define("ENABLE_LARGE_FILE_SUPPORT", True),
self.define_from_variant("NETCDF_ENABLE_LOGGING", "logging"),
]
if "+parallel-netcdf" in self.pkg.spec:
base_cmake_args.append(self.define("ENABLE_PNETCDF", True))
Expand Down Expand Up @@ -432,6 +434,8 @@ def configure_args(self):

config_args += self.enable_or_disable("fsync")

config_args += self.enable_or_disable("logging")

if any(self.spec.satisfies(s) for s in ["+mpi", "+parallel-netcdf", "^hdf5+mpi~shared"]):
config_args.append("CC={0}".format(self.spec["mpi"].mpicc))

Expand Down

0 comments on commit 391c4cf

Please sign in to comment.