mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-27 01:10:32 +05:00
WIN32 compilation of the SMESH module:
1) Fix common WIN32 compilation errors. 2) Replace WNT deprecated macro definition by the WIN32. 3) Remove unnecessary test executables. 4) Make MEFISTO2D algorithm optional: try to determine f2c generator and generate C code from Fortran, otherwise MEFISTO2D is unavailable.
This commit is contained in:
parent
d726924388
commit
e33e8e2029
@ -17,7 +17,7 @@
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
|
||||
PROJECT(SalomeSMESH C CXX Fortran)
|
||||
PROJECT(SalomeSMESH C CXX)
|
||||
|
||||
# Ensure a proper linker behavior:
|
||||
CMAKE_POLICY(SET CMP0003 NEW)
|
||||
@ -55,7 +55,7 @@ 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")
|
||||
LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files")
|
||||
|
||||
# User options
|
||||
# (some options have already been defined in KERNEL)
|
||||
@ -64,12 +64,21 @@ LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files")
|
||||
OPTION(SALOME_BUILD_DOC "Generate SALOME SMESH documentation" ${SALOME_BUILD_DOC})
|
||||
|
||||
# Advanced options:
|
||||
OPTION(SALOME_BUILD_GUI "Enable GUI" ON)
|
||||
OPTION(SALOME_SMESH_USE_CGNS "Enable shape recognition from picture" OFF)
|
||||
OPTION(SALOME_SMESH_USE_TBB "Enable shape recognition from picture" OFF)
|
||||
OPTION(SALOME_BUILD_GUI "Enable GUI" ON)
|
||||
OPTION(SALOME_SMESH_USE_CGNS "Enable shape recognition from picture" OFF)
|
||||
OPTION(SALOME_SMESH_USE_TBB "Enable shape recognition from picture" OFF)
|
||||
|
||||
#On Linux use Fortran to compile MEFISTO2D
|
||||
IF(NOT WIN32)
|
||||
ENABLE_LANGUAGE(Fortran)
|
||||
SET(SALOME_SMESH_ENABLE_MEFISTO ON)
|
||||
ADD_DEFINITIONS(-DENABLE_MEFISTO)
|
||||
ENDIF(NOT WIN32)
|
||||
|
||||
|
||||
MARK_AS_ADVANCED(SALOME_BUILD_GUI SALOME_SMESH_USE_CGNS SALOME_SMESH_USE_TBB)
|
||||
|
||||
|
||||
# Prerequisites
|
||||
# =============
|
||||
# Find "big" prerequisites first - they reference themselves many others
|
||||
@ -126,7 +135,7 @@ IF(SALOME_BUILD_GUI)
|
||||
# PyQt4
|
||||
FIND_PACKAGE(SalomePyQt4 REQUIRED)
|
||||
# Qwt
|
||||
FIND_PACKAGE(SalomeQwt)
|
||||
FIND_PACKAGE(SalomeQwt REQUIRED)
|
||||
ELSE(EXISTS ${GUI_ROOT_DIR})
|
||||
MESSAGE(FATAL_ERROR "GUI_ROOT_DIR is not well defined, SMESH will be built without GUI!!!")
|
||||
ENDIF(EXISTS ${GUI_ROOT_DIR})
|
||||
@ -164,6 +173,25 @@ ENDIF(SALOME_SMESH_USE_TBB)
|
||||
|
||||
FIND_PACKAGE(SalomeMEDFile REQUIRED)
|
||||
|
||||
#On Windows use f2c to generate C MEFISTO2D code
|
||||
IF(WIN32)
|
||||
SET(SALOME_SMESH_ENABLE_MEFISTO OFF)
|
||||
FIND_PACKAGE(Salomef2c QUIET)
|
||||
IF(${F2C_FOUND})
|
||||
ADD_DEFINITIONS(-DENABLE_MEFISTO)
|
||||
SET(SALOME_SMESH_ENABLE_MEFISTO ON)
|
||||
MESSAGE(STATUS "Build MEFISTO2D mesher using Fortran to C generator")
|
||||
ELSE(${F2C_FOUND})
|
||||
MESSAGE(STATUS "Fortran to C generator is not found: MEFISTO2D mesher will be unavailable.")
|
||||
ENDIF(${F2C_FOUND})
|
||||
ENDIF(WIN32)
|
||||
|
||||
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
SET(MEFISTO2D_NAME "MEFISTO_2D")
|
||||
ELSE(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
SET(MEFISTO2D_NAME "NOT_FOUND")
|
||||
ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
|
||||
# Detection summary:
|
||||
SALOME_PACKAGE_REPORT_AND_CHECK()
|
||||
|
||||
@ -234,13 +262,18 @@ INCLUDE(CMakePackageConfigHelpers)
|
||||
SET(_${PROJECT_NAME}_exposed_targets
|
||||
SMESHControls MeshDriver MeshDriverDAT MeshDriverGMF MeshDriverMED
|
||||
MeshDriverSTL MeshDriverUNV MEDWrapperBase MEDWrapper MEDWrapper_V2_2
|
||||
MEFISTO2D SMDS SMESHimpl SMESHEngine SMESHClient SMESHDS
|
||||
SMDS SMESHimpl SMESHEngine SMESHClient SMESHDS
|
||||
SMESHUtils StdMeshers StdMeshersEngine MeshJobManagerEngine
|
||||
SPADDERPluginTesterEngine SalomeIDLSMESH SalomeIDLSPADDER
|
||||
)
|
||||
|
||||
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
LIST(APPEND _${PROJECT_NAME}_exposed_targets
|
||||
MEFISTO2D)
|
||||
ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
|
||||
IF(SALOME_BUILD_GUI)
|
||||
LIST(APPEND _${PROJECT_NAME}_exposed_targets.
|
||||
LIST(APPEND _${PROJECT_NAME}_exposed_targets
|
||||
SMESHObject SMESHFiltersSelection SMESH GeomSelectionTools StdMeshersGUI
|
||||
)
|
||||
ENDIF(SALOME_BUILD_GUI)
|
||||
|
@ -53,6 +53,7 @@ SET(SALOME_BUILD_DOC @SALOME_BUILD_DOC@)
|
||||
SET(SALOME_BUILD_GUI @SALOME_BUILD_GUI@)
|
||||
SET(SALOME_SMESH_USE_CGNS @SALOME_SMESH_USE_CGNS@)
|
||||
SET(SALOME_SMESH_USE_TBB @SALOME_SMESH_USE_TBB@)
|
||||
SET(SALOME_SMESH_ENABLE_MEFISTO @SALOME_SMESH_ENABLE_MEFISTO@)
|
||||
|
||||
# Level 1 prerequisites:
|
||||
SET_AND_CHECK(GEOM_ROOT_DIR_EXP "@PACKAGE_GEOM_ROOT_DIR@")
|
||||
@ -121,7 +122,9 @@ SET(SMESH_MeshDriverUNV MeshDriverUNV)
|
||||
SET(SMESH_MEDWrapperBase MEDWrapperBase)
|
||||
SET(SMESH_MEDWrapper MEDWrapper)
|
||||
SET(SMESH_MEDWrapper_V2_2 MEDWrapper_V2_2)
|
||||
SET(SMESH_MEFISTO2D MEFISTO2D)
|
||||
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
SET(SMESH_MEFISTO2D MEFISTO2D)
|
||||
ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
SET(SMESH_SMESHObject SMESHObject)
|
||||
SET(SMESH_GeomSelectionTools GeomSelectionTools)
|
||||
SET(SMESH_SMDS SMDS)
|
||||
|
@ -25,8 +25,10 @@
|
||||
SET(_adm_data
|
||||
FindCGNS.cmake
|
||||
FindTBB.cmake
|
||||
Findf2c.cmake
|
||||
FindSalomeSMESH.cmake
|
||||
FindSalomeCGNS.cmake
|
||||
FindSalomeTBB.cmake
|
||||
FindSalomef2c.cmake
|
||||
)
|
||||
INSTALL(FILES ${_adm_data} DESTINATION ${SALOME_INSTALL_CMAKE_LOCAL})
|
||||
|
21
adm_local/cmake_files/FindSalomef2c.cmake
Executable file
21
adm_local/cmake_files/FindSalomef2c.cmake
Executable file
@ -0,0 +1,21 @@
|
||||
# Copyright (C) 2013 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.
|
||||
#
|
||||
# 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(f2c f2c_INCLUDE_DIRS 0)
|
||||
MARK_AS_ADVANCED(F2C_INCLUDE_DIRS F2C_LIBRARIES F2C_GENERATOR)
|
55
adm_local/cmake_files/Findf2c.cmake
Executable file
55
adm_local/cmake_files/Findf2c.cmake
Executable file
@ -0,0 +1,55 @@
|
||||
# - Find F2C
|
||||
# Sets the following variables:
|
||||
# f2c_INCLUDE_DIRS - path to the f2c include directory
|
||||
# f2c_LIBRARIES - path to the f2c libraries to be linked against
|
||||
# f2c_GENERATOR - f2c executable
|
||||
#
|
||||
|
||||
#########################################################################
|
||||
# Copyright (C) 2007-2013 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.
|
||||
#
|
||||
# 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 f2c ...")
|
||||
|
||||
# ------
|
||||
|
||||
SET(f2c_ROOT_DIR $ENV{F2C_ROOT_DIR})
|
||||
|
||||
IF(f2c_ROOT_DIR)
|
||||
LIST(APPEND CMAKE_PREFIX_PATH "${f2c_ROOT_DIR}")
|
||||
ENDIF(f2c_ROOT_DIR)
|
||||
|
||||
FIND_PATH(f2c_INCLUDE_DIRS F2c.h)
|
||||
FIND_LIBRARY(f2c_LIBRARY_LIBF77 NAMES LIBF77)
|
||||
FIND_LIBRARY(f2c_LIBRARY_LIBI77 NAMES LIBI77)
|
||||
|
||||
SET(f2c_LIBRARIES
|
||||
${f2c_LIBRARY_LIBF77}
|
||||
${f2c_LIBRARY_LIBI77}
|
||||
)
|
||||
|
||||
FIND_PROGRAM(f2c_GENERATOR F2c)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(f2c REQUIRED_VARS f2c_INCLUDE_DIRS f2c_LIBRARIES f2c_GENERATOR)
|
@ -48,7 +48,7 @@ SALOME_CONFIGURE_FILE(conf.py.in conf.py)
|
||||
# Their root dir were found when looking for Sphinx (FindSalomeSphinx.cmake):
|
||||
|
||||
SET(_pydir python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
||||
IF(WINDOWS)
|
||||
IF(WIN32)
|
||||
STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\lib\\${_pydir}\\site-packages\\salome\;%PYTHONPATH%
|
||||
@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\bin\\salome\;%PYTHONPATH%
|
||||
@SET PATH=${CMAKE_INSTALL_PREFIX}\\lib\\salome\;%PATH%
|
||||
@ -68,7 +68,7 @@ IF(WINDOWS)
|
||||
")
|
||||
SET(EXT "bat")
|
||||
SET(CALL_STR "call")
|
||||
ELSE(WINDOWS)
|
||||
ELSE(WIN32)
|
||||
SET(SCR " export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/${_pydir}/site-packages/salome:\${PYTHONPATH}
|
||||
export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/bin/salome:\${PYTHONPATH}
|
||||
export LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib/salome:\${LD_LIBRARY_PATH}
|
||||
@ -96,7 +96,7 @@ ELSE(WINDOWS)
|
||||
)
|
||||
SET(EXT "sh")
|
||||
SET(CALL_STR ".")
|
||||
ENDIF(WINDOWS)
|
||||
ENDIF(WIN32)
|
||||
|
||||
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} "${SCR}")
|
||||
|
||||
|
@ -29,7 +29,7 @@ SALOME_INSTALL_SCRIPTS(collect_mesh_methods.py ${SALOME_INSTALL_BINS})
|
||||
SET(DOC_SMESH_MeshersList StdMeshers)
|
||||
SET(f1 "${CMAKE_CURRENT_SOURCE_DIR}/collect_mesh_methods.py")
|
||||
SET(f "$ENV{KERNEL_ROOT_DIR}/bin/salome/prepare_generating_doc.py")
|
||||
IF(WINDOWS)
|
||||
IF(WIN32)
|
||||
STRING(REPLACE "/" "\\" f ${f})
|
||||
STRING(REPLACE "/" "\\" f1 ${f1})
|
||||
STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=${OMNIORB_ROOT_USER}/lib/x86_win32\;%PYTHONPATH%
|
||||
@ -46,7 +46,7 @@ IF(WINDOWS)
|
||||
")
|
||||
SET(EXT "bat")
|
||||
SET(CALL_STR "call")
|
||||
ELSE(WINDOWS)
|
||||
ELSE(WIN32)
|
||||
SET(DOC_PYTHONPATH "${CMAKE_INSTALL_PREFIX}/bin/salome:${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION}/site-packages/salome:${GEOM_ROOT_DIR}/bin/salome:${GEOM_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${KERNEL_ROOT_DIR}/bin/salome:${KERNEL_ROOT_DIR}/lib/python${PYTHON_VERSION}/site-packages/salome:${OMNIORB_ROOT_USER}/lib/python${PYTHON_VERSION}/site-packages:${OMNIORB_ROOT_USER}/lib64/python${PYTHON_VERSION}/site-packages")
|
||||
SET(DOC_LD_LIBRARY_PATH "${CMAKE_INSTALL_PREFIX}/lib/salome:${GEOM_ROOT_DIR}/lib/salome:${KERNEL_ROOT_DIR}/lib/salome")
|
||||
SET(SCR "export PYTHONPATH=${DOC_PYTHONPATH}:\${PYTHONPATH}
|
||||
@ -55,7 +55,7 @@ ELSE(WINDOWS)
|
||||
")
|
||||
SET(EXT "sh")
|
||||
SET(CALL_STR ".")
|
||||
ENDIF(WINDOWS)
|
||||
ENDIF(WIN32)
|
||||
|
||||
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/tmp_env.${EXT} "${SCR}")
|
||||
|
||||
|
@ -154,7 +154,6 @@ SET(SMESH_RESOURCES_FILES
|
||||
mesh_merge_elements.png
|
||||
select1.png
|
||||
open.png
|
||||
StdMeshers.xml
|
||||
mesh_pattern.png
|
||||
mesh_pentahedron.png
|
||||
pattern_sample_2d.png
|
||||
@ -214,4 +213,5 @@ SET(SMESH_RESOURCES_FILES
|
||||
INSTALL(FILES ${SMESH_RESOURCES_FILES} DESTINATION ${SALOME_SMESH_INSTALL_RES_DATA})
|
||||
|
||||
SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/SalomeApp.xml.in ${CMAKE_CURRENT_BINARY_DIR}/SalomeApp.xml INSTALL ${SALOME_SMESH_INSTALL_RES_DATA})
|
||||
SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/StdMeshers.xml.in ${CMAKE_CURRENT_BINARY_DIR}/StdMeshers.xml INSTALL ${SALOME_SMESH_INSTALL_RES_DATA})
|
||||
SALOME_CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/SMESHCatalog.xml.in ${CMAKE_CURRENT_BINARY_DIR}/SMESHCatalog.xml INSTALL ${SALOME_SMESH_INSTALL_RES_DATA})
|
||||
|
@ -250,7 +250,7 @@
|
||||
</python-wrap>
|
||||
</algorithm>
|
||||
|
||||
<algorithm type ="MEFISTO_2D"
|
||||
<algorithm type ="@MEFISTO2D_NAME@"
|
||||
label-id ="Triangle (Mefisto)"
|
||||
icon-id ="mesh_algo_mefisto.png"
|
||||
hypos ="LengthFromEdges,MaxElementArea"
|
||||
@ -463,7 +463,7 @@
|
||||
|
||||
<hypotheses-set name="Automatic Tetrahedralization"
|
||||
hypos="MaxLength"
|
||||
algos="Regular_1D, MEFISTO_2D, NETGEN_3D"/>
|
||||
algos="Regular_1D, @MEFISTO2D_NAME@, NETGEN_3D"/>
|
||||
|
||||
<hypotheses-set name="Automatic Hexahedralization"
|
||||
hypos="NumberOfSegments"
|
||||
@ -471,7 +471,7 @@
|
||||
|
||||
<hypotheses-set name="Automatic Triangulation"
|
||||
hypos="MaxLength"
|
||||
algos="Regular_1D, MEFISTO_2D"/>
|
||||
algos="Regular_1D, @MEFISTO2D_NAME@"/>
|
||||
|
||||
<hypotheses-set name="Automatic Quadrangulation"
|
||||
hypos="NumberOfSegments"
|
@ -55,13 +55,16 @@ SET(SUBDIRS_COMMON
|
||||
SMESH_I
|
||||
SMESHClient
|
||||
SMESH_SWIG
|
||||
MEFISTO2
|
||||
StdMeshers
|
||||
StdMeshers_I
|
||||
SMESH_PY
|
||||
Tools
|
||||
)
|
||||
|
||||
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
SET(SUBDIRS_MEFISTO2 MEFISTO2)
|
||||
ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
|
||||
##
|
||||
# CGNS
|
||||
##
|
||||
@ -86,6 +89,7 @@ ENDIF(SALOME_BUILD_GUI)
|
||||
|
||||
SET(SUBDIRS
|
||||
${SUBDIRS_COMMON}
|
||||
${SUBDIRS_MEFISTO2}
|
||||
${SUBDIRS_CGNS}
|
||||
${SUBDIRS_GUI}
|
||||
)
|
||||
|
@ -49,19 +49,6 @@ SET(_link_LIBRARIES
|
||||
SMESHUtils
|
||||
)
|
||||
|
||||
SET(_link_LIBRARIES_bin
|
||||
${KERNEL_OpUtil}
|
||||
${KERNEL_SALOMELocalTrace}
|
||||
${KERNEL_SALOMEBasics}
|
||||
${KERNEL_SalomeIDLKERNEL}
|
||||
${GEOM_GEOMAlgo}
|
||||
${CAS_TKernel}
|
||||
${CAS_TKBRep}
|
||||
${CAS_TKG3d}
|
||||
SMDS
|
||||
SMESHDS
|
||||
)
|
||||
|
||||
# --- headers ---
|
||||
|
||||
# header files / no moc processing
|
||||
@ -76,20 +63,10 @@ SET(SMESHControls_SOURCES
|
||||
SMESH_Controls.cxx
|
||||
)
|
||||
|
||||
# bin programs
|
||||
SET(SMESHControls_bin_SOURCES
|
||||
SMESHControls.cxx
|
||||
)
|
||||
|
||||
# --- rules ---
|
||||
|
||||
ADD_LIBRARY(SMESHControls ${SMESHControls_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(SMESHControls ${_link_LIBRARIES} )
|
||||
INSTALL(TARGETS SMESHControls EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
ADD_EXECUTABLE(SMESHControls_bin ${SMESHControls_bin_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(SMESHControls_bin ${_link_LIBRARIES_bin} SMESHControls)
|
||||
SET_TARGET_PROPERTIES(SMESHControls_bin PROPERTIES OUTPUT_NAME "SMESHControls")
|
||||
INSTALL(TARGETS SMESHControls_bin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
|
||||
|
||||
INSTALL(FILES ${SMESHControls_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
|
||||
|
@ -1,50 +0,0 @@
|
||||
// Copyright (C) 2007-2013 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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
#include "SMESH_ControlsDef.hxx"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
using namespace SMESH::Controls;
|
||||
new MinimumAngle();
|
||||
new AspectRatio();
|
||||
new Warping();
|
||||
new Taper();
|
||||
new Skew();
|
||||
new Area();
|
||||
new MaxElementLength2D();
|
||||
new MaxElementLength3D();
|
||||
new Length();
|
||||
// new Length2D();
|
||||
new MultiConnection();
|
||||
// new MultiConnection2D();
|
||||
new FreeBorders();
|
||||
new LessThan();
|
||||
new MoreThan();
|
||||
new EqualTo();
|
||||
new LogicalNOT();
|
||||
new LogicalAND();
|
||||
new LogicalOR();
|
||||
new ManifoldPart();
|
||||
|
||||
return 1;
|
||||
}
|
@ -32,7 +32,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined MESHDRIVER_EXPORTS || defined MeshDriver_EXPORTS
|
||||
#define MESHDRIVER_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -27,7 +27,7 @@
|
||||
#ifndef _SMESH_DriverCGNS_HXX_
|
||||
#define _SMESH_DriverCGNS_HXX_
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined MESHDriverCGNS_EXPORTS || defined MeshDriverCGNS_EXPORTS
|
||||
#define MESHDriverCGNS_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -70,19 +70,10 @@ SET(MeshDriverDAT_SOURCES
|
||||
DriverDAT_W_SMDS_Mesh.cxx
|
||||
)
|
||||
|
||||
# bin programs
|
||||
SET(MeshDriverDAT_bin_SOURCES
|
||||
DAT_Test.cxx
|
||||
)
|
||||
|
||||
# --- rules ---
|
||||
|
||||
ADD_LIBRARY(MeshDriverDAT ${MeshDriverDAT_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(MeshDriverDAT ${_link_LIBRARIES} )
|
||||
INSTALL(TARGETS MeshDriverDAT EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
ADD_EXECUTABLE(DAT_Test ${MeshDriverDAT_bin_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(DAT_Test ${_link_LIBRARIES_bin} MeshDriverDAT)
|
||||
INSTALL(TARGETS DAT_Test EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
|
||||
|
||||
INSTALL(FILES ${MeshDriverDAT_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
|
||||
|
@ -1,31 +0,0 @@
|
||||
// Copyright (C) 2007-2013 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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
#include "DriverDAT_R_SMDS_Mesh.h"
|
||||
#include "DriverDAT_W_SMDS_Mesh.h"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
DriverDAT_R_SMDS_Mesh aR;
|
||||
DriverDAT_W_SMDS_Mesh aW;
|
||||
return 1;
|
||||
}
|
@ -27,7 +27,7 @@
|
||||
#ifndef _SMESH_DriverDAT_HXX_
|
||||
#define _SMESH_DriverDAT_HXX_
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined MESHDRIVERDAT_EXPORTS || defined MeshDriverDAT_EXPORTS
|
||||
#define MESHDRIVERDAT_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -27,7 +27,7 @@
|
||||
#ifndef _SMESH_DriverGMF_HXX_
|
||||
#define _SMESH_DriverGMF_HXX_
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined MESHDriverGMF_EXPORTS || defined MeshDriverGMF_EXPORTS
|
||||
#define MESHDriverGMF_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -79,20 +79,10 @@ SET(MeshDriverMED_SOURCES
|
||||
DriverMED_Family.cxx
|
||||
)
|
||||
|
||||
# bin programs
|
||||
SET(MeshDriverMED_bin_SOURCES
|
||||
MED_Test.cxx
|
||||
)
|
||||
|
||||
# --- rules ---
|
||||
|
||||
ADD_LIBRARY(MeshDriverMED ${MeshDriverMED_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(MeshDriverMED ${_link_LIBRARIES} )
|
||||
INSTALL(TARGETS MeshDriverMED EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
ADD_EXECUTABLE(MED_Test_bin ${MeshDriverMED_bin_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(MED_Test_bin ${_link_LIBRARIES_bin} MeshDriverMED)
|
||||
SET_TARGET_PROPERTIES(MED_Test_bin PROPERTIES OUTPUT_NAME "MED_Test")
|
||||
INSTALL(TARGETS MED_Test_bin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
|
||||
|
||||
INSTALL(FILES ${MeshDriverMED_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
|
||||
|
@ -1,31 +0,0 @@
|
||||
// Copyright (C) 2007-2013 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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
#include "DriverMED_R_SMESHDS_Mesh.h"
|
||||
#include "DriverMED_W_SMESHDS_Mesh.h"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
DriverMED_R_SMESHDS_Mesh aR;
|
||||
DriverMED_W_SMESHDS_Mesh aW;
|
||||
return 1;
|
||||
}
|
@ -27,7 +27,7 @@
|
||||
#ifndef _SMESH_DriverMED_HXX_
|
||||
#define _SMESH_DriverMED_HXX_
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined MESHDRIVERMED_EXPORTS || defined MeshDriverMED_EXPORTS
|
||||
#define MESHDRIVERMED_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -78,19 +78,10 @@ SET(MeshDriverSTL_SOURCES
|
||||
DriverSTL_W_SMDS_Mesh.cxx
|
||||
)
|
||||
|
||||
# bin programs
|
||||
SET(STL_Test_SOURCES
|
||||
STL_Test.cxx
|
||||
)
|
||||
|
||||
# --- rules ---
|
||||
|
||||
ADD_LIBRARY(MeshDriverSTL ${MeshDriverSTL_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(MeshDriverSTL ${_link_LIBRARIES} )
|
||||
INSTALL(TARGETS MeshDriverSTL EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
ADD_EXECUTABLE(STL_Test ${STL_Test_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(STL_Test ${_link_LIBRARIES_bin} MeshDriverSTL)
|
||||
INSTALL(TARGETS STL_Test EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
|
||||
|
||||
INSTALL(FILES ${MeshDriverSTL_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
|
||||
|
@ -27,7 +27,7 @@
|
||||
#ifndef _SMESH_DriverSTL_HXX_
|
||||
#define _SMESH_DriverSTL_HXX_
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined MESHDRIVERSTL_EXPORTS || defined MeshDriverSTL_EXPORTS
|
||||
#define MESHDRIVERSTL_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -1,32 +0,0 @@
|
||||
// Copyright (C) 2007-2013 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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
//#include "DriverSTL_R_SMDS_Mesh.h"
|
||||
//
|
||||
#include "DriverSTL_W_SMDS_Mesh.h"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// DriverSTL_R_SMDS_Mesh aR;
|
||||
DriverSTL_W_SMDS_Mesh aW;
|
||||
return 1;
|
||||
}
|
@ -76,19 +76,10 @@ SET(MeshDriverUNV_SOURCES
|
||||
|
||||
)
|
||||
|
||||
# bin programs
|
||||
SET(UNV_Test_SOURCES
|
||||
UNV_Test.cxx
|
||||
)
|
||||
|
||||
# --- rules ---
|
||||
|
||||
ADD_LIBRARY(MeshDriverUNV ${MeshDriverUNV_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(MeshDriverUNV ${_link_LIBRARIES} )
|
||||
INSTALL(TARGETS MeshDriverUNV EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
ADD_EXECUTABLE(UNV_Test ${UNV_Test_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(UNV_Test ${_link_LIBRARIES_bin} MeshDriverUNV)
|
||||
INSTALL(TARGETS UNV_Test EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
|
||||
|
||||
INSTALL(FILES ${MeshDriverUNV_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
|
||||
|
@ -27,7 +27,7 @@
|
||||
#ifndef _SMESH_DriverUNV_HXX_
|
||||
#define _SMESH_DriverUNV_HXX_
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined MESHDRIVERUNV_EXPORTS || defined MeshDriverUNV_EXPORTS
|
||||
#define MESHDRIVERUNV_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -1,65 +0,0 @@
|
||||
// Copyright (C) 2007-2013 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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
#include "UNV2411_Structure.hxx"
|
||||
#include "UNV2412_Structure.hxx"
|
||||
#include "UNV_Utilities.hxx"
|
||||
|
||||
#include "DriverUNV_R_SMDS_Mesh.h"
|
||||
#include "DriverUNV_W_SMDS_Mesh.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
void ReadMed(const char* theFileName){
|
||||
std::ifstream in_stream(theFileName);
|
||||
|
||||
UNV2411::TDataSet aDataSet2411;
|
||||
UNV2411::Read(in_stream,aDataSet2411);
|
||||
|
||||
in_stream.seekg(0);
|
||||
UNV2412::TDataSet aDataSet2412;
|
||||
UNV2412::Read(in_stream,aDataSet2412);
|
||||
|
||||
string aFileName(theFileName);
|
||||
aFileName += "-";
|
||||
std::ofstream out_stream(aFileName.c_str());
|
||||
|
||||
UNV2411::Write(out_stream,aDataSet2411);
|
||||
UNV2412::Write(out_stream,aDataSet2412);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char** argv){
|
||||
DriverUNV_R_SMDS_Mesh aR;
|
||||
DriverUNV_W_SMDS_Mesh aW;
|
||||
try{
|
||||
if(argc > 1){
|
||||
ReadMed(argv[1]);
|
||||
}
|
||||
return 0;
|
||||
}catch(std::exception& exc){
|
||||
MESSAGE("Follow exception was accured :\n"<<exc.what());
|
||||
}catch(...){
|
||||
MESSAGE("Unknown exception was accured !!!");
|
||||
}
|
||||
return 1;
|
||||
}
|
@ -48,16 +48,50 @@ SET(MEFISTO2D_HEADERS
|
||||
|
||||
# --- sources ---
|
||||
|
||||
# sources / static
|
||||
SET(MEFISTO2D_SOURCES
|
||||
aptrte.cxx
|
||||
trte.f
|
||||
)
|
||||
IF(${F2C_FOUND})
|
||||
ADD_DEFINITIONS()
|
||||
SET(F2C_INPUT ${CMAKE_CURRENT_SOURCE_DIR}/trte.f)
|
||||
SET(F2C_OUTPUT trte.c)
|
||||
|
||||
# additional include directories
|
||||
INCLUDE_DIRECTORIES(${f2c_INCLUDE_DIRS})
|
||||
|
||||
# additional preprocessor / compiler flags
|
||||
ADD_DEFINITIONS(-DF2C_BUILD)
|
||||
|
||||
|
||||
# libraries to link to
|
||||
SET(_link_LIBRARIES ${_link_LIBRARIES} ${f2c_LIBRARIES})
|
||||
|
||||
# generate C sources from Fortran
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${F2C_OUTPUT}
|
||||
COMMAND ${f2c_GENERATOR} ${F2C_INPUT}
|
||||
MAIN_DEPENDENCY ${F2C_INPUT}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
# sources / static
|
||||
SET(MEFISTO2D_SOURCES
|
||||
aptrte.cxx
|
||||
${F2C_OUTPUT}
|
||||
)
|
||||
ELSE(${F2C_FOUND})
|
||||
# sources / static
|
||||
SET(MEFISTO2D_SOURCES
|
||||
aptrte.cxx
|
||||
trte.f
|
||||
)
|
||||
ENDIF(${F2C_FOUND})
|
||||
|
||||
# --- rules ---
|
||||
|
||||
ADD_LIBRARY(MEFISTO2D ${MEFISTO2D_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(MEFISTO2D ${_link_LIBRARIES} )
|
||||
INSTALL(TARGETS MEFISTO2D EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
#Ignore MSVCRT.lib on WIN32 in case using f2c code generator
|
||||
IF(WIN32 AND ${F2C_FOUND})
|
||||
SET_TARGET_PROPERTIES(MEFISTO2D PROPERTIES LINK_FLAGS "/NODEFAULTLIB:MSVCRT")
|
||||
ENDIF(WIN32 AND ${F2C_FOUND})
|
||||
|
||||
INSTALL(TARGETS MEFISTO2D EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
INSTALL(FILES ${MEFISTO2D_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
|
||||
|
@ -46,7 +46,7 @@
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined MEFISTO2D_EXPORTS
|
||||
#define MEFISTO2D_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -28,7 +28,7 @@
|
||||
#ifndef SMESH_OBJECT_H
|
||||
#define SMESH_OBJECT_H
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined SMESHOBJECT_EXPORTS || defined SMESHObject_EXPORTS
|
||||
#define SMESHOBJECT_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -27,7 +27,7 @@
|
||||
#ifndef _SMESH_SMDS_HXX_
|
||||
#define _SMESH_SMDS_HXX_
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined SMDS_EXPORTS
|
||||
#define SMDS_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -47,7 +47,7 @@
|
||||
|
||||
#include "memoire.h"
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
@ -979,7 +979,7 @@ std::vector< std::string > SMESH_Gen::GetPluginXMLPaths()
|
||||
sep = rootDir[pos];
|
||||
break;
|
||||
}
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
if (sep.empty() ) sep = "\\";
|
||||
#else
|
||||
if (sep.empty() ) sep = "/";
|
||||
@ -994,7 +994,7 @@ std::vector< std::string > SMESH_Gen::GetPluginXMLPaths()
|
||||
xmlPath += tolower( pluginSubDir[pos] );
|
||||
xmlPath += sep + plugin + ".xml";
|
||||
bool fileOK;
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
fileOK = (GetFileAttributes(xmlPath.c_str()) != INVALID_FILE_ATTRIBUTES);
|
||||
#else
|
||||
fileOK = (access(xmlPath.c_str(), F_OK) == 0);
|
||||
|
@ -1323,7 +1323,7 @@ void SMESH_Mesh::ExportSAUV(const char *file,
|
||||
std::string medfilename(file);
|
||||
medfilename += ".med";
|
||||
std::string cmd;
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
cmd = "%PYTHONBIN% ";
|
||||
#else
|
||||
cmd = "python ";
|
||||
@ -1333,7 +1333,7 @@ void SMESH_Mesh::ExportSAUV(const char *file,
|
||||
cmd += "\"";
|
||||
system(cmd.c_str());
|
||||
ExportMED(medfilename.c_str(), theMeshName, theAutoGroups, 1);
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
cmd = "%PYTHONBIN% ";
|
||||
#else
|
||||
cmd = "python ";
|
||||
@ -1342,7 +1342,7 @@ void SMESH_Mesh::ExportSAUV(const char *file,
|
||||
cmd += "from medutilities import convert ; convert(r'" + medfilename + "', 'MED', 'GIBI', 1, r'" + file + "')";
|
||||
cmd += "\"";
|
||||
system(cmd.c_str());
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
cmd = "%PYTHONBIN% ";
|
||||
#else
|
||||
cmd = "python ";
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include <list>
|
||||
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#pragma warning(disable:4251) // Warning DLL Interface ...
|
||||
#pragma warning(disable:4290) // Warning Exception ...
|
||||
#endif
|
||||
|
@ -27,7 +27,7 @@
|
||||
#ifndef _SMESH_SMESH_HXX_
|
||||
#define _SMESH_SMESH_HXX_
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined SMESHimpl_EXPORTS
|
||||
#define SMESH_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -89,19 +89,11 @@ SET(SMESHClient_SOURCES
|
||||
SMESH_Client.cxx
|
||||
)
|
||||
|
||||
# bin programs
|
||||
SET(SMESHClientBin_SOURCES
|
||||
SMESHClientBin.cxx
|
||||
)
|
||||
|
||||
# --- rules ---
|
||||
|
||||
ADD_LIBRARY(SMESHClient ${SMESHClient_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(SMESHClient ${_link_LIBRARIES} )
|
||||
INSTALL(TARGETS SMESHClient EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
ADD_EXECUTABLE(SMESHClientBin ${SMESHClientBin_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(SMESHClientBin ${_link_LIBRARIES})
|
||||
INSTALL(TARGETS SMESHClientBin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
|
||||
|
||||
INSTALL(FILES ${SMESHClient_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "Basics_Utils.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#include <process.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
@ -754,7 +754,7 @@ SMESH_Client::GetSMESHGen(CORBA::ORB_ptr theORB,
|
||||
static SMESH::SMESH_Gen_var aMeshGen;
|
||||
|
||||
if(CORBA::is_nil(aMeshGen.in())){
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
long aClientPID = (long)_getpid();
|
||||
#else
|
||||
long aClientPID = (long)getpid();
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include CORBA_SERVER_HEADER(SMESH_Gen)
|
||||
#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
# if defined SMESHCLIENT_EXPORTS || defined SMESHClient_EXPORTS
|
||||
# define SMESHCLIENT_EXPORT __declspec( dllexport )
|
||||
# else
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined SMESHCONTROLS_EXPORTS || defined SMESHControls_EXPORTS
|
||||
#define SMESHCONTROLS_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -27,7 +27,7 @@
|
||||
#ifndef _SMESH_SMESHDS_HXX_
|
||||
#define _SMESH_SMESHDS_HXX_
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined SMESHDS_EXPORTS
|
||||
#define SMESHDS_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -29,7 +29,7 @@
|
||||
#ifndef SMESH_TYPE_HEADER
|
||||
#define SMESH_TYPE_HEADER
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined SMESHFILTERSSELECTION_EXPORTS || defined SMESHFiltersSelection_EXPORTS
|
||||
#define SMESHFILTERSSELECTION_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -56,6 +56,11 @@ ADD_DEFINITIONS(
|
||||
${OMNIORB_DEFINITIONS}
|
||||
)
|
||||
|
||||
# To avoid GetObject macro definition on WIN32
|
||||
IF(WIN32)
|
||||
ADD_DEFINITIONS(-DNOGDI)
|
||||
ENDIF(WIN32)
|
||||
|
||||
# libraries to link to
|
||||
SET(_link_LIBRARIES
|
||||
${CAS_TKV3d}
|
||||
|
@ -757,7 +757,7 @@ SMESHGUI_ComputeDlg_QThreadQDialog::SMESHGUI_ComputeDlg_QThreadQDialog(QWidget
|
||||
layout->addWidget(nbNodesLabel, row++, 1);
|
||||
layout->addWidget(nbElemsName, row, 0);
|
||||
layout->addWidget(nbElemsLabel, row++, 1);
|
||||
#ifndef WNT
|
||||
#ifndef WIN32
|
||||
layout->addWidget(freeRAMName, row, 0);
|
||||
layout->addWidget(freeRAMLabel, row++, 1);
|
||||
#endif
|
||||
@ -797,7 +797,7 @@ void SMESHGUI_ComputeDlg_QThreadQDialog::timerEvent(QTimerEvent *event)
|
||||
{
|
||||
nbNodesLabel->setText( QString("%1").arg( qthread.getMesh()->NbNodes() ));
|
||||
nbElemsLabel->setText( QString("%1").arg( qthread.getMesh()->NbElements() ));
|
||||
#ifndef WNT
|
||||
#ifndef WIN32
|
||||
struct sysinfo si;
|
||||
const int err = sysinfo( &si );
|
||||
if ( err )
|
||||
|
@ -55,13 +55,13 @@
|
||||
|
||||
|
||||
// Other includes
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#define LibHandle HMODULE
|
||||
#define LoadLib( name ) LoadLibrary( name )
|
||||
#define GetProc GetProcAddress
|
||||
|
@ -36,6 +36,8 @@
|
||||
// SALOME KERNEL includes
|
||||
#include <utilities.h>
|
||||
|
||||
#define BAD_HYP_FLAG "NOT_FOUND"
|
||||
|
||||
/*!
|
||||
Constructor
|
||||
*/
|
||||
@ -89,7 +91,7 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
|
||||
*/
|
||||
if( !myClientLib.isEmpty() )
|
||||
{
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
//myServerLib += ".dll";
|
||||
myClientLib += ".dll";
|
||||
#else
|
||||
@ -157,19 +159,21 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
|
||||
}
|
||||
}
|
||||
|
||||
HypothesisData* aHypData =
|
||||
new HypothesisData (aHypAlType, myPluginName, myServerLib, myClientLib,
|
||||
aLabel, anIcon, aDim, isAux,
|
||||
attr[ HYPOS ], attr[ OPT_HYPOS ], attr[ INPUT ], attr[ OUTPUT ],
|
||||
isNeedGeom, isSupportSubmeshes );
|
||||
if ( !aHypAlType.contains( BAD_HYP_FLAG ) ) {
|
||||
HypothesisData* aHypData =
|
||||
new HypothesisData (aHypAlType, myPluginName, myServerLib, myClientLib,
|
||||
aLabel, anIcon, aDim, isAux,
|
||||
attr[ HYPOS ], attr[ OPT_HYPOS ], attr[ INPUT ], attr[ OUTPUT ],
|
||||
isNeedGeom, isSupportSubmeshes );
|
||||
|
||||
if (qName == "algorithm")
|
||||
{
|
||||
myAlgorithmsMap.insert(aHypAlType,aHypData);
|
||||
}
|
||||
else
|
||||
{
|
||||
myHypothesesMap.insert(aHypAlType,aHypData);
|
||||
if (qName == "algorithm")
|
||||
{
|
||||
myAlgorithmsMap.insert(aHypAlType,aHypData);
|
||||
}
|
||||
else
|
||||
{
|
||||
myHypothesesMap.insert(aHypAlType,aHypData);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -180,15 +184,14 @@ bool SMESHGUI_XmlHandler::startElement (const QString&, const QString&,
|
||||
{
|
||||
if (atts.value("name") != "")
|
||||
{
|
||||
HypothesesSet* aHypoSet = new HypothesesSet ( atts.value("name") );
|
||||
myListOfHypothesesSets.append( aHypoSet );
|
||||
QString hypos = atts.value("hypos").remove( ' ' );
|
||||
QString algos = atts.value("algos").remove( ' ' );
|
||||
bool badSet = hypos.contains( BAD_HYP_FLAG ) || algos.contains( BAD_HYP_FLAG );
|
||||
|
||||
for ( int isHypo = 0; isHypo < 2; ++isHypo )
|
||||
{
|
||||
QString aHypos = isHypo ? atts.value("hypos") : atts.value("algos");
|
||||
aHypos = aHypos.remove( ' ' );
|
||||
aHypoSet->set( !isHypo, aHypos.split( ',', QString::SkipEmptyParts ) );
|
||||
}
|
||||
if ( !badSet )
|
||||
myListOfHypothesesSets.append( new HypothesesSet ( atts.value("name"),
|
||||
hypos.split( ',', QString::SkipEmptyParts ),
|
||||
algos.split( ',', QString::SkipEmptyParts ) ) );
|
||||
}
|
||||
}
|
||||
else if ( qName == "python-wrap" ||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#ifndef SMESH_SMESHGUI_HXX
|
||||
#define SMESH_SMESHGUI_HXX
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined SMESHGUI_EXPORTS || defined SMESH_EXPORTS
|
||||
#define SMESHGUI_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -41,6 +41,7 @@ SET(_link_LIBRARIES
|
||||
${CAS_TKG2d}
|
||||
${CAS_TKG3d}
|
||||
${CAS_TKGeomBase}
|
||||
${CAS_TKGeomAlgo}
|
||||
SMESHDS
|
||||
)
|
||||
|
||||
|
@ -74,7 +74,7 @@ bool SMESH_File::open()
|
||||
int length = size();
|
||||
if ( !_map && length > 0 )
|
||||
{
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
_file = CreateFile(_name.data(), GENERIC_READ, FILE_SHARE_READ,
|
||||
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
bool ok = ( _file != INVALID_HANDLE_VALUE );
|
||||
@ -84,7 +84,7 @@ bool SMESH_File::open()
|
||||
#endif
|
||||
if ( ok )
|
||||
{
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
_mapObj = CreateFileMapping(_file, NULL, PAGE_READONLY, 0, (DWORD)length, NULL);
|
||||
_map = (void*) MapViewOfFile( _mapObj, FILE_MAP_READ, 0, 0, 0 );
|
||||
#else
|
||||
@ -99,7 +99,7 @@ bool SMESH_File::open()
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
CloseHandle(_mapObj);
|
||||
CloseHandle(_file);
|
||||
#else
|
||||
@ -121,7 +121,7 @@ void SMESH_File::close()
|
||||
{
|
||||
if ( _map != NULL )
|
||||
{
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
UnmapViewOfFile(_map);
|
||||
CloseHandle(_mapObj);
|
||||
CloseHandle(_file);
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
@ -82,7 +82,7 @@ private:
|
||||
|
||||
std::string _name; //!< file name
|
||||
int _size; //!< file size
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
HANDLE _file, _mapObj;
|
||||
#else
|
||||
int _file;
|
||||
|
@ -30,6 +30,8 @@
|
||||
#ifndef __SMESH_MeshAlgos_HXX__
|
||||
#define __SMESH_MeshAlgos_HXX__
|
||||
|
||||
#include "SMESH_Utils.hxx"
|
||||
|
||||
#include "SMDSAbs_ElementType.hxx"
|
||||
#include "SMDS_ElemIterator.hxx"
|
||||
#include "SMESH_TypeDefs.hxx"
|
||||
@ -49,7 +51,7 @@ class SMDS_Mesh;
|
||||
*/
|
||||
//=======================================================================
|
||||
|
||||
struct SMESH_NodeSearcher
|
||||
struct SMESHUtils_EXPORT SMESH_NodeSearcher
|
||||
{
|
||||
virtual const SMDS_MeshNode* FindClosestTo( const gp_Pnt& pnt ) = 0;
|
||||
virtual void MoveNode( const SMDS_MeshNode* node, const gp_Pnt& toPnt ) = 0;
|
||||
@ -61,7 +63,7 @@ struct SMESH_NodeSearcher
|
||||
*/
|
||||
//=======================================================================
|
||||
|
||||
struct SMESH_ElementSearcher
|
||||
struct SMESHUtils_EXPORT SMESH_ElementSearcher
|
||||
{
|
||||
/*!
|
||||
* \brief Find elements of given type where the given point is IN or ON.
|
||||
@ -95,9 +97,9 @@ namespace SMESH_MeshAlgos
|
||||
/*!
|
||||
* \brief Return true if the point is IN or ON of the element
|
||||
*/
|
||||
bool IsOut( const SMDS_MeshElement* element, const gp_Pnt& point, double tol );
|
||||
SMESHUtils_EXPORT bool IsOut( const SMDS_MeshElement* element, const gp_Pnt& point, double tol );
|
||||
|
||||
double GetDistance( const SMDS_MeshFace* face, const gp_Pnt& point );
|
||||
SMESHUtils_EXPORT double GetDistance( const SMDS_MeshFace* face, const gp_Pnt& point );
|
||||
|
||||
/*!
|
||||
* Return a face having linked nodes n1 and n2 and which is
|
||||
@ -105,34 +107,35 @@ namespace SMESH_MeshAlgos
|
||||
* - in elemSet provided that !elemSet.empty()
|
||||
* i1 and i2 optionally returns indices of n1 and n2
|
||||
*/
|
||||
const SMDS_MeshElement* FindFaceInSet(const SMDS_MeshNode* n1,
|
||||
const SMDS_MeshNode* n2,
|
||||
const TIDSortedElemSet& elemSet,
|
||||
const TIDSortedElemSet& avoidSet,
|
||||
int* i1=0,
|
||||
int* i2=0);
|
||||
SMESHUtils_EXPORT const SMDS_MeshElement*
|
||||
FindFaceInSet(const SMDS_MeshNode* n1,
|
||||
const SMDS_MeshNode* n2,
|
||||
const TIDSortedElemSet& elemSet,
|
||||
const TIDSortedElemSet& avoidSet,
|
||||
int* i1=0,
|
||||
int* i2=0);
|
||||
/*!
|
||||
* \brief Calculate normal of a mesh face
|
||||
*/
|
||||
bool FaceNormal(const SMDS_MeshElement* F, gp_XYZ& normal, bool normalized=true);
|
||||
SMESHUtils_EXPORT bool FaceNormal(const SMDS_MeshElement* F, gp_XYZ& normal, bool normalized=true);
|
||||
|
||||
/*!
|
||||
* \brief Return nodes common to two elements
|
||||
*/
|
||||
std::vector< const SMDS_MeshNode*> GetCommonNodes(const SMDS_MeshElement* e1,
|
||||
SMESHUtils_EXPORT std::vector< const SMDS_MeshNode*> GetCommonNodes(const SMDS_MeshElement* e1,
|
||||
const SMDS_MeshElement* e2);
|
||||
|
||||
/*!
|
||||
* \brief Return SMESH_NodeSearcher. The caller is responsible for deleteing it
|
||||
*/
|
||||
SMESH_NodeSearcher* GetNodeSearcher( SMDS_Mesh& mesh );
|
||||
SMESHUtils_EXPORT SMESH_NodeSearcher* GetNodeSearcher( SMDS_Mesh& mesh );
|
||||
|
||||
/*!
|
||||
* \brief Return SMESH_ElementSearcher. The caller is responsible for deleting it
|
||||
*/
|
||||
SMESH_ElementSearcher* GetElementSearcher( SMDS_Mesh& mesh );
|
||||
SMESH_ElementSearcher* GetElementSearcher( SMDS_Mesh& mesh,
|
||||
SMDS_ElemIteratorPtr elemIt );
|
||||
SMESHUtils_EXPORT SMESH_ElementSearcher* GetElementSearcher( SMDS_Mesh& mesh );
|
||||
SMESHUtils_EXPORT SMESH_ElementSearcher* GetElementSearcher( SMDS_Mesh& mesh,
|
||||
SMDS_ElemIteratorPtr elemIt );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -27,7 +27,7 @@
|
||||
#ifndef _SMESH_Utils_hxx_
|
||||
#define _SMESH_Utils_hxx_
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined SMESHUtils_EXPORTS
|
||||
#define SMESHUtils_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -49,6 +49,10 @@ ADD_DEFINITIONS(
|
||||
${BOOST_DEFINITIONS}
|
||||
)
|
||||
|
||||
IF(WIN32)
|
||||
ADD_DEFINITIONS(-DNOGDI)
|
||||
ENDIF(WIN32)
|
||||
|
||||
# libraries to link to
|
||||
SET(_link_LIBRARIES
|
||||
${Boost_LIBRARIES}
|
||||
@ -129,20 +133,10 @@ SET(SMESHEngine_SOURCES
|
||||
SMESH_PreMeshInfo.cxx
|
||||
)
|
||||
|
||||
# bin programs
|
||||
SET(SMESHEngine_bin_SOURCES
|
||||
SMESHEngine.cxx
|
||||
)
|
||||
|
||||
# --- rules ---
|
||||
|
||||
ADD_LIBRARY(SMESHEngine ${SMESHEngine_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(SMESHEngine ${_link_LIBRARIES} )
|
||||
INSTALL(TARGETS SMESHEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
|
||||
|
||||
ADD_EXECUTABLE(SMESHEngine_bin ${SMESHEngine_bin_SOURCES})
|
||||
TARGET_LINK_LIBRARIES(SMESHEngine_bin ${_link_LIBRARIES})
|
||||
SET_TARGET_PROPERTIES(SMESHEngine_bin PROPERTIES OUTPUT_NAME "SMESHEngine")
|
||||
INSTALL(TARGETS SMESHEngine_bin EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS})
|
||||
|
||||
INSTALL(FILES ${SMESHEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
|
||||
|
@ -29,7 +29,7 @@
|
||||
#ifndef _SMESH_I_SMESH_HXX_
|
||||
#define _SMESH_I_SMESH_HXX_
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined SMESH_I_EXPORTS || defined SMESHEngine_EXPORTS
|
||||
#define SMESH_I_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -1,26 +0,0 @@
|
||||
// Copyright (C) 2007-2013 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.
|
||||
//
|
||||
// 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
|
||||
//
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return 1;
|
||||
}
|
@ -44,7 +44,7 @@
|
||||
|
||||
#include <LDOMParser.hxx>
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
|
@ -45,14 +45,14 @@
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <OSD.hxx>
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#define LibHandle HMODULE
|
||||
#define LoadLib( name ) LoadLibrary( name )
|
||||
#define GetProc GetProcAddress
|
||||
@ -315,7 +315,7 @@ SMESH_Gen_i::SMESH_Gen_i( CORBA::ORB_ptr orb,
|
||||
CORBA::String_var str_host = session->getHostname();
|
||||
CORBA::Long s_pid = session->getPID();
|
||||
string my_host = Kernel_Utils::GetHostname();
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
long my_pid = (long)_getpid();
|
||||
#else
|
||||
long my_pid = (long) getpid();
|
||||
@ -378,7 +378,7 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
|
||||
!strcmp( theLibName+libNameLen-3, ".so" ))
|
||||
{
|
||||
//the old format
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
aPlatformLibName = std::string( theLibName+3, libNameLen-6 ) + ".dll";
|
||||
#else
|
||||
aPlatformLibName = theLibName;
|
||||
@ -387,8 +387,9 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
|
||||
else
|
||||
{
|
||||
//try to use new format
|
||||
#ifdef WNT
|
||||
aPlatformLibName = theLibName + ".dll";
|
||||
#ifdef WIN32
|
||||
aPlatformLibName = theLibName;
|
||||
aPlatformLibName += ".dll";
|
||||
#else
|
||||
aPlatformLibName = "lib" + std::string( theLibName ) + ".so";
|
||||
#endif
|
||||
@ -413,7 +414,7 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName
|
||||
if (!libHandle)
|
||||
{
|
||||
// report any error, if occured
|
||||
#ifndef WNT
|
||||
#ifndef WIN32
|
||||
const char* anError = dlerror();
|
||||
throw(SALOME_Exception(anError));
|
||||
#else
|
||||
@ -1088,7 +1089,7 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromSAUV( const char* theFileName,
|
||||
std::string medfilename(theFileName);
|
||||
medfilename += ".med";
|
||||
std::string cmd;
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
cmd = "%PYTHONBIN% ";
|
||||
#else
|
||||
cmd = "python ";
|
||||
@ -1098,7 +1099,7 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromSAUV( const char* theFileName,
|
||||
cmd += "\"";
|
||||
system(cmd.c_str());
|
||||
SMESH::mesh_array* result = CreateMeshesFromMEDorSAUV(medfilename.c_str(), theStatus, "CreateMeshesFromSAUV", sauvfilename.c_str());
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
cmd = "%PYTHONBIN% ";
|
||||
#else
|
||||
cmd = "python ";
|
||||
@ -2927,7 +2928,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
||||
|
||||
|
||||
//Remove the files if they exist: BugID: 11225
|
||||
#ifndef WNT /* unix functionality */
|
||||
#ifndef WIN32 /* unix functionality */
|
||||
TCollection_AsciiString cmd("rm -f \"");
|
||||
#else /* windows */
|
||||
TCollection_AsciiString cmd("del /F \"");
|
||||
@ -3008,9 +3009,9 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
||||
string libname = string( myHyp->GetLibName() );
|
||||
// BUG SWP13062
|
||||
// Needs for save crossplatform libname, i.e. parth of name ( ".dll" for
|
||||
// WNT and ".so" for X-system) must be deleted
|
||||
// WIN32 and ".so" for X-system) must be deleted
|
||||
int libname_len = libname.length();
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
if( libname_len > 4 )
|
||||
libname.resize( libname_len - 4 );
|
||||
#else
|
||||
@ -3077,9 +3078,9 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
||||
string libname = string( myHyp->GetLibName() );
|
||||
// BUG SWP13062
|
||||
// Needs for save crossplatform libname, i.e. parth of name ( ".dll" for
|
||||
// WNT and ".so" for X-system) must be deleted
|
||||
// WIN32 and ".so" for X-system) must be deleted
|
||||
int libname_len = libname.length();
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
if( libname_len > 4 )
|
||||
libname.resize( libname_len - 4 );
|
||||
#else
|
||||
|
@ -23,7 +23,7 @@
|
||||
// Author : Nicolas REJNERI
|
||||
// Module : SMESH
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#ifndef LIBSMESH_SWIG_H
|
||||
#define LIBSMESH_SWIG_H
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined SMESH_SWIG_EXPORTS || defined _libSMESH_Swig_EXPORTS
|
||||
#define SMESH_SWIG_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -30,7 +30,6 @@ INCLUDE_DIRECTORIES(
|
||||
${VTK_INCLUDE_DIRS}
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
${GUI_INCLUDE_DIRS}
|
||||
${PROJECT_SOURCE_DIR}/src/MEFISTO2
|
||||
${PROJECT_SOURCE_DIR}/src/SMESHUtils
|
||||
${PROJECT_SOURCE_DIR}/src/SMESH
|
||||
${PROJECT_SOURCE_DIR}/src/SMESHDS
|
||||
@ -39,6 +38,12 @@ INCLUDE_DIRECTORIES(
|
||||
${TBB_INCLUDES}
|
||||
)
|
||||
|
||||
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
INCLUDE_DIRECTORIES(
|
||||
${PROJECT_SOURCE_DIR}/src/MEFISTO2
|
||||
)
|
||||
ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
|
||||
# additional preprocessor / compiler flags
|
||||
ADD_DEFINITIONS(
|
||||
${CAS_DEFINITIONS}
|
||||
@ -58,10 +63,13 @@ SET(_link_LIBRARIES
|
||||
${CAS_TKG3d}
|
||||
SMESHimpl
|
||||
SMESHDS
|
||||
MEFISTO2D
|
||||
${TBB_LIBS}
|
||||
)
|
||||
|
||||
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
SET(_link_LIBRARIES ${_link_LIBRARIES} MEFISTO2D)
|
||||
ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
|
||||
# --- headers ---
|
||||
|
||||
# header files / no moc processing
|
||||
@ -79,7 +87,6 @@ SET(StdMeshers_HEADERS
|
||||
StdMeshers_NotConformAllowed.hxx
|
||||
StdMeshers_Regular_1D.hxx
|
||||
StdMeshers_Quadrangle_2D.hxx
|
||||
StdMeshers_MEFISTO_2D.hxx
|
||||
StdMeshers_Hexa_3D.hxx
|
||||
StdMeshers_Penta_3D.hxx
|
||||
StdMeshers_AutomaticLength.hxx
|
||||
@ -121,6 +128,9 @@ SET(StdMeshers_HEADERS
|
||||
StdMeshers_Cartesian_3D.hxx
|
||||
)
|
||||
|
||||
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
SET(StdMeshers_HEADERS ${StdMeshers_HEADERS} StdMeshers_MEFISTO_2D.hxx)
|
||||
ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
# --- sources ---
|
||||
|
||||
# sources / static
|
||||
@ -138,7 +148,6 @@ SET(StdMeshers_SOURCES
|
||||
StdMeshers_NotConformAllowed.cxx
|
||||
StdMeshers_Regular_1D.cxx
|
||||
StdMeshers_Quadrangle_2D.cxx
|
||||
StdMeshers_MEFISTO_2D.cxx
|
||||
StdMeshers_Penta_3D.cxx
|
||||
StdMeshers_Hexa_3D.cxx
|
||||
StdMeshers_AutomaticLength.cxx
|
||||
@ -179,6 +188,10 @@ SET(StdMeshers_SOURCES
|
||||
StdMeshers_Cartesian_3D.cxx
|
||||
)
|
||||
|
||||
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
SET(StdMeshers_SOURCES ${StdMeshers_SOURCES} StdMeshers_MEFISTO_2D.cxx)
|
||||
ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
|
||||
# --- rules ---
|
||||
|
||||
ADD_LIBRARY(StdMeshers ${StdMeshers_SOURCES})
|
||||
|
@ -28,7 +28,7 @@
|
||||
#ifndef _SMESH_StdMeshers_HXX_
|
||||
#define _SMESH_StdMeshers_HXX_
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined STDMESHERS_EXPORTS || defined StdMeshers_EXPORTS
|
||||
#define STDMESHERS_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -51,6 +51,7 @@ ADD_DEFINITIONS(
|
||||
${CAS_DEFINITIONS}
|
||||
${BOOST_DEFINITIONS}
|
||||
${OMNIORB_DEFINITIONS}
|
||||
${QWT_DEFINITIONS}
|
||||
)
|
||||
|
||||
# libraries to link to
|
||||
@ -59,6 +60,7 @@ SET(_link_LIBRARIES
|
||||
${CAS_TKernel}
|
||||
${CAS_TKBO}
|
||||
${CAS_TKAdvTools}
|
||||
${QWT_LIBRARY}
|
||||
SalomeIDLSMESH
|
||||
SMESHFiltersSelection
|
||||
SMESH
|
||||
|
@ -26,7 +26,7 @@
|
||||
#ifndef SMESH_STDMESHERSGUI_HXX
|
||||
#define SMESH_STDMESHERSGUI_HXX
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined STDMESHERSGUI_EXPORTS || defined StdMeshersGUI_EXPORTS
|
||||
#define STDMESHERSGUI_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -29,7 +29,6 @@ INCLUDE_DIRECTORIES(
|
||||
${VTK_INCLUDE_DIRS}
|
||||
${OMNIORB_INCLUDE_DIR}
|
||||
${PROJECT_SOURCE_DIR}/src/SMESHImpl
|
||||
${PROJECT_SOURCE_DIR}/src/MEFISTO2
|
||||
${PROJECT_SOURCE_DIR}/src/SMESH
|
||||
${PROJECT_SOURCE_DIR}/src/SMESHUtils
|
||||
${PROJECT_SOURCE_DIR}/src/SMESH_I
|
||||
@ -40,6 +39,12 @@ INCLUDE_DIRECTORIES(
|
||||
${PROJECT_BINARY_DIR}/idl
|
||||
)
|
||||
|
||||
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
INCLUDE_DIRECTORIES(
|
||||
${PROJECT_SOURCE_DIR}/src/MEFISTO2
|
||||
)
|
||||
ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
|
||||
# additional preprocessor / compiler flags
|
||||
ADD_DEFINITIONS(
|
||||
${CAS_DEFINITIONS}
|
||||
@ -47,6 +52,11 @@ ADD_DEFINITIONS(
|
||||
${OMNIORB_DEFINITIONS}
|
||||
)
|
||||
|
||||
# To avoid GetObject macro definition on WIN32
|
||||
IF(WIN32)
|
||||
ADD_DEFINITIONS(-DNOGDI)
|
||||
ENDIF(WIN32)
|
||||
|
||||
# libraries to link to
|
||||
SET(_link_LIBRARIES
|
||||
${KERNEL_SALOMELocalTrace}
|
||||
@ -79,7 +89,6 @@ SET(StdMeshersEngine_HEADERS
|
||||
StdMeshers_NotConformAllowed_i.hxx
|
||||
StdMeshers_Regular_1D_i.hxx
|
||||
StdMeshers_Quadrangle_2D_i.hxx
|
||||
StdMeshers_MEFISTO_2D_i.hxx
|
||||
StdMeshers_Hexa_3D_i.hxx
|
||||
StdMeshers_AutomaticLength_i.hxx
|
||||
StdMeshers_QuadranglePreference_i.hxx
|
||||
@ -111,7 +120,9 @@ SET(StdMeshersEngine_HEADERS
|
||||
StdMeshers_CartesianParameters3D_i.hxx
|
||||
StdMeshers_Cartesian_3D_i.hxx
|
||||
)
|
||||
|
||||
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
SET(StdMeshersEngine_HEADERS ${StdMeshersEngine_HEADERS} StdMeshers_MEFISTO_2D_i.hxx)
|
||||
ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
# --- sources ---
|
||||
|
||||
# sources / static
|
||||
@ -129,8 +140,7 @@ SET(StdMeshersEngine_SOURCES
|
||||
StdMeshers_MaxElementVolume_i.cxx
|
||||
StdMeshers_NotConformAllowed_i.cxx
|
||||
StdMeshers_Regular_1D_i.cxx
|
||||
StdMeshers_Quadrangle_2D_i.cxx
|
||||
StdMeshers_MEFISTO_2D_i.cxx
|
||||
StdMeshers_Quadrangle_2D_i.cxx
|
||||
StdMeshers_Hexa_3D_i.cxx
|
||||
StdMeshers_AutomaticLength_i.cxx
|
||||
StdMeshers_QuadranglePreference_i.cxx
|
||||
@ -162,6 +172,10 @@ SET(StdMeshersEngine_SOURCES
|
||||
StdMeshers_Cartesian_3D_i.cxx
|
||||
)
|
||||
|
||||
IF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
SET(StdMeshersEngine_SOURCES ${StdMeshersEngine_SOURCES} StdMeshers_MEFISTO_2D_i.cxx)
|
||||
ENDIF(SALOME_SMESH_ENABLE_MEFISTO)
|
||||
|
||||
# --- rules ---
|
||||
|
||||
ADD_LIBRARY(StdMeshersEngine ${StdMeshersEngine_SOURCES})
|
||||
|
@ -28,7 +28,7 @@
|
||||
#ifndef _SMESH_StdMeshers_I_HXX_
|
||||
#define _SMESH_StdMeshers_I_HXX_
|
||||
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#if defined STDMESHERS_I_EXPORTS || defined StdMeshersEngine_EXPORTS
|
||||
#define STDMESHERS_I_EXPORT __declspec( dllexport )
|
||||
#else
|
||||
|
@ -61,7 +61,9 @@
|
||||
#include "StdMeshers_Cartesian_3D_i.hxx"
|
||||
|
||||
#include "StdMeshers_Regular_1D_i.hxx"
|
||||
#include "StdMeshers_MEFISTO_2D_i.hxx"
|
||||
#ifdef ENABLE_MEFISTO
|
||||
#include "StdMeshers_MEFISTO_2D_i.hxx"
|
||||
#endif
|
||||
#include "StdMeshers_Quadrangle_2D_i.hxx"
|
||||
#include "StdMeshers_Hexa_3D_i.hxx"
|
||||
#include "StdMeshers_Projection_1D_2D_3D_i.hxx"
|
||||
@ -188,8 +190,10 @@ STDMESHERS_I_EXPORT
|
||||
// Algorithms
|
||||
else if (strcmp(aHypName, "Regular_1D") == 0)
|
||||
aCreator = new StdHypothesisCreator_i<StdMeshers_Regular_1D_i>;
|
||||
#ifdef ENABLE_MEFISTO
|
||||
else if (strcmp(aHypName, "MEFISTO_2D") == 0)
|
||||
aCreator = new StdHypothesisCreator_i<StdMeshers_MEFISTO_2D_i>;
|
||||
#endif
|
||||
else if (strcmp(aHypName, "Quadrangle_2D") == 0)
|
||||
aCreator = new StdHypothesisCreator_i<StdMeshers_Quadrangle_2D_i>;
|
||||
else if (strcmp(aHypName, "Hexa_3D") == 0)
|
||||
|
@ -65,7 +65,7 @@ SALOME_CONFIGURE_FILE(conf.py.in conf.py)
|
||||
# Their root dir were found when looking for Sphinx (FindSalomeSphinx.cmake):
|
||||
|
||||
SET(_pydir python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
||||
IF(WINDOWS)
|
||||
IF(WIN32)
|
||||
STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\lib\\${_pydir}\\site-packages\\salome\;%PYTHONPATH%
|
||||
@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\bin\\salome\;%PYTHONPATH%
|
||||
@SET PATH=${CMAKE_INSTALL_PREFIX}\\lib\\salome\;%PATH%
|
||||
@ -85,7 +85,7 @@ IF(WINDOWS)
|
||||
")
|
||||
SET(EXT "bat")
|
||||
SET(CALL_STR "call")
|
||||
ELSE(WINDOWS)
|
||||
ELSE(WIN32)
|
||||
SET(SCR " export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/${_pydir}/site-packages/salome:\${PYTHONPATH}
|
||||
export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/bin/salome:\${PYTHONPATH}
|
||||
export LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib/salome:\${LD_LIBRARY_PATH}
|
||||
@ -113,7 +113,7 @@ ELSE(WINDOWS)
|
||||
)
|
||||
SET(EXT "sh")
|
||||
SET(CALL_STR ".")
|
||||
ENDIF(WINDOWS)
|
||||
ENDIF(WIN32)
|
||||
|
||||
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} "${SCR}")
|
||||
|
||||
|
@ -45,7 +45,7 @@ SALOME_CONFIGURE_FILE(conf.py.in conf.py)
|
||||
# Their root dir were found when looking for Sphinx (FindSalomeSphinx.cmake):
|
||||
|
||||
SET(_pydir python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
|
||||
IF(WINDOWS)
|
||||
IF(WIN32)
|
||||
STRING(REPLACE "/" "\\" SCR "@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\lib\\${_pydir}\\site-packages\\salome\;%PYTHONPATH%
|
||||
@SET PYTHONPATH=${CMAKE_INSTALL_PREFIX}\\bin\\salome\;%PYTHONPATH%
|
||||
@SET PATH=${CMAKE_INSTALL_PREFIX}\\lib\\salome\;%PATH%
|
||||
@ -65,7 +65,7 @@ IF(WINDOWS)
|
||||
")
|
||||
SET(EXT "bat")
|
||||
SET(CALL_STR "call")
|
||||
ELSE(WINDOWS)
|
||||
ELSE(WIN32)
|
||||
SET(SCR " export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/lib/${_pydir}/site-packages/salome:\${PYTHONPATH}
|
||||
export PYTHONPATH=${CMAKE_INSTALL_PREFIX}/bin/salome:\${PYTHONPATH}
|
||||
export LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/lib/salome:\${LD_LIBRARY_PATH}
|
||||
@ -93,7 +93,7 @@ ELSE(WINDOWS)
|
||||
)
|
||||
SET(EXT "sh")
|
||||
SET(CALL_STR ".")
|
||||
ENDIF(WINDOWS)
|
||||
ENDIF(WIN32)
|
||||
|
||||
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/env_s.${EXT} "${SCR}")
|
||||
|
||||
|
@ -24,6 +24,10 @@ INCLUDE_DIRECTORIES(
|
||||
${KERNEL_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
IF(WIN32)
|
||||
ADD_DEFINITIONS(-DNOGDI)
|
||||
ENDIF(WIN32)
|
||||
|
||||
SET(SalomeIDLSPADDER_IDLSOURCES
|
||||
MESHJOB.idl
|
||||
SPADDERPluginTest.idl
|
||||
|
@ -41,8 +41,13 @@ ADD_DEFINITIONS(
|
||||
${CAS_DEFINITIONS}
|
||||
${BOOST_DEFINITIONS}
|
||||
${LIBXML2_DEFINITIONS}
|
||||
${OMNIORB_DEFINITIONS}
|
||||
)
|
||||
|
||||
IF(WIN32)
|
||||
ADD_DEFINITIONS(-DNOGDI)
|
||||
ENDIF(WIN32)
|
||||
|
||||
# libraries to link to
|
||||
SET(MeshJobManagerEngine_LIBRARIES
|
||||
${KERNEL_SalomeContainer}
|
||||
|
@ -124,7 +124,7 @@ MeshJobManager_i::~MeshJobManager_i() {
|
||||
// ====================================================================
|
||||
//
|
||||
#include <fstream> // to get the file streams
|
||||
#ifdef WNT
|
||||
#ifdef WIN32
|
||||
#include <stdlib.h> // to get _splitpath
|
||||
#include <direct.h> // to get _mkdir
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user