]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Bugfix: Only try to read a hdf5 header if hdf5 is actually found.
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 19 Oct 2012 22:16:58 +0000 (22:16 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 19 Oct 2012 22:16:58 +0000 (22:16 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@27147 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/modules/FindHDF5.cmake

index fd96cf98f4c674bddc96e1cce708b95e89cccb87..d50babf090c45df2f1c7c60b8a929b635dfc53af 100644 (file)
@@ -62,17 +62,6 @@ SET(HDF5_LIBRARIES
   ${HDF5_HL_LIBRARY}
   )
 
-#
-# Is hdf5 compiled with support for mpi?
-#
-FILE(STRINGS "${HDF5_INCLUDE_DIR}/H5pubconf.h" HDF5_MPI_STRING
-  REGEX "#define.*H5_HAVE_PARALLEL 1")
-IF("${HDF5_MPI_STRING}" STREQUAL "")
-  SET(HDF5_WITH_MPI FALSE)
-ELSE()
-  SET(HDF5_WITH_MPI TRUE)
-ENDIF()
-
 IF(HDF5_FOUND)
   MARK_AS_ADVANCED(
     HDF5_DIR
@@ -80,6 +69,18 @@ IF(HDF5_FOUND)
     HDF5_HL_LIBRARY
     HDF5_INCLUDE_DIR
     )
+
+  #
+  # Is hdf5 compiled with support for mpi?
+  #
+  FILE(STRINGS "${HDF5_INCLUDE_DIR}/H5pubconf.h" HDF5_MPI_STRING
+    REGEX "#define.*H5_HAVE_PARALLEL 1")
+  IF("${HDF5_MPI_STRING}" STREQUAL "")
+    SET(HDF5_WITH_MPI FALSE)
+  ELSE()
+    SET(HDF5_WITH_MPI TRUE)
+  ENDIF()
+
 ELSE()
   SET(HDF5_DIR "" CACHE STRING
     "An optional hint to an hdf5 directory"

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.