]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Possibility to use HDF5 compiled with CMake (and with MPI support) BR_new_bop3
authorgdd <gdd>
Thu, 13 Jun 2013 16:44:12 +0000 (16:44 +0000)
committergdd <gdd>
Thu, 13 Jun 2013 16:44:12 +0000 (16:44 +0000)
CMakeLists.txt
salome_adm/cmake_files/FindSalomeHDF5.cmake
salome_adm/cmake_files/FindSalomeMPI.cmake

index 1fd90c7cc6372ec33dab26e83a2bd7871086aa99..d6431f5fb544f09e4fe731576bb270d42aa5409c 100755 (executable)
@@ -76,9 +76,9 @@ find_package(SalomeBOOST)
 
 # optional prerequisites
 
-if(SALOME_USE_MPI OR HDF5_IS_PARALLEL)
+if(SALOME_USE_MPI OR HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL)
   find_package(SalomeMPI)
-endif(SALOME_USE_MPI OR HDF5_IS_PARALLEL)
+endif(SALOME_USE_MPI OR HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL)
 
 if(SALOME_USE_CORBA)
   find_package(OMNIORB)
index 3745a99b75f3050e732deb4b2643ff7be030373b..e59ea8115817e326eb6fee9e454c8c3178398112 100644 (file)
 # HDF5 detection for Salome
 
 set(HDF5_ROOT_DIR $ENV{HDF5_ROOT_DIR} CACHE PATH "Path to Hdf5 directory")
+
+# If HDF5 is compiled with CMake, we use the config file
+if(EXISTS ${HDF5_ROOT_DIR}/share/cmake/hdf5)
+  INCLUDE(${HDF5_ROOT_DIR}/share/cmake/hdf5/hdf5-config.cmake)
+endif(EXISTS ${HDF5_ROOT_DIR}/share/cmake/hdf5)
+
 if(EXISTS ${HDF5_ROOT_DIR})
   set(CMAKE_INCLUDE_PATH ${HDF5_ROOT_DIR}/include)
   set(CMAKE_LIBRARY_PATH ${HDF5_ROOT_DIR}/lib)
index 2b30623679e064913526f8cb683d2501add59e11..b1fdb8894628b627aa88deccfce36660893e2d7f 100644 (file)
@@ -26,7 +26,7 @@ if(EXISTS ${MPI_ROOT_DIR})
   set(CMAKE_PROGRAM_PATH ${MPI_ROOT_DIR}/bin)
 endif(EXISTS ${MPI_ROOT_DIR})
 find_package(MPI REQUIRED)
-if(HDF5_IS_PARALLEL)
+if(HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL)
   set(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS} ${MPI_C_INCLUDE_PATH} ${MPI_CXX_INCLUDE_PATH} )
   set(HDF5_LIBRARIES ${HDF5_LIBRARIES} ${MPI_C_LIBRARIES} ${MPI_CXX_LIBRARIES})
-endif(HDF5_IS_PARALLEL)
+endif(HDF5_IS_PARALLEL OR HDF5_ENABLE_PARALLEL)