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
This commit is contained in:
Brad King committed 2017-03-21 13:07:07 -04:00
1 parent 2df8aa0c80
commit 9753d4c27e
1 file changed
+4 -1
+4 -1
View File
@@ -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}