summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-21 17:03:40 (GMT)
committerBrad King <brad.king@kitware.com>2017-03-21 17:07:07 (GMT)
commit9753d4c27e61f1ed90061c9a65a7a30a16062405 (patch)
treeca9fdafd4e4edf4024e387e4948634c8a2b19442 /Modules
parent2df8aa0c804038e7812b7acf47d5530d967d7ad7 (diff)
downloadCMake-9753d4c27e61f1ed90061c9a65a7a30a16062405.zip
CMake-9753d4c27e61f1ed90061c9a65a7a30a16062405.tar.gz
CMake-9753d4c27e61f1ed90061c9a65a7a30a16062405.tar.bz2
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
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindHDF5.cmake5
1 files changed, 4 insertions, 1 deletions
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 <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}