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

netcdf-cxx package: set ldflags for hdf5 and netcdf (#11026)

Ensure that netcdf-cxx uses the Spack-installed hdf5 and netcdf4
rather than system-installed versions.
parent bc4c372e
No related branches found
No related tags found
No related merge requests found
...@@ -35,4 +35,11 @@ def configure_args(self): ...@@ -35,4 +35,11 @@ def configure_args(self):
# There is no clear way to set this via configure, so set the flag # There is no clear way to set this via configure, so set the flag
# explicitly # explicitly
args.append('CPPFLAGS=-DUSE_NETCDF4') args.append('CPPFLAGS=-DUSE_NETCDF4')
# Add these to LDFLAGS explicitly, so the linker doesn't accidentally
# use system versions
ldflags = [
self.spec['netcdf'].libs.search_flags,
self.spec['hdf5'].libs.search_flags,
]
args.append('LDFLAGS=' + ' '.join(ldflags))
return args 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