Commit af68e41f authored by Kenneth Leiter's avatar Kenneth Leiter
Browse files

COMP: Fix compilation against hdf5 when built with parallel.

HDF5 doesn't provide #ifndef blocks to prevent users of the library from undefining
unneeded sections of code (in this case H5_HAVE_PARALLEL). This leads to mpi.h
being needed when including hdf5.h even though we currently don't use the MPI writing
capabilities. Thus, we will need to find and include mpi headers when HDF5_IS_PARALLEL
is detected by cmake.
parent 6616dd16
......@@ -22,7 +22,13 @@ endif(Boost_FOUND)
find_package(HDF5 REQUIRED)
if(HDF5_FOUND)
include_directories(${HDF5_INCLUDE_DIR})
include_directories(${HDF5_INCLUDE_DIR})
if(HDF5_IS_PARALLEL)
find_package(MPI REQUIRED)
if(MPI_FOUND)
include_directories(${MPI_INCLUDE_PATH})
endif(MPI_FOUND)
endif(HDF5_IS_PARALLEL)
endif(HDF5_FOUND)
if(XDMF_BUILD_DSM)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment