From 821c9e7bfc947082b67a6e33dd4c38fbcd6ae60f Mon Sep 17 00:00:00 2001 From: bruneton Date: Wed, 11 Sep 2013 08:40:19 +0000 Subject: [PATCH] CMake: introducing KERNEL_DEFINITIONS and completing KERNEL_INCLUDE_DIRS to have MPI. This avoids redetecting MPI in GUI. Also fixed a typo in SALOMEDSImpl. --- salome_adm/cmake_files/SalomeKERNELConfig.cmake.in | 8 +++++++- src/SALOMEDSImpl/CMakeLists.txt | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/salome_adm/cmake_files/SalomeKERNELConfig.cmake.in b/salome_adm/cmake_files/SalomeKERNELConfig.cmake.in index 7a3dc823c..c2b0bc658 100644 --- a/salome_adm/cmake_files/SalomeKERNELConfig.cmake.in +++ b/salome_adm/cmake_files/SalomeKERNELConfig.cmake.in @@ -46,13 +46,19 @@ ENDIF() # Package root dir: SET_AND_CHECK(KERNEL_ROOT_DIR_EXP "@PACKAGE_CMAKE_INSTALL_PREFIX@") -# Include directories +# Include directories and definitions SET_AND_CHECK(KERNEL_INCLUDE_DIRS "${KERNEL_ROOT_DIR_EXP}/@SALOME_INSTALL_HEADERS@") +SET(KERNEL_DEFINITIONS) #### Now the specificities # Options exported by the package: SET(SALOME_USE_MPI @SALOME_USE_MPI@) +IF(SALOME_USE_MPI) + SET(KERNEL_INCLUDE_DIRS "${KERNEL_INCLUDE_DIRS};@MPI_INCLUDE_DIRS@") + SET(KERNEL_DEFINITIONS "@MPI_DEFINITIONS@") +ENDIF() + SET(SALOME_BUILD_DOC @SALOME_BUILD_DOC@) SET(SALOME_BUILD_TESTS @SALOME_BUILD_TESTS@) SET(SALOME_LIGHT_ONLY @SALOME_LIGHT_ONLY@) diff --git a/src/SALOMEDSImpl/CMakeLists.txt b/src/SALOMEDSImpl/CMakeLists.txt index ca25fb1df..403810919 100755 --- a/src/SALOMEDSImpl/CMakeLists.txt +++ b/src/SALOMEDSImpl/CMakeLists.txt @@ -19,7 +19,7 @@ INCLUDE_DIRECTORIES( ${PTHREAD_INCLUDE_DIR} - ${HDF5_INCLUDE_DIR} + ${HDF5_INCLUDE_DIRS} ${Boost_INCLUDE_DIR} ${PROJECT_BINARY_DIR}/salome_adm ${CMAKE_CURRENT_SOURCE_DIR}/../Basics -- 2.39.2