hdf images hdf images

This web site is no longer maintained (but will remain online).
Please see The HDF Group's new Support Portal for the latest information.

HDF5 and CMake Issues

Using FindHDF5.cmake with HDF5

There are three methods that you can use to find a package:

  1. Use FindHDF5.cmake (that comes with CMake) with the "module mode".

    The FindHDF5.cmake that comes with CMake was developed by the community. It was created before we developed CMake-built binaries. The original intent of it was to provide a non-cmake HDF5 build on Linux. It targets an HDF5 build that was not created by The HDF Group. It is very useful for finding an autotools built HDF5 for a Linux type platform.

    If you are encountering issues with this method, you may be able to resolve it by looking at the module to see why it is causing the issue. There is likely a variable to force it to find the correct libraries.

    This is the default method that gets used. The HDF Group chooses not to make changes to this method.

  2. Use the CMake FindHDF5.cmake with the "config mode". This method is recommended by CMake and The HDF Group. The HDF Group can make changes to this.

  3. Use the FindHDF5.cmake provided in HDF5. Although this is not tested, issues with it can be fixed and should be reported to The HDF Group. You can set a CMake variable, CMAKE_MODULE_PATH, to point to it.


- - Last modified: 19 December 2014