CMake FindHDF5 improvements

Our CMake FindHDF5 MR is included in CMake ≥ 3.18. We have made an even further improved FindHDF5.cmake in h5fortran and see how it’s used in hdf5.cmake.

The important improvements are:

  1. check that HDF5 compiler wrapper is able to compile and link a simple HDF5 program
  2. have more default directories to search for the HDF5 libraries
  3. work with HDF5 1.10.6

Before this, CMake would get confused by the Anaconda / Miniconda HDF5 compiler wrapper. This also makes Intel compiler on Windows work with HDF5.