FindHDF5: hide HDF5_DIR if HDF5 was found in another way

This commit is contained in:
Kris Thielemans
2017-02-28 01:00:27 +00:00
committed by Brad King
parent cdb6d7df97
commit 4b847f12f6

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()