dependencies: netcdf always look for netcdf-fortran for fortran

Otherwise it tries to link with the C bindings and fails. This is why
the test is broken on archlinux
pull/6553/head
Dylan Baker 5 years ago committed by Xavier Claessens
parent 4104cbdaf9
commit 402f7afdb0
  1. 8
      mesonbuild/dependencies/misc.py

@ -45,12 +45,12 @@ def netcdf_factory(env: 'Environment', for_machine: 'MachineChoice',
candidates = [] # type: T.List['DependencyType']
if DependencyMethods.PKGCONFIG in methods:
pkgconfig_files = ['netcdf']
if language == 'fortran':
pkgconfig_files.append('netcdf-fortran')
pkg = 'netcdf-fortran'
else:
pkg = 'netcdf'
for pkg in pkgconfig_files:
candidates.append(functools.partial(PkgConfigDependency, pkg, env, kwargs, language=language))
candidates.append(functools.partial(PkgConfigDependency, pkg, env, kwargs, language=language))
if DependencyMethods.CMAKE in methods:
candidates.append(functools.partial(CMakeDependency, 'NetCDF', env, kwargs, language=language))

Loading…
Cancel
Save