From: abn Date: Tue, 5 Jul 2016 08:26:49 +0000 (+0200) Subject: Moving *all* CMake detection files to common CONFIGURATION repo. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d7aeabf262af1432b2fdadc405268eef165f7c77;p=tools%2Fmedcoupling.git Moving *all* CMake detection files to common CONFIGURATION repo. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index e33ae17e5..16d7c6fe6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,8 +43,6 @@ IF(EXISTS ${CONFIGURATION_ROOT_DIR}) ELSE() MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !") ENDIF() -# Our macros -LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_files") # Platform setup # ============== @@ -221,7 +219,6 @@ IF(WIN32) ENDIF(WIN32) ADD_SUBDIRECTORY(src) -ADD_SUBDIRECTORY(cmake_files) IF(MEDCOUPLING_BUILD_DOC) ADD_SUBDIRECTORY(doc) diff --git a/cmake_files/CMakeLists.txt b/cmake_files/CMakeLists.txt deleted file mode 100644 index acb39466e..000000000 --- a/cmake_files/CMakeLists.txt +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (C) 2015-2016 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 -# 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 -# - -SET(admlocal_cmake_DATA - FindMetis.cmake - FindParMetis.cmake - FindSalomeMEDCoupling.cmake - FindSalomeMetis.cmake - FindSalomeParMetis.cmake - FindSalomeScotch.cmake - FindSalomeXDR.cmake - FindScotch.cmake - FindXDR.cmake -) - -INSTALL(FILES ${admlocal_cmake_DATA} DESTINATION ${MEDCOUPLING_INSTALL_CMAKE_LOCAL}) diff --git a/cmake_files/FindMetis.cmake b/cmake_files/FindMetis.cmake deleted file mode 100644 index 25963059e..000000000 --- a/cmake_files/FindMetis.cmake +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright (C) 2007-2016 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(MEDCOUPLING_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/cmake_files/FindParMetis.cmake b/cmake_files/FindParMetis.cmake deleted file mode 100644 index 103ab1c58..000000000 --- a/cmake_files/FindParMetis.cmake +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (C) 2007-2016 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/cmake_files/FindSalomeMEDCoupling.cmake b/cmake_files/FindSalomeMEDCoupling.cmake deleted file mode 100644 index 1fd2fce78..000000000 --- a/cmake_files/FindSalomeMEDCoupling.cmake +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (C) 2007-2016 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 -# - -# MED detection for Salome - this is typically called by dependent modules -# (PARAVIS, etc ...) -# -# The detection is simpler than for other prerequisites. -# See explanation in FindSalomeKERNEL.cmake. -# - -IF(NOT SalomeMEDCoupling_FIND_QUIETLY) - MESSAGE(STATUS "Looking for MEDCoupling tool ...") -ENDIF() - -SET(CMAKE_PREFIX_PATH "${MEDCOUPLING_ROOT_DIR}/cmake_files") -SALOME_FIND_PACKAGE(SalomeMEDCoupling MEDCoupling CONFIG) - -IF(NOT SalomeMEDCoupling_FIND_QUIETLY) - MESSAGE(STATUS "Found MEDCoupling: ${MEDCOUPLING_ROOT_DIR}") -ENDIF() - -#FOREACH(_res ${SalomeMED_EXTRA_ENV}) -# SALOME_ACCUMULATE_ENVIRONMENT(${_res} "${SalomeMED_EXTRA_ENV_${_res}}") -#ENDFOREACH() diff --git a/cmake_files/FindSalomeMetis.cmake b/cmake_files/FindSalomeMetis.cmake deleted file mode 100644 index 47f47a5e7..000000000 --- a/cmake_files/FindSalomeMetis.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2013-2016 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/cmake_files/FindSalomeParMetis.cmake b/cmake_files/FindSalomeParMetis.cmake deleted file mode 100644 index eb10285fa..000000000 --- a/cmake_files/FindSalomeParMetis.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2013-2016 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 0) -#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/cmake_files/FindSalomeScotch.cmake b/cmake_files/FindSalomeScotch.cmake deleted file mode 100644 index 487d53d5d..000000000 --- a/cmake_files/FindSalomeScotch.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2013-2016 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/cmake_files/FindSalomeXDR.cmake b/cmake_files/FindSalomeXDR.cmake deleted file mode 100644 index 00a3b9bdf..000000000 --- a/cmake_files/FindSalomeXDR.cmake +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2013-2016 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/cmake_files/FindScotch.cmake b/cmake_files/FindScotch.cmake deleted file mode 100644 index 60612ef84..000000000 --- a/cmake_files/FindScotch.cmake +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2007-2016 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/cmake_files/FindXDR.cmake b/cmake_files/FindXDR.cmake deleted file mode 100644 index e8e862531..000000000 --- a/cmake_files/FindXDR.cmake +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright (C) 2007-2016 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) -IF(XDR_INCLUDE_DIRS) - SET(XDR_DEFINITIONS "-DHAS_XDR") -ENDIF() - -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)