]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
CMake: documented FindPaco.cmake. New macro SALOME_ADD_MPI_TO_HDF5()
authorbruneton <bruneton>
Tue, 23 Jul 2013 12:17:29 +0000 (12:17 +0000)
committerbruneton <bruneton>
Tue, 23 Jul 2013 12:17:29 +0000 (12:17 +0000)
to overload HDF5 variables with MPI stuff when HDF5 was compiled parallel.

CMakeLists.txt
salome_adm/cmake_files/FindPaco.cmake
salome_adm/cmake_files/SalomeMacros.cmake

index 52dbf3d519d8893542e9f47652c57023f5b8ca1a..eb66da023a5ee87ad6d4e29103ef13ab365b75de 100755 (executable)
@@ -96,6 +96,9 @@ IF(NOT SALOME_LIGHT_ONLY)
 ENDIF() 
 IF(SALOME_USE_MPI)
   FIND_PACKAGE(SalomeMPI REQUIRED)
+  IF(HDF5_IS_PARALLEL)
+    SALOME_ADD_MPI_TO_HDF5()
+  ENDIF()
 ENDIF()
 IF(SALOME_PACO_PARALLEL)
   FIND_PACKAGE(SalomePaco REQUIRED)
index a1b287a893baa009908acee32d9d888820617ea3..501ed81bd660f59760cbe404d656935274d18727 100644 (file)
@@ -1,3 +1,13 @@
+# - Find Paco installation
+#
+# Variables set are:
+#    PACO_INCLUDE_DIRS - include directories to add when compiling
+#    PACO_LIBRARIES    - Paco libraries to link against
+#
+# You can set the environment or CMake variable PACO_ROOT_DIR to guide
+# the detection mechanism. 
+#
+#############################################################
 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
@@ -19,7 +29,9 @@
 
 # ------
 
-MESSAGE(STATUS "Check for Paco ...")
+IF(NOT Paco_FIND_QUIETLY)
+  MESSAGE(STATUS "Check for Paco ...")
+ENDIF()
 
 # ------
 
index 73567594a1dc25d07d6e10c5809a38d4bdf4eca8..52c6a36ea7fdc752f61065d63c5a873ebbee86d3 100755 (executable)
@@ -447,3 +447,14 @@ MACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS pkg referenceVariable upCount)
   SET(Salome${pkg}_FOUND "${pkg}_FOUND")
 ENDMACRO(SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS)
 
+
+####################################################################
+# SALOME_ADD_MPI_TO_HDF5()
+# 
+# Overload the HDF5 flags so that they also contain MPI references.
+# This is to be used when HDF5 was compiled with MPI support;
+MACRO(SALOME_ADD_MPI_TO_HDF5)  
+  SET(HDF5_INCLUDE_DIRS ${HDF5_INCLUDE_DIRS} ${MPI_INCLUDE_DIRS})
+  SET(HDF5_DEFINITIONS "${HDF5_DEFINITIONS} ${MPI_DEFINITIONS}")
+  SET(HDF5_LIBRARIES ${HDF5_LIBRARIES} ${MPI_LIBRARIES})
+ENDMACRO(SALOME_ADD_MPI_TO_HDF5)