]> SALOME platform Git repositories - plugins/netgenplugin.git/commitdiff
Salome HOME
Merge branch 'master' of salome:plugins/netgenplugin V8_1_0b1
authorrnv <rnv@opencascade.com>
Thu, 11 Aug 2016 08:27:33 +0000 (11:27 +0300)
committerrnv <rnv@opencascade.com>
Thu, 11 Aug 2016 08:27:33 +0000 (11:27 +0300)
CMakeLists.txt
adm_local/CMakeLists.txt
adm_local/cmake_files/CMakeLists.txt [deleted file]
adm_local/cmake_files/FindNetgen.cmake [deleted file]
adm_local/cmake_files/FindSalomeNETGENPLUGIN.cmake [deleted file]
adm_local/cmake_files/FindSalomeNetgen.cmake [deleted file]

index 0c4b29a311dffc04fb0b0b51651db48475615926..d2310efbb66e9058d23e823c6eeae3f106acd4f5 100755 (executable)
@@ -37,6 +37,16 @@ SET(${PROJECT_NAME_UC}_VERSION
   ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
 SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
 
+# Common CMake macros
+# ===================
+SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
+IF(EXISTS ${CONFIGURATION_ROOT_DIR})
+  LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake")
+  INCLUDE(SalomeMacros)
+ELSE()
+  MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
+ENDIF()
+
 # Find KERNEL
 # ===========
 SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
@@ -54,8 +64,6 @@ ENDIF(EXISTS ${KERNEL_ROOT_DIR})
 INCLUDE(SalomeSetupPlatform)   # From KERNEL
 # Always build libraries as shared objects:
 SET(BUILD_SHARED_LIBS TRUE)
-# Local macros:
-LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files")
 
 # User options
 # ============
index 4150922eff60f87f8c1e4cdb91e093a7176003c1..04e7832026e6c57e6c279e1c291980d6c8918439 100755 (executable)
@@ -21,4 +21,3 @@
 #
 
 ADD_SUBDIRECTORY(unix)
-ADD_SUBDIRECTORY(cmake_files)
diff --git a/adm_local/cmake_files/CMakeLists.txt b/adm_local/cmake_files/CMakeLists.txt
deleted file mode 100755 (executable)
index a5bea03..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-# Copyright (C) 2012-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
-#
-
-# ===============================================================
-# Files to be installed
-# ===============================================================
-
-# These files are data, module or lib files
-SET(_adm_data
-  FindSalomeNETGENPLUGIN.cmake
-  FindNetgen.cmake
-  FindSalomeNetgen.cmake
-)
-INSTALL(FILES ${_adm_data} DESTINATION ${SALOME_INSTALL_CMAKE_LOCAL})
diff --git a/adm_local/cmake_files/FindNetgen.cmake b/adm_local/cmake_files/FindNetgen.cmake
deleted file mode 100644 (file)
index 51db700..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-# - Find NETGEN
-# Sets the following variables:
-#   NETGEN_INCLUDE_DIRS - path to the NETGEN include directories
-#   NETGEN_LIBRARIES    - path to the NETGEN libraries to be linked against
-#
-
-#########################################################################
-# Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
-#
-# Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-#
-# 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
-#
-
-# ------
-
-IF(NOT Netgen_FIND_QUIETLY)
-  MESSAGE(STATUS "Check for Netgen ...")
-ENDIF()
-
-# ------
-
-SET(NETGEN_ROOT_DIR $ENV{NETGEN_ROOT_DIR})
-
-IF(NETGEN_ROOT_DIR)
- LIST(APPEND CMAKE_PREFIX_PATH "${NETGEN_ROOT_DIR}")
-ENDIF(NETGEN_ROOT_DIR)
-
-FIND_PATH(_netgen_base_inc_dir nglib.h)
-SET(NETGEN_INCLUDE_DIRS ${_netgen_base_inc_dir})
-FIND_PATH(_netgen_add_inc_dir occgeom.hpp HINTS ${_netgen_base_inc_dir} PATH_SUFFIXES share/netgen/include)
-LIST(APPEND NETGEN_INCLUDE_DIRS ${_netgen_add_inc_dir})
-LIST(REMOVE_DUPLICATES NETGEN_INCLUDE_DIRS)
-
-FIND_LIBRARY(NETGEN_nglib NAMES nglib)
-IF(WIN32)
-  FIND_LIBRARY(NETGEN_csg NAMES csg)
-  FIND_LIBRARY(NETGEN_gen NAMES gen)
-  FIND_LIBRARY(NETGEN_geom2d NAMES geom2d)
-  FIND_LIBRARY(NETGEN_gprim NAMES gprim)
-  FIND_LIBRARY(NETGEN_interface NAMES interface)
-  FIND_LIBRARY(NETGEN_la NAMES la)
-  FIND_LIBRARY(NETGEN_mesh NAMES mesh)
-  FIND_LIBRARY(NETGEN_occ NAMES occ)
-  FIND_LIBRARY(NETGEN_stl NAMES stl)
-ENDIF(WIN32)
-
-SET(NETGEN_LIBRARIES ${NETGEN_nglib})
-
-IF(WIN32)
-  SET(NETGEN_LIBRARIES ${NETGEN_LIBRARIES}
-      ${NETGEN_csg}
-      ${NETGEN_gen}
-      ${NETGEN_geom2d}
-      ${NETGEN_gprim}
-      ${NETGEN_interface}
-      ${NETGEN_la}
-      ${NETGEN_mesh}
-      ${NETGEN_occ}
-      ${NETGEN_stl}
-   )
-ENDIF(WIN32)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(NETGEN REQUIRED_VARS NETGEN_INCLUDE_DIRS NETGEN_LIBRARIES)
-
-INCLUDE(CheckCXXSourceCompiles)
-
-IF(NETGEN_FOUND)
-
-  SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES} ${NETGEN_INCLUDE_DIRS}")
-  SET(CMAKE_REQUIRED_LIBRARIES "${NETGEN_LIBRARIES}")
-  CHECK_CXX_SOURCE_COMPILES("
-    #include <meshing.hpp>
-    
-    int main()
-    {
-      netgen::Mesh* ngMesh;
-      ngMesh->CalcLocalH(1.0);
-    }
-" NETGEN_V5
-    )
-
-  IF(NOT Netgen_FIND_QUIETLY)
-    MESSAGE(STATUS "Netgen library: ${NETGEN_LIBRARIES}")
-  ENDIF()
-  SET(NETGEN_DEFINITIONS "-DOCCGEOMETRY")
-
-  IF(NETGEN_V5)
-    MESSAGE(STATUS "NETGEN V5 or later found")
-    SET(NETGEN_DEFINITIONS "${NETGEN_DEFINITIONS} -DNETGEN_V5")
-  ENDIF(NETGEN_V5)
-
-  #RNV:  currently on windows use netgen without thread support.
-  #TODO: check support of the multithreading on windows
-  IF(WIN32)
-   SET(NETGEN_DEFINITIONS "${NETGEN_DEFINITIONS} -DNO_PARALLEL_THREADS")
-  ENDIF(WIN32)
-ENDIF()
diff --git a/adm_local/cmake_files/FindSalomeNETGENPLUGIN.cmake b/adm_local/cmake_files/FindSalomeNETGENPLUGIN.cmake
deleted file mode 100644 (file)
index 9bc1d34..0000000
+++ /dev/null
@@ -1,34 +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
-#
-
-IF(NOT SalomeNETGENPLUGIN_FIND_QUIETLY)
-  MESSAGE(STATUS "Looking for Salome NETGENPLUGIN ...")
-ENDIF()
-
-SET(CMAKE_PREFIX_PATH "${NETGENPLUGIN_ROOT_DIR}")
-
-SALOME_FIND_PACKAGE(SalomeNETGENPLUGIN SalomeNETGENPLUGIN CONFIG)
-
-IF(NOT SalomeNETGENPLUGIN_FIND_QUIETLY)
-  MESSAGE(STATUS "Found Salome NETGENPLUGIN: ${NETGENPLUGIN_ROOT_DIR}")
-ENDIF()
-
-FOREACH(_res ${SalomeNETGENPLUGIN_EXTRA_ENV})
-  SALOME_ACCUMULATE_ENVIRONMENT(${_res} "${SalomeNETGENPLUGIN_EXTRA_ENV_${_res}}")
-ENDFOREACH()
\ No newline at end of file
diff --git a/adm_local/cmake_files/FindSalomeNetgen.cmake b/adm_local/cmake_files/FindSalomeNetgen.cmake
deleted file mode 100644 (file)
index b640634..0000000
+++ /dev/null
@@ -1,26 +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
-#
-
-SALOME_FIND_PACKAGE_AND_DETECT_CONFLICTS(Netgen NETGEN_INCLUDE_DIRS 1)
-MARK_AS_ADVANCED(NETGEN_INCLUDE_DIRS NETGEN_LIBRARIES)
-
-IF(NETGEN_FOUND)
-  SALOME_ACCUMULATE_HEADERS(NETGEN_INCLUDE_DIRS)
-  SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${NETGEN_LIBRARIES})
-ENDIF()