Skip to content
Snippets Groups Projects
Commit 14acfb65 authored by Dustin Lagoy's avatar Dustin Lagoy Committed by Peter Scheibel
Browse files

netcdf-cxx package: Add optional netCDF4 support (#10899)

parent 57523c3f
No related branches found
No related tags found
No related merge requests found
...@@ -19,9 +19,20 @@ class NetcdfCxx(AutotoolsPackage): ...@@ -19,9 +19,20 @@ class NetcdfCxx(AutotoolsPackage):
depends_on('netcdf') depends_on('netcdf')
variant(
'netcdf4', default=True, description='Compile with netCDF4 support')
@property @property
def libs(self): def libs(self):
shared = True shared = True
return find_libraries( return find_libraries(
'libnetcdf_c++', root=self.prefix, shared=shared, recursive=True 'libnetcdf_c++', root=self.prefix, shared=shared, recursive=True
) )
def configure_args(self):
args = []
if '+netcdf4' in self.spec:
# There is no clear way to set this via configure, so set the flag
# explicitly
args.append('CPPFLAGS=-DUSE_NETCDF4')
return args
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment