From 9753d4c27e61f1ed90061c9a65a7a30a16062405 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 21 Mar 2017 13:03:40 -0400 Subject: 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 --- Modules/FindHDF5.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake index 1c48763..1005635 100644 --- a/Modules/FindHDF5.cmake +++ b/Modules/FindHDF5.cmake @@ -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 . @@ -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} -- cgit v0.12