diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-01-30 10:06:35 -0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2020-01-31 10:46:47 +0100 |
commit | 402f7afdb03fa59b28e1c01b490b9673382f1ba4 (patch) | |
tree | 417111d0aa89642c59b28401e683657364b5f72f | |
parent | 4104cbdaf9f3b5b60191699a1d9c9e7512beb0d8 (diff) | |
download | meson-402f7afdb03fa59b28e1c01b490b9673382f1ba4.zip meson-402f7afdb03fa59b28e1c01b490b9673382f1ba4.tar.gz meson-402f7afdb03fa59b28e1c01b490b9673382f1ba4.tar.bz2 |
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
-rw-r--r-- | mesonbuild/dependencies/misc.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index 07948c9..04dee06 100644 --- a/mesonbuild/dependencies/misc.py +++ b/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)) |