mfem: fix transitive hdf5 static libs (#18457)
This commit is contained in:
parent
e58db067c3
commit
e22a0ca5cf
@ -494,10 +494,16 @@ def find_optional_library(name, prefix):
|
|||||||
ld_flags_from_dirs([spec['gslib'].prefix.lib], ['gs'])]
|
ld_flags_from_dirs([spec['gslib'].prefix.lib], ['gs'])]
|
||||||
|
|
||||||
if '+netcdf' in spec:
|
if '+netcdf' in spec:
|
||||||
|
lib_flags = ld_flags_from_dirs([spec['netcdf-c'].prefix.lib],
|
||||||
|
['netcdf'])
|
||||||
|
hdf5 = spec['hdf5:hl']
|
||||||
|
if hdf5.satisfies('~shared'):
|
||||||
|
hdf5_libs = hdf5.libs
|
||||||
|
hdf5_libs += LibraryList(find_system_libraries('libdl'))
|
||||||
|
lib_flags += " " + ld_flags_from_library_list(hdf5_libs)
|
||||||
options += [
|
options += [
|
||||||
'NETCDF_OPT=-I%s' % spec['netcdf-c'].prefix.include,
|
'NETCDF_OPT=-I%s' % spec['netcdf-c'].prefix.include,
|
||||||
'NETCDF_LIB=%s' %
|
'NETCDF_LIB=%s' % lib_flags]
|
||||||
ld_flags_from_dirs([spec['netcdf-c'].prefix.lib], ['netcdf'])]
|
|
||||||
|
|
||||||
if '+zlib' in spec:
|
if '+zlib' in spec:
|
||||||
if "@:3.3.2" in spec:
|
if "@:3.3.2" in spec:
|
||||||
|
@ -181,6 +181,8 @@ def configure_args(self):
|
|||||||
hdf5_hl = self.spec['hdf5:hl']
|
hdf5_hl = self.spec['hdf5:hl']
|
||||||
cppflags.append(hdf5_hl.headers.cpp_flags)
|
cppflags.append(hdf5_hl.headers.cpp_flags)
|
||||||
ldflags.append(hdf5_hl.libs.search_flags)
|
ldflags.append(hdf5_hl.libs.search_flags)
|
||||||
|
if hdf5_hl.satisfies('~shared'):
|
||||||
|
libs.append(hdf5_hl.libs.link_flags)
|
||||||
|
|
||||||
if '+parallel-netcdf' in self.spec:
|
if '+parallel-netcdf' in self.spec:
|
||||||
config_args.append('--enable-pnetcdf')
|
config_args.append('--enable-pnetcdf')
|
||||||
|
Loading…
Reference in New Issue
Block a user