Add h5cc shlib argument for correctly link hdf5 libraries

respect "static" key in dependency function
-shlib for static dependency
-noshlib for static dependency
pull/7583/head
William F Godoy 4 years ago committed by Dylan Baker
parent f2890cbf97
commit 847d652c4e
  1. 3
      mesonbuild/dependencies/hdf5.py

@ -105,7 +105,8 @@ class HDF5Dependency(ExternalDependency):
prog = ExternalProgram(wrappers[lang], silent=True) prog = ExternalProgram(wrappers[lang], silent=True)
if not prog.found(): if not prog.found():
return return
cmd = prog.get_command() + ['-show'] shlib_arg = '-noshlib' if kwargs.get('static', False) else '-shlib'
cmd = prog.get_command() + [shlib_arg, '-show']
p = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, timeout=15) p = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, timeout=15)
if p.returncode != 0: if p.returncode != 0:
mlog.debug('Command', mlog.bold(cmd), 'failed to run:') mlog.debug('Command', mlog.bold(cmd), 'failed to run:')

Loading…
Cancel
Save