diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-11-10 10:14:01 -0500 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-11-28 12:51:58 +0200 |
commit | c02593fddc70402d8a3f50b8ae476e1778d5cd3c (patch) | |
tree | ec6106c602800cb3f771b03074ba570c82f13b8a /mesonbuild/dependencies/misc.py | |
parent | dd15c47ea8c8cde4b954dad1ea9625c360412f14 (diff) | |
download | meson-c02593fddc70402d8a3f50b8ae476e1778d5cd3c.zip meson-c02593fddc70402d8a3f50b8ae476e1778d5cd3c.tar.gz meson-c02593fddc70402d8a3f50b8ae476e1778d5cd3c.tar.bz2 |
HDF5: make much more robust across platforms
This addresses various real-world problems with HDF5 pkg-config, including
* hdf*.pc with package versions as part of the filename
* malformed hdf*.pc missing the commonly-used HDF5 HL module
---
Additionally, this refactors more complicated dependencies such as
HDF5 and OpenMPI. This may help us deduplicate internal dependency
code in the future.
HDF5 selftest: improve platform-agnostic test
ci: init demo github action for HDF5 framework
ci Actions: hold off on MSYS2 for now [skip ci]
hdf5: ensure C libraries always included
ci: mac hdf5--use clang+gfortran
Diffstat (limited to 'mesonbuild/dependencies/misc.py')
-rw-r--r-- | mesonbuild/dependencies/misc.py | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/mesonbuild/dependencies/misc.py b/mesonbuild/dependencies/misc.py index 789015a..bfd450c 100644 --- a/mesonbuild/dependencies/misc.py +++ b/mesonbuild/dependencies/misc.py @@ -30,53 +30,6 @@ from .base import ( ) -class HDF5Dependency(ExternalDependency): - - def __init__(self, environment, kwargs): - language = kwargs.get('language', 'c') - super().__init__('hdf5', environment, language, kwargs) - kwargs['required'] = False - kwargs['silent'] = True - self.is_found = False - - pkgconfig_files = ['hdf5'] - - if language not in ('c', 'cpp', 'fortran'): - raise DependencyException('Language {} is not supported with HDF5.'.format(language)) - - for pkg in pkgconfig_files: - try: - pkgdep = PkgConfigDependency(pkg, environment, kwargs, language=self.language) - if pkgdep.found(): - self.compile_args = pkgdep.get_compile_args() - # derive needed libraries by language - pd_link_args = pkgdep.get_link_args() - link_args = [] - for larg in pd_link_args: - lpath = Path(larg) - if lpath.is_file(): - if language == 'cpp': - link_args.append(str(lpath.parent / (lpath.stem + '_hl_cpp' + lpath.suffix))) - link_args.append(str(lpath.parent / (lpath.stem + '_cpp' + lpath.suffix))) - elif language == 'fortran': - link_args.append(str(lpath.parent / (lpath.stem + 'hl_fortran' + lpath.suffix))) - link_args.append(str(lpath.parent / (lpath.stem + '_fortran' + lpath.suffix))) - - # HDF5 C libs are required by other HDF5 languages - link_args.append(str(lpath.parent / (lpath.stem + '_hl' + lpath.suffix))) - link_args.append(larg) - else: - link_args.append(larg) - - self.link_args = link_args - self.version = pkgdep.get_version() - self.is_found = True - self.pcdep = pkgdep - break - except Exception: - pass - - class NetCDFDependency(ExternalDependency): def __init__(self, environment, kwargs): |