FindHDF5: Check for a few H5pubconf*.h name variants
Some distros package H5pubconf.h as "H5pubconf-32.h" or "H5pubconf-64.h" depending on the architecture. Look for all of these names.
This commit is contained in:
parent
53bb51fc31
commit
4bd122ad9c
|
@ -336,14 +336,16 @@ if( NOT HDF5_FOUND )
|
||||||
# HDF5 was compiled with parallel IO support
|
# HDF5 was compiled with parallel IO support
|
||||||
set( HDF5_IS_PARALLEL FALSE )
|
set( HDF5_IS_PARALLEL FALSE )
|
||||||
foreach( _dir IN LISTS HDF5_INCLUDE_DIRS )
|
foreach( _dir IN LISTS HDF5_INCLUDE_DIRS )
|
||||||
if( EXISTS "${_dir}/H5pubconf.h" )
|
foreach(_hdr "${_dir}/H5pubconf.h" "${_dir}/H5pubconf-64.h" "${_dir}/H5pubconf-32.h")
|
||||||
file( STRINGS "${_dir}/H5pubconf.h"
|
if( EXISTS "${_hdr}" )
|
||||||
|
file( STRINGS "${_hdr}"
|
||||||
HDF5_HAVE_PARALLEL_DEFINE
|
HDF5_HAVE_PARALLEL_DEFINE
|
||||||
REGEX "HAVE_PARALLEL 1" )
|
REGEX "HAVE_PARALLEL 1" )
|
||||||
if( HDF5_HAVE_PARALLEL_DEFINE )
|
if( HDF5_HAVE_PARALLEL_DEFINE )
|
||||||
set( HDF5_IS_PARALLEL TRUE )
|
set( HDF5_IS_PARALLEL TRUE )
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
endforeach()
|
||||||
endforeach()
|
endforeach()
|
||||||
set( HDF5_IS_PARALLEL ${HDF5_IS_PARALLEL} CACHE BOOL
|
set( HDF5_IS_PARALLEL ${HDF5_IS_PARALLEL} CACHE BOOL
|
||||||
"HDF5 library compiled with parallel IO support" )
|
"HDF5 library compiled with parallel IO support" )
|
||||||
|
|
Loading…
Reference in New Issue