Releases: geospace-code/h5fortran
autobuild hdf5: also autobuild if HDF5 configure test fails
CI: all use autobuild, break tasks into flows (parallel runs)
vendor CMake 3.18.3 FindHDF5.cmake
To greatly increase robustness of FindHDF5, vendor CMake 3.18.3. This is because HDF Group is changing HDF5 library names, and sometimes new bugs are introduced by Kitware when others are fixed.
workaround HDFGroup HDF5 autobuild bugs
beta: workaround for HDFGroup HDF5 CMake bugs to allow HDF5 autobuild.
Tested with
- Intel Fortran (Windows)
- GCC (Windows, Linux)
improve HDF5 build script
deduced that HDF5's CMakeLists has problems including
- cannot always build in parallel
- rebuild avoidance is completely broken
as a result, workaround these issues by using one-time install scripts. Other projects have forked HDF5 to workaround these issues internally but we would like to avoid yet another HDF5 fork.
HDF5 library manual build scripts
If necessary, we provide two ways to build HDF5.
- CMake: the CMAKE_INSTALL_PREFIX variable defaults to ~/libs/hdf5-*
- Python
The autobuild option was too shaky as HDF5 itself has shaky CMake script that is not reliable enough to use the technique we use for libraries like Lapack, Scalapack and Mumps.
add h5fortran_BUILD_TESTING variable
this allows easier control from externalProject as option() (here implicit) overrides the CMAKE_ARGS
autobuild hdf5: limit parallel build
CMake is more correct about using physical CPU core count than GNU Make, so limit with CMake's count when possible. Otherwise the PC can nearly freeze while building HDF5.
HDF5 autobuild option
Using the HDF Group HDF5 Git repo, allow autobuilding a recent release of HDF5 if the system HDF5 library is not available or not working
add BUILD_TESTING option, tighten up HDF5::HDF5 target
bugfix and enhancements
- bugfix: check read/write shape determination to use if(present(stride)) properly, this avoided runtime errors when stride wasn't specified (read intel, write gcc)
- add HDF5::HDF5 imported target
- improve documentation and CMake for Intel Fortran with HDF5.
- determine need for szip via Hdf5 header