Merge pull request #1661 from gsjaardema/patch-38

Better finding of the hdf5.h include path
This commit is contained in:
Ward Fisher 2020-03-05 16:46:35 -07:00 committed by GitHub
commit 4a24a78aa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -761,7 +761,8 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
SET(H5_USE_16_API 0)
ENDIF()
FIND_PATH(HAVE_HDF5_H hdf5.h PATHS ${HDF5_INCLUDE_DIR})
FIND_PATH(HAVE_HDF5_H hdf5.h PATHS ${HDF5_INCLUDE_DIR} NO_DEFAULT_PATH)
FIND_PATH(HAVE_HDF5_H hdf5.h)
IF(NOT HAVE_HDF5_H)
MESSAGE(FATAL_ERROR "Compiling a test with hdf5 failed. Either hdf5.h cannot be found, or the log messages should be checked for another reason.")
ELSE(NOT HAVE_HDF5_H)