|
TRIQS/h5 2.0.0
C++ interface to HDF5
|
h5 supports the usual installation procedure using CMake.
If you want to skip the installation step, you can go directly to Integration in C++ projects to see how you can integrate h5 into your own C++ project by using CMake's FetchContent.
Note: To guarantee reproducibility in scientific calculations, we strongly recommend the use of a stable release version.
The dependencies of the C++ h5 library are as follows:
The Python interface requires additional dependencies:
The Python extension module is compiled with the help of c2py which is fetched automatically when running CMake with PythonSupport=ON.
We do not provide explicit version requirements. Instead, we refer the user to the h5 CI builds on GitHub Actions, where recent OS, HDF5 and compiler versions are tested.
Download the source code of the latest stable version by cloning the TRIQS/h5 repository from GitHub:
Create and move to a new directory where you will compile the code:
In the build directory, call cmake including any additional custom CMake options (see below):
Note that it is required to specify CMAKE_INSTALL_PREFIX, otherwise CMake will stop with an error.
Compile the code, run the tests and install the application:
Replace N with the number of cores you want to use to build the library.
To choose a particular version, go into the directory with the sources, and look at all available versions:
Checkout the version of the code that you want:
and follow steps 2 to 4 above to compile the code.
The compilation of h5 can be configured by calling cmake with additional command line options
The following options are available:
| Options | Syntax |
|---|---|
| Specify an installation path | -DCMAKE_INSTALL_PREFIX=path_to_install_dir |
| Build in Debugging Mode | -DCMAKE_BUILD_TYPE=Debug |
| Disable testing (not recommended) | -DBuild_Tests=OFF |
| Build the documentation | -DBuild_Documentation=ON |
| Disable Python support | -DPythonSupport=OFF |
| Build shared libraries | -DBUILD_SHARED_LIBS=ON |