Releases: geospace-code/h5fortran
remove vestigial optional ierr
The optional "ierr" argument was not well tested and in almost every case did nothing. It was a source of user confusion and excess internal untested code, so we removed it from all functions except "%open".
We also used "select type" to eliminate hundreds of lines of code, for better code quality.
use HDF5 built-in casting
use HDF5 built-in casting real32 <=> real64 and int32 <=> int64. We no longer manually cast int <=> real to reduce code complexity and memory usage. This also helps avoid inefficient user code where type casting int <=> real was accidental.
The gain in efficiency and reduction in code complexity outweighs the small and easily fixed user use cases that used int <=> real casting. The user will have to assign appropriate variable types to match disk datatypes. Again, real32 <=> real64 and int32 <=> int64 is fine and handled inside the HDF5 library.
About 1,000 lines of code were deduplicated/eliminated, one of the largest reductions in this project's history.
add code coverage test, remove unused pathlib module
Added CI or local code coverage test with GCC + Gcovr. As a result, realized that pathlib module was unused, and removed pathlib.
flatten install dirs, don't override cache var hdf5_external
v4.2.10 simplify link statement
shared windows enhancement, HDF5 version select for build
- Further shared lib enhancements for Windows
- if building HDF5, allow selecting from HDF5 versions in cmake/libraries.json via HDF5_VERSION variable
comprehensive CI for build HDF5 and shared libs
CI tests HDF5 build in static and shared across Linux, MacOS, Windows
put Rpath in exe for shared builds
Read character improvement, install and build type defaults
-
read character: automatically truncate to c_null_char if present
this avoids the user having to do this themself.
Before this, if the user string variable was longer than the disk
string variable the remainder of the user variable could be filled
with garbage non-blank characters. -
default install to top-level project binary dir
this makes the default install directory visible even when
used from FetchContent -
use CMake generator expressions to simplify / clarify logic
default release, better findHdf5, cleanup presets
enhance Intel CI tests to be debug and release
FindHDF5: find_program only searches HDF5_ROOT when specified
Since h5cc compiler wrappers are optional, search only HDF5_ROOT when specified, otherwise Anaconda wrappers may get picked up, causing link to fail.
Fortran module search is first under HDF5 C include directory to handle case where primary HDF5 library was not compiled with Fortran interface, which would usually cause link failure. If HDF5_ROOT specified, search Fortran hdf5.mod only under that.
FindHDF5 ignores conda
conda HDF5 conflicts with compilers typically, yet is first on PATH by design. We ignore Conda for the FindHDF5, FindZLIB only to allow the rest of the project to use Python.