summaryrefslogtreecommitdiffstats
path: root/Modules/FindHDF5.cmake
diff options
context:
space:
mode:
authorKris Thielemans <kris.f.thielemans@hotmail.com>2017-02-28 01:00:27 (GMT)
committerBrad King <brad.king@kitware.com>2017-02-28 21:01:04 (GMT)
commit4b847f12f645b953feada796de66bc40b876f4f5 (patch)
treeb65ac62975efe6471f30ae7e3f6ae4158cb5da97 /Modules/FindHDF5.cmake
parentcdb6d7df970fcaaf6cda1bef9955351222e1bcde (diff)
downloadCMake-4b847f12f645b953feada796de66bc40b876f4f5.zip
CMake-4b847f12f645b953feada796de66bc40b876f4f5.tar.gz
CMake-4b847f12f645b953feada796de66bc40b876f4f5.tar.bz2
FindHDF5: hide HDF5_DIR if HDF5 was found in another way
Diffstat (limited to 'Modules/FindHDF5.cmake')
-rw-r--r--Modules/FindHDF5.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index 65a825d..c538a81 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -822,3 +822,9 @@ find_package_handle_standard_args(HDF5
)
unset(_HDF5_SEARCH_OPTS)
+
+if( HDF5_FOUND AND NOT HDF5_DIR)
+ # hide HDF5_DIR for the non-advanced user to avoid confusion with
+ # HDF5_DIR-NOT_FOUND while HDF5 was found.
+ mark_as_advanced(HDF5_DIR)
+endif()