FIND_PACKAGE(HDF5)
IF(HDF5_FOUND)
- IF( (HDF5_WITH_MPI AND DEAL_II_WITH_MPI)
- OR
- (NOT HDF5_WITH_MPI AND NOT DEAL_II_WITH_MPI))
+
+ IF( (HDF5_WITH_MPI AND DEAL_II_WITH_MPI) OR
+ (NOT HDF5_WITH_MPI AND NOT DEAL_II_WITH_MPI) )
SET(${var} TRUE)
+
ELSE()
+
MESSAGE(STATUS "Insufficient hdf5 installation found: "
"hdf5 has to be configured with the same MPI configuration as deal.II."
)
" DEAL_II_WITH_MPI = ${DEAL_II_WITH_MPI}\n"
" HDF5_WITH_MPI = ${HDF5_WITH_MPI}\n"
)
+ UNSET(HDF5_HL_LIBRARY CACHE)
+ UNSET(HDF5_INCLUDE_DIR CACHE)
+ UNSET(HDF5_LIBRARY CACHE)
+ UNSET(HDF5_PUBCONF CACHE)
ENDIF()
+ ENDIF()
+ENDMACRO()
+
+MACRO(FEATURE_HDF5_CONFIGURE_EXTERNAL)
INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIRS})
+
+ # The user has to know the location of the HDF5 headers as well:
LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS})
- DEAL_II_APPEND_LIBRARIES(${HDF5_LIBRARIES})
-
- ENDIF()
+ DEAL_II_APPEND_LIBRARIES(${HDF5_LIBRARIES})
ENDMACRO()
+
CONFIGURE_FEATURE(HDF5)
lib${LIB_SUFFIX} lib64 lib
)
+FIND_FILE(HDF5_PUBCONF H5pubconf.h
+ HINTS
+ ${HDF5_INCLUDE_DIR}
+ ${HDF5_DIR}
+ PATH_SUFFIXES
+ hdf5 hdf5/include include/hdf5 include
+ )
+
SET(_output ${HDF5_HL_LIBRARY} ${HDF5_LIBRARY})
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HDF5 DEFAULT_MSG
_output # Cosmetic: Gives nice output
HDF5_HL_LIBRARY
HDF5_LIBRARY
HDF5_INCLUDE_DIR
+ HDF5_PUBCONF
)
MARK_AS_ADVANCED(
HDF5_LIBRARY
HDF5_HL_LIBRARY
HDF5_INCLUDE_DIR
+ HDF5_PUBCONF
)
IF(HDF5_FOUND)
#
# Is hdf5 compiled with support for mpi?
#
- FILE(STRINGS "${HDF5_INCLUDE_DIR}/H5pubconf.h" HDF5_MPI_STRING
+ FILE(STRINGS ${HDF5_PUBCONF} HDF5_MPI_STRING
REGEX "#define.*H5_HAVE_PARALLEL 1")
IF("${HDF5_MPI_STRING}" STREQUAL "")
SET(HDF5_WITH_MPI FALSE)