FindHDF5 does not find Fortran High-Level API
cmake 3.6.1 on OS X using homebrew does not find the Fortran High-Level API library. It also does not report an error indicating that this library was not found.
The following executes without error:
find_package(HDF5 1.10 COMPONENTS Fortran HL Fortran_HL REQUIRED)
However, the Fortran High-Level API library is listed as LIBRARY-NOTFOUND:
-- HDF5_HL_LIBRARIES: HDF5_hdf5_hl_fortran_LIBRARY-NOTFOUND/usr/local/hdf5/lib/libhdf5_hl.a/usr/local/hdf5/lib/libhdf5_fortran.a/usr/local/hdf5/lib/libhdf5.a
The issue is due to the search name for the library being misnamed in FindHDF5. It is setting HDF5_Fortran_HL_LIBRARY_NAMES
to use the name hdf5_hl_fortran
however the library name is actually hdf5hl_fortran
.