From: ageay Date: Tue, 9 Jul 2013 10:44:45 +0000 (+0000) Subject: Addition of SCOTCH in MEDPartitioner. X-Git-Tag: B4KillOfAutomake~42 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f7ce04b7e11dc77f6bac39ceb72f48ba951ea962;p=modules%2Fmed.git Addition of SCOTCH in MEDPartitioner. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 808126afb..52524ead8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,13 +72,14 @@ IF(NOT SALOME_MED_STANDALONE) MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR or turn option SALOME_MED_STANDALONE to ON !") ENDIF(EXISTS ${KERNEL_ROOT_DIR}) LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files") - LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files") FIND_PACKAGE(SalomeOmniORB REQUIRED) ELSE(NOT SALOME_MED_STANDALONE) LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local_without_kernel/cmake_files") INCLUDE(SalomeMacros) ENDIF(NOT SALOME_MED_STANDALONE) +LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files") + IF(NOT SALOME_MED_MICROMED) FIND_PACKAGE(SalomeHDF5 REQUIRED) FIND_PACKAGE(SalomeMEDFile REQUIRED) diff --git a/src/MEDPartitioner/CMakeLists.txt b/src/MEDPartitioner/CMakeLists.txt index e89c23e4c..0e13e49f1 100644 --- a/src/MEDPartitioner/CMakeLists.txt +++ b/src/MEDPartitioner/CMakeLists.txt @@ -97,7 +97,6 @@ SET(medpartitionercpp_LDFLAGS ${HDF5_LIBRARIES} ${STDLIB} ${LIBXML2_LIBRARIES} - ${MPI_LIBRARIES} interpkernel medcoupling medloader @@ -121,16 +120,14 @@ IF(SALOME_MED_PARTITIONER_SCOTCH) SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${SCOTCH_LIBRARIES}) ENDIF(SALOME_MED_PARTITIONER_SCOTCH) -IF(SALOME_USE_MPI) - SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} - MEDPARTITIONER_UtilsPara.cxx - MEDPARTITIONER_JointFinder.cxx - ) -ADD_EXECUTABLE(medpartitioner_para medpartitioner_para.cxx) +IF(${SALOME_USE_MPI}) + SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} MEDPARTITIONER_UtilsPara.cxx MEDPARTITIONER_JointFinder.cxx) + ADD_EXECUTABLE(medpartitioner_para medpartitioner_para.cxx) + SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${MPI_LIBRARIES}) SET_TARGET_PROPERTIES(medpartitioner_para PROPERTIES COMPILE_FLAGS "${medpartitionercpp_DEFINITIONS}") TARGET_LINK_LIBRARIES(medpartitioner_para medpartitionercpp ${medpartitionercpp_LDFLAGS}) INSTALL(TARGETS medpartitioner_para DESTINATION ${SALOME_INSTALL_BINS}) -ENDIF(SALOME_USE_MPI) +ENDIF(${SALOME_USE_MPI}) ADD_LIBRARY(medpartitionercpp SHARED ${medpartitionercpp_SOURCES}) SET_TARGET_PROPERTIES(medpartitionercpp PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS} ${medpartitionercpp_DEFINITIONS}") diff --git a/src/MEDPartitioner/MEDPARTITIONER_metis.c b/src/MEDPartitioner/MEDPARTITIONER_metis.c index 0a7e241e8..98ef41eee 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_metis.c +++ b/src/MEDPartitioner/MEDPARTITIONER_metis.c @@ -27,7 +27,9 @@ #include "MEDPARTITIONER_metis.h" #if defined(MED_ENABLE_METIS) - #include + #include "defs.h" + #include "struct.h" + #include "metis.h" #else typedef int idxtype; #endif