I'm using CMake to configure a project including HDF5 support. I can detect whether HDF5 is installed using find_package(HDF5 ...)
. According to the CMake manual entry, the find_package
call will set a few more variables, e.g., HDF5_IS_PARALLEL
.
However, when building HDF5, one can set a lot more build options. For my project, I need to have an HDF5 installation with both the HDF5_ENABLE_DIRECT_VFD
and HDF5_ENABLE_THREADSAFE
options enabled. Trying to run my project using an HDF5 installation without those options will either not compile or yield various runtime errors.
How can I detect if those options are present in the HDF5 installation during the CMake configuration of my project?