Fixed bug in FindHDF5 caused by hdf5.h existing without H5pubconf.h.

This commit is contained in:
Will Dicharry 2009-10-29 17:18:41 -04:00
parent 8612aa10b6
commit 518f9c57b7
1 changed files with 8 additions and 7 deletions

View File

@ -291,14 +291,15 @@ else()
# If the HDF5 include directory was found, open H5pubconf.h to determine if
# HDF5 was compiled with parallel IO support
set( HDF5_IS_PARALLEL FALSE )
if( HDF5_INCLUDE_DIR )
file( STRINGS "${HDF5_INCLUDE_DIR}/H5pubconf.h"
HDF5_HAVE_PARALLEL_DEFINE
REGEX "HAVE_PARALLEL 1" )
if( HDF5_HAVE_PARALLEL_DEFINE )
set( HDF5_IS_PARALLEL TRUE )
else()
set( HDF5_IS_PARALLEL FALSE )
if( EXISTS "${HDF5_INCLUDE_DIR}/h5pubconf.h" )
file( STRINGS "${HDF5_INCLUDE_DIR}/H5pubconf.h"
HDF5_HAVE_PARALLEL_DEFINE
REGEX "HAVE_PARALLEL 1" )
if( HDF5_HAVE_PARALLEL_DEFINE )
set( HDF5_IS_PARALLEL TRUE )
endif()
endif()
endif()
set( HDF5_IS_PARALLEL ${HDF5_IS_PARALLEL} CACHE BOOL