FindHDF5: hide HDF5_DIR if HDF5 was found in another way

This commit is contained in:
Kris Thielemans authored and Brad King committed 2017-02-28 16:01:04 -05:00
1 parent cdb6d7df97
commit 4b847f12f6
1 file changed
+6
+6
View File
@@ -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()