From 853b5bf36bc92070f6ccca25e8d0cdefcb0a5beb Mon Sep 17 00:00:00 2001 From: ageay Date: Tue, 9 Jul 2013 09:47:26 +0000 Subject: [PATCH] Addition of METIS in MEDPartitioner. --- CMakeLists.txt | 4 ++++ src/MEDPartitioner/CMakeLists.txt | 13 +++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 46c82bab2..115ca4285 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,7 @@ 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") @@ -87,6 +88,9 @@ IF(NOT SALOME_MED_MICROMED) FIND_PACKAGE(SalomeMEDFile REQUIRED) IF(SALOME_MED_ENABLE_PARTITIONER) FIND_PACKAGE(SalomeLibXml2 REQUIRED) + IF(SALOME_MED_PARTITIONER_METIS) + FIND_PACKAGE(SalomeMetis REQUIRED) + ENDIF(SALOME_MED_PARTITIONER_METIS) ENDIF(SALOME_MED_ENABLE_PARTITIONER) ENDIF(NOT SALOME_MED_MICROMED) diff --git a/src/MEDPartitioner/CMakeLists.txt b/src/MEDPartitioner/CMakeLists.txt index 19461e290..2cbd32485 100644 --- a/src/MEDPartitioner/CMakeLists.txt +++ b/src/MEDPartitioner/CMakeLists.txt @@ -38,13 +38,14 @@ IF(MED_ENABLE_SCOTCH) INCLUDE_DIRECTORIES(${SCOTCH_INCLUDE_DIRS}) ENDIF(MED_ENABLE_SCOTCH) -IF(MED_ENABLE_METIS) +IF(SALOME_MED_PARTITIONER_METIS) ADD_DEFINITIONS(${METIS_DEFINITIONS}) + ADD_DEFINITIONS("-DMED_ENABLE_METIS") INCLUDE_DIRECTORIES(${METIS_INCLUDE_DIRS}) -ENDIF(MED_ENABLE_METIS) +ENDIF(SALOME_MED_PARTITIONER_METIS) IF(MED_ENABLE_PARMETIS) - ADD_DEFINITIONS(${METIS_DEFINITIONS}) + ADD_DEFINITIONS(${PARMETIS_DEFINITIONS}) INCLUDE_DIRECTORIES(${PARMETIS_INCLUDE_DIRS}) ENDIF(MED_ENABLE_PARMETIS) @@ -106,12 +107,12 @@ IF(MED_ENABLE_PARMETIS) SET(medpartitionercpp_DEFINITIONS "${medpartitionercpp_DEFINITIONS} ${PARMETIS_DEFINITIONS}") SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${PARMETIS_LIBS}) ENDIF(MED_ENABLE_PARMETIS) -IF(MED_ENABLE_METIS) +IF(SALOME_MED_PARTITIONER_METIS) SET(medpartitionercpp_HEADERS_HXX ${medpartitionercpp_HEADERS_HXX} MEDPARTITIONER_MetisGraph.hxx) SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} MEDPARTITIONER_MetisGraph.cxx) SET(medpartitionercpp_DEFINITIONS "${medpartitionercpp_DEFINITIONS} ${METIS_DEFINITIONS}") - SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${METIS_LIBS}) -ENDIF(MED_ENABLE_METIS) + SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${METIS_LIBRARIES}) +ENDIF(SALOME_MED_PARTITIONER_METIS) IF(MED_ENABLE_SCOTCH) SET(medpartitionercpp_HEADERS_HXX ${medpartitionercpp_HEADERS_HXX} MEDPARTITIONER_ScotchGraph.hxx) SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} MEDPARTITIONER_ScotchGraph.cxx) -- 2.39.2