How to use fpm with external pre-compiled modules and libraries

FYI - HDF5 is a metapackage and will appear starting fpm 0.11.0, but it is in the trunk repository on GitHub already:

name = "my_science_app"
dependencies.hdf5 = "*"

HDF5 is supported for Fortran, C and C++ languages. The pkg-config backend is employed by fpm to find a valid local HDF5 installation, so, please insure that pkg-config is also available when using this metapackage.

Both the default and the high-level (HL) interfaces are linked against if available.

  • On Ubuntu, special steps are taken to ensure HL are added.
  • On Ubuntu with oneAPI compilers, CMake HDF5 installations are supported (apt versions only support gfortran).

Note: Codes using HDF5 built with oneAPI compilers should not have the -standard-semantics flag: it changes module name mangling from _mp_ to _MP_ which makes HDF5 modules unavailable.