Commit 9753d4c2 authored by Brad King's avatar Brad King

FindHDF5: Add option to skip finding package configuration file

Some projects may not be prepared to use the imported targets defined by
the HDF5 package configuration file.  Give users a way to skip this part
of the search.

Issue: #16718
parent 2df8aa0c
......@@ -91,6 +91,9 @@
#
# ``HDF5_ROOT``
# Specify the path to the HDF5 installation to use.
#
# ``HDF5_NO_FIND_PACKAGE_CONFIG_FILE``
# Set to a true value to skip trying to find ``hdf5-config.cmake``.
# This module is maintained by Will Dicharry <wdicharry@stellarscience.com>.
......@@ -391,7 +394,7 @@ else()
endif()
# Try to find HDF5 using an installed hdf5-config.cmake
if(NOT HDF5_FOUND)
if(NOT HDF5_FOUND AND NOT HDF5_NO_FIND_PACKAGE_CONFIG_FILE)
find_package(HDF5 QUIET NO_MODULE
HINTS ${HDF5_ROOT}
${_HDF5_SEARCH_OPTS}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment