X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDPartitioner%2FCMakeLists.txt;h=33aa64a83e22261eb66683d83139d39cd8fd2bdd;hb=4c22ba01f2901896d1ec9ca302640f4d7e50d147;hp=d537059fe49a1edadd85bc7e84533772c4a78877;hpb=c9020954af7fe85dd75b34e5ea7951b0f1f4cb25;p=tools%2Fmedcoupling.git diff --git a/src/MEDPartitioner/CMakeLists.txt b/src/MEDPartitioner/CMakeLists.txt index d537059fe..33aa64a83 100644 --- a/src/MEDPartitioner/CMakeLists.txt +++ b/src/MEDPartitioner/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2015 CEA/DEN, EDF R&D +# Copyright (C) 2012-2020 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -19,6 +19,10 @@ ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS} ${LIBXML2_DEFINITIONS}) +IF (NOT DEFINED MSVC) + ADD_DEFINITIONS(-Wsign-compare -Wconversion) +ENDIF() + INCLUDE_DIRECTORIES( ${LIBXML2_INCLUDE_DIR} ${MEDFILE_INCLUDE_DIRS} @@ -33,37 +37,42 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/GaussPoints ) -IF(MEDTOOL_MED_PARTITIONER_METIS) +IF(MEDCOUPLING_PARTITIONER_METIS) ADD_DEFINITIONS(${METIS_DEFINITIONS}) - IF(MEDTOOL_METIS_V5) + IF(MEDCOUPLING_METIS_V5) ADD_DEFINITIONS("-DMED_ENABLE_METIS_V5") - ENDIF(MEDTOOL_METIS_V5) + ENDIF(MEDCOUPLING_METIS_V5) INCLUDE_DIRECTORIES(${METIS_INCLUDE_DIRS}) -ENDIF(MEDTOOL_MED_PARTITIONER_METIS) +ENDIF(MEDCOUPLING_PARTITIONER_METIS) ######## # VERY IMPORTANT PUT METIS BEFORE SCOTCH because # metis.h is also in SCOTCH install dir !!! ######## -IF(MEDTOOL_MED_PARTITIONER_SCOTCH) +IF(MEDCOUPLING_PARTITIONER_PTSCOTCH) + ADD_DEFINITIONS(${PTSCOTCH_DEFINITIONS}) + INCLUDE_DIRECTORIES(${PTSCOTCH_INCLUDE_DIRS}) +ENDIF(MEDCOUPLING_PARTITIONER_PTSCOTCH) + +IF(MEDCOUPLING_PARTITIONER_SCOTCH) ADD_DEFINITIONS(${SCOTCH_DEFINITIONS}) INCLUDE_DIRECTORIES(${SCOTCH_INCLUDE_DIRS}) -ENDIF(MEDTOOL_MED_PARTITIONER_SCOTCH) +ENDIF(MEDCOUPLING_PARTITIONER_SCOTCH) -IF(MEDTOOL_MED_PARTITIONER_PARMETIS) +IF(MEDCOUPLING_PARTITIONER_PARMETIS) ADD_DEFINITIONS(${PARMETIS_DEFINITIONS}) INCLUDE_DIRECTORIES(${PARMETIS_INCLUDE_DIRS}) -ENDIF(MEDTOOL_MED_PARTITIONER_PARMETIS) +ENDIF(MEDCOUPLING_PARTITIONER_PARMETIS) -IF(MEDTOOL_USE_MPI) +IF(MEDCOUPLING_USE_MPI) ADD_DEFINITIONS(${MPI_DEFINITIONS}) INCLUDE_DIRECTORIES(${MPI_INCLUDE_DIRS}) -ENDIF(MEDTOOL_USE_MPI) +ENDIF(MEDCOUPLING_USE_MPI) -IF(MEDTOOL_BUILD_TESTS) +IF(MEDCOUPLING_BUILD_TESTS) ADD_SUBDIRECTORY(Test) -ENDIF(MEDTOOL_BUILD_TESTS) +ENDIF(MEDCOUPLING_BUILD_TESTS) SET(medpartitionercpp_HEADERS_HXX MEDPARTITIONER_MeshCollection.hxx @@ -103,45 +112,52 @@ SET(medpartitionercpp_LDFLAGS ${STDLIB} ${LIBXML2_LIBRARIES} interpkernel - medcoupling + medcouplingcpp medloader + -lpthread ) -IF(MEDTOOL_MED_PARTITIONER_PARMETIS) +IF(MEDCOUPLING_PARTITIONER_PARMETIS) SET(medpartitionercpp_HEADERS_HXX ${medpartitionercpp_HEADERS_HXX} MEDPARTITIONER_ParMetisGraph.hxx) SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} MEDPARTITIONER_ParMetisGraph.cxx MEDPARTITIONER_MetisGraph.cxx) SET(medpartitionercpp_DEFINITIONS "${medpartitionercpp_DEFINITIONS} ${PARMETIS_DEFINITIONS}") SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${PARMETIS_LIBRARIES}) -ENDIF(MEDTOOL_MED_PARTITIONER_PARMETIS) -IF(MEDTOOL_MED_PARTITIONER_METIS) +ENDIF(MEDCOUPLING_PARTITIONER_PARMETIS) +IF(MEDCOUPLING_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_LIBRARIES}) -ENDIF(MEDTOOL_MED_PARTITIONER_METIS) -IF(MEDTOOL_MED_PARTITIONER_SCOTCH) +ENDIF(MEDCOUPLING_PARTITIONER_METIS) +IF(MEDCOUPLING_PARTITIONER_SCOTCH) SET(medpartitionercpp_HEADERS_HXX ${medpartitionercpp_HEADERS_HXX} MEDPARTITIONER_ScotchGraph.hxx) SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} MEDPARTITIONER_ScotchGraph.cxx) SET(medpartitionercpp_DEFINITIONS "${medpartitionercpp_DEFINITIONS} ${SCOTCH_DEFINITIONS}") SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${SCOTCH_LIBRARIES}) -ENDIF(MEDTOOL_MED_PARTITIONER_SCOTCH) - -IF(${MEDTOOL_USE_MPI}) +ENDIF(MEDCOUPLING_PARTITIONER_SCOTCH) +IF(MEDCOUPLING_PARTITIONER_PTSCOTCH) + SET(medpartitionercpp_HEADERS_HXX ${medpartitionercpp_HEADERS_HXX} MEDPARTITIONER_PTScotchGraph.hxx) + SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} MEDPARTITIONER_PTScotchGraph.cxx) + SET(medpartitionercpp_DEFINITIONS "${medpartitionercpp_DEFINITIONS} ${PTSCOTCH_DEFINITIONS}") + SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${PTSCOTCH_LIBRARIES}) +ENDIF(MEDCOUPLING_PARTITIONER_PTSCOTCH) + +IF(${MEDCOUPLING_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 ${MEDTOOL_INSTALL_BINS}) -ENDIF(${MEDTOOL_USE_MPI}) + INSTALL(TARGETS medpartitioner_para DESTINATION ${MEDCOUPLING_INSTALL_BINS}) +ENDIF(${MEDCOUPLING_USE_MPI}) ADD_DEFINITIONS(${medpartitionercpp_DEFINITIONS}) -ADD_LIBRARY(medpartitionercpp SHARED ${medpartitionercpp_SOURCES}) +ADD_LIBRARY(medpartitionercpp ${medpartitionercpp_SOURCES}) TARGET_LINK_LIBRARIES(medpartitionercpp ${medpartitionercpp_LDFLAGS} ${PLATFORM_LIBS} ${PTHREAD_LIBS}) -INSTALL(TARGETS medpartitionercpp DESTINATION ${MEDTOOL_INSTALL_LIBS}) +INSTALL(TARGETS medpartitionercpp DESTINATION ${MEDCOUPLING_INSTALL_LIBS}) ADD_EXECUTABLE(medpartitioner medpartitioner.cxx) TARGET_LINK_LIBRARIES(medpartitioner medpartitionercpp ${medpartitionercpp_LDFLAGS}) -INSTALL(TARGETS medpartitioner DESTINATION ${MEDTOOL_INSTALL_BINS}) +INSTALL(TARGETS medpartitioner DESTINATION ${MEDCOUPLING_INSTALL_BINS}) -INSTALL(FILES ${medpartitionercpp_HEADERS_HXX} DESTINATION ${MEDTOOL_INSTALL_HEADERS}) +INSTALL(FILES ${medpartitionercpp_HEADERS_HXX} DESTINATION ${MEDCOUPLING_INSTALL_HEADERS})