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.
This commit is contained in:
parent
bc4c372ebd
commit
229ed5c228
@ -35,4 +35,11 @@ def configure_args(self):
|
||||
# There is no clear way to set this via configure, so set the flag
|
||||
# explicitly
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user