From: bruneton Date: Tue, 23 Jul 2013 12:17:29 +0000 (+0000) Subject: CMake: documented FindPaco.cmake. New macro SALOME_ADD_MPI_TO_HDF5() X-Git-Tag: begin_agr_portmanager_branch_131004~79 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a8847ca31087c4074fe5f4e48acb491e7284d11d;p=modules%2Fkernel.git CMake: documented FindPaco.cmake. New macro SALOME_ADD_MPI_TO_HDF5() to overload HDF5 variables with MPI stuff when HDF5 was compiled parallel. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 52dbf3d51..eb66da023 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/salome_adm/cmake_files/FindPaco.cmake b/salome_adm/cmake_files/FindPaco.cmake index a1b287a89..501ed81bd 100644 --- a/salome_adm/cmake_files/FindPaco.cmake +++ b/salome_adm/cmake_files/FindPaco.cmake @@ -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() # ------ diff --git a/salome_adm/cmake_files/SalomeMacros.cmake b/salome_adm/cmake_files/SalomeMacros.cmake index 73567594a..52c6a36ea 100755 --- a/salome_adm/cmake_files/SalomeMacros.cmake +++ b/salome_adm/cmake_files/SalomeMacros.cmake @@ -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)