From: abn Date: Fri, 11 Dec 2015 12:46:39 +0000 (+0100) Subject: Adapting to latest CMake modifications in X-Git-Tag: V8_0_0a1~5^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8a31aa5db11c99318a8f983381778f9f70003ac8;p=modules%2Fmed.git Adapting to latest CMake modifications in MEDCoupling + removed CAS direct dependency. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index bf368271a..d132ed960 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,22 +72,19 @@ OPTION(SALOME_BUILD_GUI "Build GUI of MED." ON) OPTION(SALOME_BUILD_TESTS "Build MED tests." ON) OPTION(SALOME_BUILD_DOC "Build MED doc." ON) +# Find MEDCoupling (required) +# ========================== +SET(MEDCOUPLING_ROOT_DIR $ENV{MEDCOUPLING_ROOT_DIR} CACHE PATH "Path to the MEDCoupling tool") +IF(EXISTS ${MEDCOUPLING_ROOT_DIR}) + LIST(APPEND CMAKE_MODULE_PATH "${MEDCOUPLING_ROOT_DIR}/cmake_files") + FIND_PACKAGE(SalomeMEDCoupling REQUIRED) +ELSE(EXISTS ${MEDCOUPLING_ROOT_DIR}) + MESSAGE(FATAL_ERROR "We absolutely need the MEDCoupling tool, please define MEDCOUPLING_ROOT_DIR !") +ENDIF(EXISTS ${MEDCOUPLING_ROOT_DIR}) + # # Set list of prerequisites # ========================= - -SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL") -IF(EXISTS ${KERNEL_ROOT_DIR}) - LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files") - INCLUDE(SalomeMacros) - FIND_PACKAGE(SalomeKERNEL REQUIRED) - KERNEL_WITH_CORBA() #check whether KERNEL builded with CORBA -ELSE(EXISTS ${KERNEL_ROOT_DIR}) - MESSAGE(FATAL_ERROR "We absolutely need a Salome KERNEL, please define KERNEL_ROOT_DIR !") -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(SalomeHDF5 REQUIRED) FIND_PACKAGE(SalomeMEDFile REQUIRED) # XDR stuff @@ -111,14 +108,10 @@ IF(SALOME_BUILD_GUI) MESSAGE(FATAL_ERROR "We absolutely need a Salome GUI, please define GUI_ROOT_DIR or turn option SALOME_BUILD_GUI to OFF !") ENDIF(EXISTS ${GUI_ROOT_DIR}) FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui) - FIND_PACKAGE(SalomeCAS REQUIRED) # maybe one day it will disappear ... ENDIF(SALOME_BUILD_GUI) -LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files") - -ENABLE_TESTING() # let it outsite because even if SALOME_BUILD_TESTS is OFF, python tests that not need additional compilation can be run. - IF(SALOME_BUILD_TESTS) + ENABLE_TESTING() FIND_PACKAGE(SalomeCppUnit) SALOME_LOG_OPTIONAL_PACKAGE(CppUnit SALOME_BUILD_TESTS) ENDIF(SALOME_BUILD_TESTS) @@ -153,8 +146,6 @@ IF(SALOME_BUILD_DOC) SALOME_LOG_OPTIONAL_PACKAGE(Sphinx SALOME_BUILD_DOC) ENDIF(SALOME_BUILD_DOC) -FIND_PACKAGE(MEDCoupling) - # Detection report SALOME_PACKAGE_REPORT_AND_CHECK() @@ -241,8 +232,8 @@ IF(SALOME_USE_MPI) LIST(APPEND _${PROJECT_NAME}_exposed_targets paramedcouplingcorba paramedmemcompo) ENDIF() -LIST(APPEND _${PROJECT_NAME}_exposed_targets medcouplingcorba medcouplingclient) -LIST(APPEND _${PROJECT_NAME}_exposed_targets medcalculator MEDFactoryEngine) +LIST(APPEND _${PROJECT_NAME}_exposed_targets + medcouplingcorba medcouplingclient medcalculator MEDFactoryEngine) IF(SALOME_MED_ENABLE_PYTHON) LIST(APPEND _${PROJECT_NAME}_exposed_targets medcalculatorspython) ENDIF() @@ -263,11 +254,11 @@ EXPORT(TARGETS ${_${PROJECT_NAME}_exposed_targets} SET(KERNEL_ROOT_DIR "${KERNEL_ROOT_DIR}") SET(GUI_ROOT_DIR "${GUI_ROOT_DIR}") SET(MEDFILE_ROOT_DIR "${MEDFILE_ROOT_DIR}") +SET(MEDCOUPLING_ROOT_DIR "${MEDCOUPLING_ROOT_DIR}") SET(MPI_ROOT_DIR "${MPI_ROOT_DIR}") SET(HDF5_ROOT_DIR "${HDF5_ROOT_DIR}") SET(OMNIORB_ROOT_DIR "${OMNIORB_ROOT_DIR}") SET(PTHREAD_ROOT_DIR "${PTHREAD_ROOT_DIR}") -SET(BOOST_ROOT_DIR "${BOOST_ROOT_DIR}") SET(SWIG_ROOT_DIR "${SWIG_ROOT_DIR}") SET(PYTHON_ROOT_DIR "${PYTHON_ROOT_DIR}") SET(CPPUNIT_ROOT_DIR "${CPPUNIT_ROOT_DIR}") @@ -275,28 +266,23 @@ SET(GRAPHVIZ_ROOT_DIR "${GRAPHVIZ_ROOT_DIR}") SET(DOXYGEN_ROOT_DIR "${DOXYGEN_ROOT_DIR}") SET(SPHINX_ROOT_DIR "${SPHINX_ROOT_DIR}") -SET(METIS_ROOT_DIR "${METIS_ROOT_DIR}") -SET(PARMETIS_ROOT_DIR "${PARMETIS_ROOT_DIR}") -SET(SCOTCH_ROOT_DIR "${SCOTCH_ROOT_DIR}") -SET(XDR_ROOT_DIR "${XDR_ROOT_DIR}") - # - in the install tree: # Get the relative path of the include directory so # we can register it in the generated configuration files: SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}") # Build variables that will be expanded when configuring SalomeConfig.cmake: -SALOME_CONFIGURE_PREPARE(Metis ParMetis Scotch XDR CAS Qt4 CppUnit Graphviz Doxygen Sphinx MPI omniORB - PThread Boost libXml2 Python HDF5 MEDFile) +SALOME_CONFIGURE_PREPARE(MEDCoupling XDR Qt4 CppUnit Graphviz Doxygen Sphinx MPI omniORB + PThread Python HDF5 MEDFile) CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}_LOCAL" PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE_LOCAL CMAKE_INSTALL_PREFIX - KERNEL_ROOT_DIR GUI_ROOT_DIR MEDFILE_ROOT_DIR MPI_ROOT_DIR - HDF5_ROOT_DIR OMNIORB_ROOT_DIR PTHREAD_ROOT_DIR BOOST_ROOT_DIR + KERNEL_ROOT_DIR GUI_ROOT_DIR MEDFILE_ROOT_DIR MEDCOUPLING_ROOT_DIR MPI_ROOT_DIR + HDF5_ROOT_DIR OMNIORB_ROOT_DIR PTHREAD_ROOT_DIR SWIG_ROOT_DIR PYTHON_ROOT_DIR CPPUNIT_ROOT_DIR GRAPHVIZ_ROOT_DIR DOXYGEN_ROOT_DIR - SPHINX_ROOT_DIR METIS_ROOT_DIR PARMETIS_ROOT_DIR SCOTCH_ROOT_DIR XDR_ROOT_DIR) + SPHINX_ROOT_DIR) WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake VERSION ${${PROJECT_NAME_UC}_VERSION} diff --git a/SalomeMEDConfig.cmake.in b/SalomeMEDConfig.cmake.in index c01ceb080..34196b8f4 100644 --- a/SalomeMEDConfig.cmake.in +++ b/SalomeMEDConfig.cmake.in @@ -126,19 +126,8 @@ ELSE(SALOME_MED_BUILD_GUI) ENDIF(SALOME_MED_BUILD_GUI) # Exposed MED targets: -# SET(MED_interpkernel interpkernel) -# SET(MED_medcoupling medcoupling) -# SET(MED_medcouplingremapper medcouplingremapper) -# SET(MED_medloader medloader) -# SET(MED_renumbercpp renumbercpp) -# SET(MED_medpartitionercpp medpartitionercpp) -# SET(MED_MEDPARTITIONERTest MEDPARTITIONERTest) -# SET(MED_InterpKernelTest InterpKernelTest) -# SET(MED_paramedmem paramedmem) -# SET(MED_paramedloader paramedloader) SET(MED_paramedcouplingcorba paramedcouplingcorba) SET(MED_paramedmemcompo paramedmemcompo) -# SET(MED_ParaMEDMEMTest ParaMEDMEMTest) SET(MED_SalomeIDLMED SalomeIDLMED) SET(MED_SalomeIDLMEDTests SalomeIDLMEDTests) SET(MED_medcouplingcorba medcouplingcorba) diff --git a/adm_local/cmake_files/CMakeLists.txt b/adm_local/cmake_files/CMakeLists.txt index e2c098e9f..ff134c42c 100644 --- a/adm_local/cmake_files/CMakeLists.txt +++ b/adm_local/cmake_files/CMakeLists.txt @@ -18,16 +18,7 @@ # SET(admlocal_cmake_DATA - FindXDR.cmake - FindSalomeXDR.cmake - FindMetis.cmake - FindSalomeMetis.cmake - FindParMetis.cmake - FindSalomeParMetis.cmake - FindScotch.cmake - FindSalomeScotch.cmake FindSalomeMED.cmake - FindMEDCoupling.cmake - ) + ) INSTALL(FILES ${admlocal_cmake_DATA} DESTINATION ${SALOME_INSTALL_CMAKE_LOCAL}) diff --git a/adm_local/cmake_files/FindMEDCoupling.cmake b/adm_local/cmake_files/FindMEDCoupling.cmake deleted file mode 100644 index 633a142ab..000000000 --- a/adm_local/cmake_files/FindMEDCoupling.cmake +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright (C) 2015 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - - -# Find MEDCoupling installation -# -# The following variable are set: -# MEDCOUPLING_INCLUDE_DIRS -# INTERPKERNEL_LIBRARY -# MEDCOUPLING_LIBRARY -# MEDLOADER_LIBRARY -# PARAMEDMEM_LIBRARY -# PARAMEDLOADER_LIBRARY -# MEDCOUPLING_LIBRARIES -# MEDCOUPLING_PYTHON_DIRS -# -# The CMake (or environment) variable MEDCOUPLING_ROOT_DIR can be set to -# guide the detection and indicate a root directory to look into. -# - -MESSAGE(STATUS "Check for MEDCoupling ...") - -SET(MEDCOUPLING_ROOT_DIR $ENV{MEDCOUPLING_ROOT_DIR} CACHE PATH "Path to the MEDCoupling.") -IF(MEDCOUPLING_ROOT_DIR) - LIST(APPEND CMAKE_PREFIX_PATH "${MEDCOUPLING_ROOT_DIR}") -ENDIF(MEDCOUPLING_ROOT_DIR) - -FIND_PATH(MEDCOUPLING_INCLUDE_DIRS MEDCoupling.hxx) # mandatory - -FIND_LIBRARY(INTERPKERNEL_LIBRARY NAMES interpkernel) # mandatory -FIND_LIBRARY(MEDCOUPLING_REMAPPER_LIBRARY NAMES medcouplingremapper) # mandatory -FIND_LIBRARY(MEDCOUPLING_LIBRARY NAMES medcoupling) # mandatory -FIND_LIBRARY(MEDLOADER_LIBRARY NAMES medloader) # optional -FIND_LIBRARY(PARAMEDMEM_LIBRARY NAMES paramedmem) # optional -FIND_LIBRARY(PARAMEDLOADER_LIBRARY NAMES paramedloader) # optional -FIND_LIBRARY(MEDPARTITIONERCPP_LIBRARY NAMES medpartitionercpp) # optional -FIND_LIBRARY(RENUMBERCPP_LIBRARY NAMES renumbercpp) # optional - -FIND_PACKAGE(PythonInterp QUIET) -FIND_PATH(MEDCOUPLING_PYTHON_DIRS NAMES MEDCoupling.py MEDLoader.py PATH_SUFFIXES lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) # optional - -SET(MEDCOUPLING_LIBRARIES - ${INTERPKERNEL_LIBRARY} - ${MEDCOUPLING_REMAPPER_LIBRARY} - ${MEDCOUPLING_LIBRARY} - ${MEDLOADER_LIBRARY} - ${MEDPARTITIONERCPP_LIBRARY} - ${RENUMBERCPP_LIBRARY} - ) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(MEDCoupling REQUIRED_VARS MEDCOUPLING_INCLUDE_DIRS MEDCOUPLING_LIBRARIES) diff --git a/adm_local/cmake_files/FindMetis.cmake b/adm_local/cmake_files/FindMetis.cmake deleted file mode 100644 index b731cb8c8..000000000 --- a/adm_local/cmake_files/FindMetis.cmake +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# ------ - -MESSAGE(STATUS "Check for metis ...") - -SET(METIS_ROOT_DIR $ENV{METIS_ROOT_DIR} CACHE PATH "Path to the METIS.") -IF(METIS_ROOT_DIR) - LIST(APPEND CMAKE_LIBRARY_PATH "${METIS_ROOT_DIR}") - LIST(APPEND CMAKE_LIBRARY_PATH "${METIS_ROOT_DIR}/lib") - LIST(APPEND CMAKE_INCLUDE_PATH "${METIS_ROOT_DIR}/Lib") - LIST(APPEND CMAKE_INCLUDE_PATH "${METIS_ROOT_DIR}/include") -ENDIF(METIS_ROOT_DIR) - -FIND_LIBRARY(METIS_LIBRARIES metis) -FIND_PATH(METIS_INCLUDE_DIRS metis.h) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Metis REQUIRED_VARS METIS_INCLUDE_DIRS METIS_LIBRARIES) -FILE(READ ${METIS_INCLUDE_DIRS}/metis.h metis_h_content) -STRING(REPLACE "\n" ";" list_metis_h_content ${metis_h_content}) -FOREACH(ln ${list_metis_h_content}) - IF("${ln}" MATCHES "^#define METIS_VER_MAJOR") - STRING(REPLACE "#define METIS_VER_MAJOR" "" metis_major_version "${ln}") - STRING(STRIP "${metis_major_version}" metis_major_version) - ENDIF("${ln}" MATCHES "^#define METIS_VER_MAJOR") -ENDFOREACH(ln ${list_metis_h_content}) -IF(metis_major_version STREQUAL 5) - SET(SALOME_MED_METIS_V5 1) - MESSAGE(STATUS "Metis maj version 5 detected.") -ELSE(metis_major_version STREQUAL 5) - MESSAGE(STATUS "Metis maj version 4 detected.") -ENDIF(metis_major_version STREQUAL 5) diff --git a/adm_local/cmake_files/FindParMetis.cmake b/adm_local/cmake_files/FindParMetis.cmake deleted file mode 100644 index ad15aa426..000000000 --- a/adm_local/cmake_files/FindParMetis.cmake +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# ------ - -MESSAGE(STATUS "Check for parmetis ...") - -SET(PARMETIS_ROOT_DIR $ENV{PARMETIS_ROOT_DIR} CACHE PATH "Path to the PARMETIS.") -IF(PARMETIS_ROOT_DIR) - LIST(APPEND CMAKE_LIBRARY_PATH "${PARMETIS_ROOT_DIR}") - LIST(APPEND CMAKE_INCLUDE_PATH "${PARMETIS_ROOT_DIR}/Lib") -ENDIF(PARMETIS_ROOT_DIR) - -FIND_LIBRARY(PARMETIS_LIBRARIES parmetis) -FIND_LIBRARY(PARMETIS_SEQ_LIBRARIES metis) -SET(PARMETIS_LIBRARIES ${PARMETIS_LIBRARIES} ${PARMETIS_SEQ_LIBRARIES}) -FIND_PATH(PARMETIS_INCLUDE_DIRS parmetis.h) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(ParMetis REQUIRED_VARS PARMETIS_INCLUDE_DIRS PARMETIS_LIBRARIES) diff --git a/adm_local/cmake_files/FindSalomeMetis.cmake b/adm_local/cmake_files/FindSalomeMetis.cmake deleted file mode 100644 index 588aba89b..000000000 --- a/adm_local/cmake_files/FindSalomeMetis.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2013-2015 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# Author: Adrien Bruneton -# - -# Medfile detection dor Salome -# -# !! Please read the generic detection procedure in SalomeMacros.cmake !! -# - -SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Metis METIS_INCLUDE_DIRS 1) -#MARK_AS_ADVANCED() - -IF(METIS_FOUND) - SALOME_ACCUMULATE_HEADERS(METIS_INCLUDE_DIRS) - SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${METIS_LIBRARIES}) -ENDIF() \ No newline at end of file diff --git a/adm_local/cmake_files/FindSalomeParMetis.cmake b/adm_local/cmake_files/FindSalomeParMetis.cmake deleted file mode 100644 index 60b6b7d98..000000000 --- a/adm_local/cmake_files/FindSalomeParMetis.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2013-2015 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# Author: Adrien Bruneton -# - -# Medfile detection dor Salome -# -# !! Please read the generic detection procedure in SalomeMacros.cmake !! -# - -SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(ParMetis PARMETIS_INCLUDE_DIRS 1) -#MARK_AS_ADVANCED() - -IF(PARMETIS_FOUND) - SALOME_ACCUMULATE_HEADERS(PARMETIS_INCLUDE_DIRS) - SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${PARMETIS_LIBRARIES}) -ENDIF() \ No newline at end of file diff --git a/adm_local/cmake_files/FindSalomeScotch.cmake b/adm_local/cmake_files/FindSalomeScotch.cmake deleted file mode 100644 index 541d7f457..000000000 --- a/adm_local/cmake_files/FindSalomeScotch.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2013-2015 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# Author: Adrien Bruneton -# - -# Medfile detection dor Salome -# -# !! Please read the generic detection procedure in SalomeMacros.cmake !! -# - -SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Scotch SCOTCH_INCLUDE_DIRS 1) -#MARK_AS_ADVANCED() - -IF(SCOTCH_FOUND) - SALOME_ACCUMULATE_HEADERS(SCOTCH_INCLUDE_DIRS) - SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${SCOTCH_LIBRARIES}) -ENDIF() diff --git a/adm_local/cmake_files/FindSalomeXDR.cmake b/adm_local/cmake_files/FindSalomeXDR.cmake deleted file mode 100644 index 7e76c2b83..000000000 --- a/adm_local/cmake_files/FindSalomeXDR.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2013-2015 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -# Author: Anthony Geay -# - -# XDR detection dor Salome -# -# !! Please read the generic detection procedure in SalomeMacros.cmake !! -# - -SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(XDR XDR_INCLUDE_DIRS 1) -#MARK_AS_ADVANCED() - -#IF(XDR_FOUND) # useless here because XDR is used only in CXX of MEDLoader -# SALOME_ACCUMULATE_HEADERS(XDR_INCLUDE_DIRS) -# SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${XDR_LIBRARIES}) -#ENDIF() \ No newline at end of file diff --git a/adm_local/cmake_files/FindScotch.cmake b/adm_local/cmake_files/FindScotch.cmake deleted file mode 100644 index b63d30dcb..000000000 --- a/adm_local/cmake_files/FindScotch.cmake +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# ------ - -MESSAGE(STATUS "Check for scotch ...") - -SET(SCOTCH_ROOT_DIR $ENV{SCOTCH_ROOT_DIR} CACHE PATH "Path to the SCOTCH.") -IF(SCOTCH_ROOT_DIR) - LIST(APPEND CMAKE_PREFIX_PATH "${SCOTCH_ROOT_DIR}") -ENDIF(SCOTCH_ROOT_DIR) - -FIND_LIBRARY(SCOTCH_LIBRARIES scotch) -FIND_LIBRARY(SCOTCH_ERR_LIBRARIES scotcherr) -SET(SCOTCH_LIBRARIES ${SCOTCH_LIBRARIES} ${SCOTCH_ERR_LIBRARIES}) -FIND_PATH(SCOTCH_INCLUDE_DIRS scotch.h PATH_SUFFIXES "/scotch") - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(Scotch REQUIRED_VARS SCOTCH_INCLUDE_DIRS SCOTCH_LIBRARIES) diff --git a/adm_local/cmake_files/FindXDR.cmake b/adm_local/cmake_files/FindXDR.cmake deleted file mode 100644 index c0eaf86e1..000000000 --- a/adm_local/cmake_files/FindXDR.cmake +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -MESSAGE(STATUS "Check for XDR ...") - -FIND_PATH(XDR_INCLUDE_DIRS rpc/xdr.h) -SET(XDR_DEFINITIONS "-DHAS_XDR") - -IF(WIN32) - FIND_LIBRARY(XDR_LIBRARIES xdr) # To get the .lib file from XDR - FIND_PATH(XDR_INCLUDE_DIRS2 stdint.h PATH_SUFFIXES src/msvc) # To get the stdint.h from XDR (needed by types.h) - IF(XDR_INCLUDE_DIRS) - IF(XDR_INCLUDE_DIRS2) - LIST(APPEND XDR_INCLUDE_DIRS "${XDR_INCLUDE_DIRS2}") - ELSE() - SET(XDR_INCLUDE_DIRS "${XDR_INCLUDE_DIRS2}") # Make the detection fail - ENDIF() - ENDIF() -ENDIF(WIN32) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(XDR REQUIRED_VARS XDR_INCLUDE_DIRS) diff --git a/src/MEDCalc/cmp/CMakeLists.txt b/src/MEDCalc/cmp/CMakeLists.txt index 108bf1751..445c4d6dd 100644 --- a/src/MEDCalc/cmp/CMakeLists.txt +++ b/src/MEDCalc/cmp/CMakeLists.txt @@ -55,11 +55,11 @@ SET(COMMON_LIBS ${KERNEL_TOOLSDS} ${KERNEL_SalomeHDFPersist} ${KERNEL_SalomeContainer} ${KERNEL_SalomeCommunication} ${KERNEL_SalomeKernelHelpers} ${KERNEL_SalomeLifeCycleCORBA} ${KERNEL_SALOMELocalTrace} ${KERNEL_SALOMEBasics} ${KERNEL_SalomeGenericObj} - ${MEDCOUPLING_LIBRARIES} ${MEDFILE_C_LIBRARIES} ${HDF5_LIBRARIES} ${OMNIORB_LIBRARIES} ${PYTHON_LIBRARIES} + ${MEDCoupling_medcoupling} ${MEDCoupling_medloader} ${MEDCoupling_medcouplingremapper} ) # This undefines the macros MIN and MAX which are specified in the windows headers diff --git a/src/MEDCalc/cmp/MED.cxx b/src/MEDCalc/cmp/MED.cxx index f59f8d308..1e68140a6 100644 --- a/src/MEDCalc/cmp/MED.cxx +++ b/src/MEDCalc/cmp/MED.cxx @@ -27,7 +27,6 @@ #include #include -#include #include @@ -227,7 +226,7 @@ MED::DumpPython(CORBA::Object_ptr theStudy, return new Engines::TMPFile(0); } - TCollection_AsciiString aScript; + std::string aScript; MEDCALC::CommandsList* history = MEDFactoryClient::getCommandsHistoryManager()->getCommandsHistory(); for (CORBA::ULong i = 0; i < history->length(); ++i) { @@ -235,9 +234,9 @@ MED::DumpPython(CORBA::Object_ptr theStudy, aScript += "\n"; } - int aLen = aScript.Length(); + int aLen = aScript.size(); unsigned char* aBuffer = new unsigned char[aLen+1]; - strcpy((char*)aBuffer, aScript.ToCString()); + strcpy((char*)aBuffer, aScript.c_str()); CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer; Engines::TMPFile_var aStreamFile = new Engines::TMPFile(aLen+1, aLen+1, anOctetBuf, 1); diff --git a/src/MEDCalc/gui/CMakeLists.txt b/src/MEDCalc/gui/CMakeLists.txt index 4b5cad36d..69e62ba23 100644 --- a/src/MEDCalc/gui/CMakeLists.txt +++ b/src/MEDCalc/gui/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -ADD_DEFINITIONS(${MEDFILE_DEFINITIONS} ${XDR_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS}) +ADD_DEFINITIONS(${MEDFILE_DEFINITIONS} ${XDR_DEFINITIONS} ${OMNIORB_DEFINITIONS}) INCLUDE(${QT_USE_FILE}) SET(QT_LIBS "${QT_LIBRARIES}") INCLUDE(UseQt4Ext) @@ -41,7 +41,6 @@ QT4_WRAP_CPP(MEDCALCGUI_HEADERS_MOC ${MEDCALCGUI_HEADERS}) INCLUDE_DIRECTORIES( ${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS} - ${CAS_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIR} ${GUI_INCLUDE_DIRS} @@ -65,11 +64,9 @@ SET(MEDCALCGUITS_SOURCES ) SET(COMMON_FLAGS - ${CAS_KERNEL} ${QT_MT_LIBRARIES} ${OMNIORB_LIBRARIES} ${PLATFORM_LIBRARIES} - ${BOOST_LIBRARIES} SalomeIDLMED MEDCALCGUI_dialogs MEDFactoryEngine @@ -78,6 +75,7 @@ SET(COMMON_FLAGS ${GUI_SalomeObject} ${KERNEL_SalomeLifeCycleCORBA} ${KERNEL_SalomeKernelHelpers} + ${KERNEL_SalomeDS} ${GUI_SalomeApp} ${GUI_SalomeGuiHelpers} ${GUI_SalomeTreeData} @@ -85,6 +83,9 @@ SET(COMMON_FLAGS ${GUI_CAM} ${GUI_LightApp} ${GUI_PyConsole} + ${MEDCoupling_medloader} + ${MEDCoupling_medcoupling} + ${MEDCoupling_medcouplingremapper} ) ADD_LIBRARY(MEDCALCGUI SHARED ${MEDCALCGUI_SOURCES} ${MEDCALCGUI_HEADERS_MOC}) diff --git a/src/MEDCalc/gui/dialogs/CMakeLists.txt b/src/MEDCalc/gui/dialogs/CMakeLists.txt index f3aa8cbfc..3a49dfd8b 100644 --- a/src/MEDCalc/gui/dialogs/CMakeLists.txt +++ b/src/MEDCalc/gui/dialogs/CMakeLists.txt @@ -17,7 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -ADD_DEFINITIONS(${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${OMNIORB_DEFINITIONS}) +ADD_DEFINITIONS(${OMNIORB_DEFINITIONS}) INCLUDE(UseQt4Ext) @@ -43,8 +43,6 @@ QT4_WRAP_CPP(MEDCALCGUI_dialogs_HEADERS_MOC ${MEDCALCGUI_dialogs_FILES}) INCLUDE_DIRECTORIES( ${OMNIORB_INCLUDE_DIR} ${OMNIORB_INCLUDE_DIRS} - ${CAS_INCLUDE_DIRS} - ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${GUI_INCLUDE_DIRS} @@ -62,7 +60,7 @@ SET(MEDCALCGUI_dialogs_SOURCES ) ADD_LIBRARY(MEDCALCGUI_dialogs SHARED ${MEDCALCGUI_dialogs_SOURCES} ${MEDCALCGUI_dialogs_HEADERS_MOC} ${MEDCALCGUI_dialogs_FORMS_HEADERS}) -TARGET_LINK_LIBRARIES(MEDCALCGUI_dialogs ${CAS_KERNEL} ${QT_LIBRARIES} ${KERNEL_SalomeIDLKernel} +TARGET_LINK_LIBRARIES(MEDCALCGUI_dialogs ${QT_LIBRARIES} ${KERNEL_SalomeIDLKernel} ${GUI_SalomeGuiHelpers} ${OMNIORB_LIBRARIES} ${GUI_qtx} ${GUI_suit} ${PLATFORM_LIBRARIES} ${KERNEL_SalomeLifeCycleCORBA} ${KERNEL_SalomeKernelHelpers} ${GUI_SalomeGuiHelpers}) INSTALL(TARGETS MEDCALCGUI_dialogs DESTINATION ${SALOME_INSTALL_LIBS}) diff --git a/src/MEDCalculator/CMakeLists.txt b/src/MEDCalculator/CMakeLists.txt index 7bcbefa3a..2cdb9b105 100644 --- a/src/MEDCalculator/CMakeLists.txt +++ b/src/MEDCalculator/CMakeLists.txt @@ -48,7 +48,7 @@ SET(medcalculator_SOURCES ) ADD_LIBRARY(medcalculator SHARED ${medcalculator_SOURCES}) -TARGET_LINK_LIBRARIES(medcalculator ${MEDLOADER_LIBRARY} medcouplingcorba ${KERNEL_LDFLAGS} +TARGET_LINK_LIBRARIES(medcalculator ${MEDCoupling_medloader} medcouplingcorba ${KERNEL_LDFLAGS} ${KERNEL_SALOMELocalTrace} ${KERNEL_SalomeNS} ${KERNEL_OpUtil} ${OMNIORB_LIBRARIES} ${PLATFORM_LIBRARIES}) INSTALL(TARGETS medcalculator DESTINATION ${SALOME_INSTALL_LIBS}) diff --git a/src/MEDCalculator/Swig/CMakeLists.txt b/src/MEDCalculator/Swig/CMakeLists.txt index 4fb862f20..09ecc549a 100644 --- a/src/MEDCalculator/Swig/CMakeLists.txt +++ b/src/MEDCalculator/Swig/CMakeLists.txt @@ -38,7 +38,7 @@ SET(medcalculatorspython_SOURCES ) ADD_LIBRARY(medcalculatorspython SHARED ${medcalculatorspython_SOURCES}) -TARGET_LINK_LIBRARIES(medcalculatorspython ${INTERPKERNEL_LIBRARY} ${PYTHON_LIBRARIES}) +TARGET_LINK_LIBRARIES(medcalculatorspython ${MEDCoupling_interpkernel} ${PYTHON_LIBRARIES}) INSTALL(TARGETS medcalculatorspython DESTINATION ${SALOME_INSTALL_LIBS}) SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES CPLUSPLUS ON) diff --git a/src/MEDCouplingCorba/CMakeLists.txt b/src/MEDCouplingCorba/CMakeLists.txt index b32c40f61..4e2bbf62f 100644 --- a/src/MEDCouplingCorba/CMakeLists.txt +++ b/src/MEDCouplingCorba/CMakeLists.txt @@ -56,7 +56,7 @@ SET(medcouplingcorba_SOURCES ) ADD_LIBRARY(medcouplingcorba SHARED ${medcouplingcorba_SOURCES}) -TARGET_LINK_LIBRARIES(medcouplingcorba ${MEDCOUPLING_LIBRARY} SalomeIDLMED ${PLATFORM_LIBS}) +TARGET_LINK_LIBRARIES(medcouplingcorba ${MEDCoupling_medcoupling} SalomeIDLMED ${PLATFORM_LIBS}) INSTALL(TARGETS medcouplingcorba EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB medcouplingcorba_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") diff --git a/src/MEDCouplingCorba/Client/CMakeLists.txt b/src/MEDCouplingCorba/Client/CMakeLists.txt index 6834ab4b0..4a14c4e4e 100644 --- a/src/MEDCouplingCorba/Client/CMakeLists.txt +++ b/src/MEDCouplingCorba/Client/CMakeLists.txt @@ -42,7 +42,7 @@ SET(medcouplingclient_SOURCES ) ADD_LIBRARY(medcouplingclient SHARED ${medcouplingclient_SOURCES}) -TARGET_LINK_LIBRARIES(medcouplingclient ${MEDCOUPLING_LIBRARY} SalomeIDLMED ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS}) +TARGET_LINK_LIBRARIES(medcouplingclient ${MEDCoupling_medcoupling} SalomeIDLMED ${OMNIORB_LIBRARIES} ${PLATFORM_LIBS}) INSTALL(TARGETS medcouplingclient EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) FILE(GLOB medcouplingclient_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")