From: rnv Date: Fri, 18 Oct 2013 13:29:00 +0000 (+0000) Subject: WIN32 compilation of the SMESH module: X-Git-Tag: V7_3_0a1~117 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e33e8e2029a4e91779b9c1d5f480979fa7b51d0b;p=modules%2Fsmesh.git 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. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index e13f8c51f..f77f11b50 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/SalomeSMESHConfig.cmake.in b/SalomeSMESHConfig.cmake.in index e184a55cd..5a25c2c8f 100644 --- a/SalomeSMESHConfig.cmake.in +++ b/SalomeSMESHConfig.cmake.in @@ -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) diff --git a/adm_local/cmake_files/CMakeLists.txt b/adm_local/cmake_files/CMakeLists.txt index eff4cc428..602688c35 100755 --- a/adm_local/cmake_files/CMakeLists.txt +++ b/adm_local/cmake_files/CMakeLists.txt @@ -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}) diff --git a/adm_local/cmake_files/FindSalomef2c.cmake b/adm_local/cmake_files/FindSalomef2c.cmake new file mode 100755 index 000000000..b5d8330fe --- /dev/null +++ b/adm_local/cmake_files/FindSalomef2c.cmake @@ -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) diff --git a/adm_local/cmake_files/Findf2c.cmake b/adm_local/cmake_files/Findf2c.cmake new file mode 100755 index 000000000..e6cc8e1cc --- /dev/null +++ b/adm_local/cmake_files/Findf2c.cmake @@ -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) \ No newline at end of file diff --git a/doc/docutils/CMakeLists.txt b/doc/docutils/CMakeLists.txt index a2e96786c..8c5f91a6b 100755 --- a/doc/docutils/CMakeLists.txt +++ b/doc/docutils/CMakeLists.txt @@ -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}") diff --git a/doc/salome/gui/SMESH/CMakeLists.txt b/doc/salome/gui/SMESH/CMakeLists.txt index c9b0ad23a..ef5e2ae2a 100644 --- a/doc/salome/gui/SMESH/CMakeLists.txt +++ b/doc/salome/gui/SMESH/CMakeLists.txt @@ -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}") diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt index 6b6cd1d3c..99825bb76 100755 --- a/resources/CMakeLists.txt +++ b/resources/CMakeLists.txt @@ -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}) diff --git a/resources/StdMeshers.xml b/resources/StdMeshers.xml deleted file mode 100644 index 6e8791a2a..000000000 --- a/resources/StdMeshers.xml +++ /dev/null @@ -1,482 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Regular_1D=Segment() - LocalLength=LocalLength(SetLength(1),,SetPrecision(1)) - MaxLength=MaxSize(SetLength(1)) - Arithmetic1D=Arithmetic1D(SetStartLength(),SetEndLength(),SetReversedEdges()) - StartEndLength=StartEndLength(SetStartLength(),SetEndLength(),SetReversedEdges()) - Deflection1D=Deflection1D(SetDeflection()) - AutomaticLength=AutomaticLength(SetFineness()) - FixedPoints1D=FixedPoints1D(SetPoints(),SetNbSegments(),SetReversedEdges()) - Propagation=Propagation() - QuadraticMesh=QuadraticMesh() - - - - - - CompositeSegment_1D=Segment(algo=smeshBuilder.COMPOSITE) - LocalLength=LocalLength(SetLength(), ,SetPrecision()) - MaxLength=MaxSize(SetLength()) - Arithmetic1D=Arithmetic1D(SetStartLength(),SetEndLength(),SetReversedEdges()) - StartEndLength=StartEndLength(SetStartLength(),SetEndLength(),SetReversedEdges()) - Deflection1D=Deflection1D(SetDeflection()) - AutomaticLength=AutomaticLength(SetFineness()) - FixedPoints1D=FixedPoints1D(SetPoints(),SetNbSegments(),SetReversedEdges()) - Propagation=Propagation() - QuadraticMesh=QuadraticMesh() - - - - - - Python_1D=Segment(algo=smeshBuilder.PYTHON) - PythonSplit1D=PythonSplit1D(SetNumberOfSegments(),SetPythonLog10RatioFunction()) - - - - - - MEFISTO_2D=Triangle(algo=smeshBuilder.MEFISTO) - LengthFromEdges=LengthFromEdges() - MaxElementArea=MaxElementArea(SetMaxElementArea()) - ViscousLayers2D=ViscousLayers2D(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetEdges(1),SetEdges(2)) - - - - - - Quadrangle_2D=Quadrangle(algo=smeshBuilder.QUADRANGLE) - QuadrangleParams=QuadrangleParameters(SetQuadType(),SetTriaVertex()) - ViscousLayers2D=ViscousLayers2D(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreEdges()) - - - - - - Hexa_3D=Hexahedron(algo=smeshBuilder.Hexa) - ViscousLayers=ViscousLayers(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreFaces()) - - - - - - Projection_1D=Projection1D() - ProjectionSource1D=SourceEdge(SetSourceEdge(),SetSourceMesh(),SetVertexAssociation(1),SetVertexAssociation(2)) - - - - - - Projection_2D=Projection2D() - ProjectionSource2D=SourceFace(SetSourceFace(),SetSourceMesh(),SetVertexAssociation(1),SetVertexAssociation(3),SetVertexAssociation(2),SetVertexAssociation(4)) - - - - - - Projection_1D2D=Projection1D2D() - ProjectionSource2D=SourceFace(SetSourceFace(),SetSourceMesh(),SetVertexAssociation(1),SetVertexAssociation(2),SetVertexAssociation(3),SetVertexAssociation(4)) - - - - - - Projection_3D=Projection3D() - ProjectionSource3D=SourceShape3D(SetSource3DShape(),SetSourceMesh(),SetVertexAssociation(1),SetVertexAssociation(3),SetVertexAssociation(2),SetVertexAssociation(4)) - - - - - - Import_1D=UseExisting1DElements() - ImportSource1D=SourceEdges(SetSourceEdges(),SetCopySourceMesh(1),SetCopySourceMesh(2)) - - - - - - Import_1D2D=UseExisting2DElements() - ImportSource2D=SourceFaces(SetSourceFaces(),SetCopySourceMesh(1),SetCopySourceMesh(2)) - - - - - - Prism_3D=Prism() - - - - - - RadialPrism_3D=Prism('RadialPrism_3D') - NumberOfLayers=NumberOfLayers(SetNumberOfLayers()) - - - - - - UseExisting_1D=UseExistingSegments() - - - - - - UseExisting_2D=UseExistingFaces() - - - - - - RadialQuadrangle_1D2D=Quadrangle(algo=smeshBuilder.RADIAL_QUAD) - NumberOfLayers2D=NumberOfLayers(SetNumberOfLayers()) - - - - - - Cartesian_3D=BodyFitted() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/resources/StdMeshers.xml.in b/resources/StdMeshers.xml.in new file mode 100644 index 000000000..c205f0355 --- /dev/null +++ b/resources/StdMeshers.xml.in @@ -0,0 +1,482 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Regular_1D=Segment() + LocalLength=LocalLength(SetLength(1),,SetPrecision(1)) + MaxLength=MaxSize(SetLength(1)) + Arithmetic1D=Arithmetic1D(SetStartLength(),SetEndLength(),SetReversedEdges()) + StartEndLength=StartEndLength(SetStartLength(),SetEndLength(),SetReversedEdges()) + Deflection1D=Deflection1D(SetDeflection()) + AutomaticLength=AutomaticLength(SetFineness()) + FixedPoints1D=FixedPoints1D(SetPoints(),SetNbSegments(),SetReversedEdges()) + Propagation=Propagation() + QuadraticMesh=QuadraticMesh() + + + + + + CompositeSegment_1D=Segment(algo=smeshBuilder.COMPOSITE) + LocalLength=LocalLength(SetLength(), ,SetPrecision()) + MaxLength=MaxSize(SetLength()) + Arithmetic1D=Arithmetic1D(SetStartLength(),SetEndLength(),SetReversedEdges()) + StartEndLength=StartEndLength(SetStartLength(),SetEndLength(),SetReversedEdges()) + Deflection1D=Deflection1D(SetDeflection()) + AutomaticLength=AutomaticLength(SetFineness()) + FixedPoints1D=FixedPoints1D(SetPoints(),SetNbSegments(),SetReversedEdges()) + Propagation=Propagation() + QuadraticMesh=QuadraticMesh() + + + + + + Python_1D=Segment(algo=smeshBuilder.PYTHON) + PythonSplit1D=PythonSplit1D(SetNumberOfSegments(),SetPythonLog10RatioFunction()) + + + + + + MEFISTO_2D=Triangle(algo=smeshBuilder.MEFISTO) + LengthFromEdges=LengthFromEdges() + MaxElementArea=MaxElementArea(SetMaxElementArea()) + ViscousLayers2D=ViscousLayers2D(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetEdges(1),SetEdges(2)) + + + + + + Quadrangle_2D=Quadrangle(algo=smeshBuilder.QUADRANGLE) + QuadrangleParams=QuadrangleParameters(SetQuadType(),SetTriaVertex()) + ViscousLayers2D=ViscousLayers2D(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreEdges()) + + + + + + Hexa_3D=Hexahedron(algo=smeshBuilder.Hexa) + ViscousLayers=ViscousLayers(SetTotalThickness(),SetNumberLayers(),SetStretchFactor(),SetIgnoreFaces()) + + + + + + Projection_1D=Projection1D() + ProjectionSource1D=SourceEdge(SetSourceEdge(),SetSourceMesh(),SetVertexAssociation(1),SetVertexAssociation(2)) + + + + + + Projection_2D=Projection2D() + ProjectionSource2D=SourceFace(SetSourceFace(),SetSourceMesh(),SetVertexAssociation(1),SetVertexAssociation(3),SetVertexAssociation(2),SetVertexAssociation(4)) + + + + + + Projection_1D2D=Projection1D2D() + ProjectionSource2D=SourceFace(SetSourceFace(),SetSourceMesh(),SetVertexAssociation(1),SetVertexAssociation(2),SetVertexAssociation(3),SetVertexAssociation(4)) + + + + + + Projection_3D=Projection3D() + ProjectionSource3D=SourceShape3D(SetSource3DShape(),SetSourceMesh(),SetVertexAssociation(1),SetVertexAssociation(3),SetVertexAssociation(2),SetVertexAssociation(4)) + + + + + + Import_1D=UseExisting1DElements() + ImportSource1D=SourceEdges(SetSourceEdges(),SetCopySourceMesh(1),SetCopySourceMesh(2)) + + + + + + Import_1D2D=UseExisting2DElements() + ImportSource2D=SourceFaces(SetSourceFaces(),SetCopySourceMesh(1),SetCopySourceMesh(2)) + + + + + + Prism_3D=Prism() + + + + + + RadialPrism_3D=Prism('RadialPrism_3D') + NumberOfLayers=NumberOfLayers(SetNumberOfLayers()) + + + + + + UseExisting_1D=UseExistingSegments() + + + + + + UseExisting_2D=UseExistingFaces() + + + + + + RadialQuadrangle_1D2D=Quadrangle(algo=smeshBuilder.RADIAL_QUAD) + NumberOfLayers2D=NumberOfLayers(SetNumberOfLayers()) + + + + + + Cartesian_3D=BodyFitted() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9ef95077a..35277f271 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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} ) diff --git a/src/Controls/CMakeLists.txt b/src/Controls/CMakeLists.txt index b33396148..e73f51331 100644 --- a/src/Controls/CMakeLists.txt +++ b/src/Controls/CMakeLists.txt @@ -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}) diff --git a/src/Controls/SMESHControls.cxx b/src/Controls/SMESHControls.cxx deleted file mode 100644 index ff1477f75..000000000 --- a/src/Controls/SMESHControls.cxx +++ /dev/null @@ -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; -} diff --git a/src/Driver/Driver_Mesh.h b/src/Driver/Driver_Mesh.h index 64a1eb739..72f3503e1 100644 --- a/src/Driver/Driver_Mesh.h +++ b/src/Driver/Driver_Mesh.h @@ -32,7 +32,7 @@ #include #include -#ifdef WNT +#ifdef WIN32 #if defined MESHDRIVER_EXPORTS || defined MeshDriver_EXPORTS #define MESHDRIVER_EXPORT __declspec( dllexport ) #else diff --git a/src/DriverCGNS/SMESH_DriverCGNS.hxx b/src/DriverCGNS/SMESH_DriverCGNS.hxx index 421e5a098..9d6b580c0 100755 --- a/src/DriverCGNS/SMESH_DriverCGNS.hxx +++ b/src/DriverCGNS/SMESH_DriverCGNS.hxx @@ -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 diff --git a/src/DriverDAT/CMakeLists.txt b/src/DriverDAT/CMakeLists.txt index df32ce347..9d3d12747 100644 --- a/src/DriverDAT/CMakeLists.txt +++ b/src/DriverDAT/CMakeLists.txt @@ -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}) diff --git a/src/DriverDAT/DAT_Test.cxx b/src/DriverDAT/DAT_Test.cxx deleted file mode 100644 index 0027f3565..000000000 --- a/src/DriverDAT/DAT_Test.cxx +++ /dev/null @@ -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; -} diff --git a/src/DriverDAT/SMESH_DriverDAT.hxx b/src/DriverDAT/SMESH_DriverDAT.hxx index bdb65b550..ad334ddb1 100755 --- a/src/DriverDAT/SMESH_DriverDAT.hxx +++ b/src/DriverDAT/SMESH_DriverDAT.hxx @@ -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 diff --git a/src/DriverGMF/SMESH_DriverGMF.hxx b/src/DriverGMF/SMESH_DriverGMF.hxx index 73dc06dfb..55c303406 100755 --- a/src/DriverGMF/SMESH_DriverGMF.hxx +++ b/src/DriverGMF/SMESH_DriverGMF.hxx @@ -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 diff --git a/src/DriverMED/CMakeLists.txt b/src/DriverMED/CMakeLists.txt index 8d4d58a05..fcbc3a082 100644 --- a/src/DriverMED/CMakeLists.txt +++ b/src/DriverMED/CMakeLists.txt @@ -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}) diff --git a/src/DriverMED/MED_Test.cxx b/src/DriverMED/MED_Test.cxx deleted file mode 100644 index fc69fb563..000000000 --- a/src/DriverMED/MED_Test.cxx +++ /dev/null @@ -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; -} diff --git a/src/DriverMED/SMESH_DriverMED.hxx b/src/DriverMED/SMESH_DriverMED.hxx index df264c884..776e01a76 100755 --- a/src/DriverMED/SMESH_DriverMED.hxx +++ b/src/DriverMED/SMESH_DriverMED.hxx @@ -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 diff --git a/src/DriverSTL/CMakeLists.txt b/src/DriverSTL/CMakeLists.txt index 71abee231..25ff3c7c8 100644 --- a/src/DriverSTL/CMakeLists.txt +++ b/src/DriverSTL/CMakeLists.txt @@ -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}) diff --git a/src/DriverSTL/SMESH_DriverSTL.hxx b/src/DriverSTL/SMESH_DriverSTL.hxx index be4678c15..5bc2ff4c8 100755 --- a/src/DriverSTL/SMESH_DriverSTL.hxx +++ b/src/DriverSTL/SMESH_DriverSTL.hxx @@ -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 diff --git a/src/DriverSTL/STL_Test.cxx b/src/DriverSTL/STL_Test.cxx deleted file mode 100644 index 9b719f3e2..000000000 --- a/src/DriverSTL/STL_Test.cxx +++ /dev/null @@ -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; -} diff --git a/src/DriverUNV/CMakeLists.txt b/src/DriverUNV/CMakeLists.txt index 0e6b2f16b..da1a4a896 100644 --- a/src/DriverUNV/CMakeLists.txt +++ b/src/DriverUNV/CMakeLists.txt @@ -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}) diff --git a/src/DriverUNV/SMESH_DriverUNV.hxx b/src/DriverUNV/SMESH_DriverUNV.hxx index e39746f01..ed7639fb8 100755 --- a/src/DriverUNV/SMESH_DriverUNV.hxx +++ b/src/DriverUNV/SMESH_DriverUNV.hxx @@ -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 diff --git a/src/DriverUNV/UNV_Test.cxx b/src/DriverUNV/UNV_Test.cxx deleted file mode 100644 index 06055c790..000000000 --- a/src/DriverUNV/UNV_Test.cxx +++ /dev/null @@ -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"< #endif -#ifdef WNT +#ifdef WIN32 #if defined MEFISTO2D_EXPORTS #define MEFISTO2D_EXPORT __declspec( dllexport ) #else diff --git a/src/OBJECT/SMESH_Object.h b/src/OBJECT/SMESH_Object.h index dbafd97bc..a73e32bc8 100644 --- a/src/OBJECT/SMESH_Object.h +++ b/src/OBJECT/SMESH_Object.h @@ -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 diff --git a/src/SMDS/SMESH_SMDS.hxx b/src/SMDS/SMESH_SMDS.hxx index dc92d6565..57d9780f4 100755 --- a/src/SMDS/SMESH_SMDS.hxx +++ b/src/SMDS/SMESH_SMDS.hxx @@ -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 diff --git a/src/SMESH/SMESH_Gen.cxx b/src/SMESH/SMESH_Gen.cxx index 127f7cc2b..793566ed9 100644 --- a/src/SMESH/SMESH_Gen.cxx +++ b/src/SMESH/SMESH_Gen.cxx @@ -47,7 +47,7 @@ #include "memoire.h" -#ifdef WNT +#ifdef WIN32 #include #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); diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index 691b86b76..6f1edc645 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -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 "; diff --git a/src/SMESH/SMESH_Mesh.hxx b/src/SMESH/SMESH_Mesh.hxx index fa6abc0bb..c34802c1d 100644 --- a/src/SMESH/SMESH_Mesh.hxx +++ b/src/SMESH/SMESH_Mesh.hxx @@ -45,7 +45,7 @@ #include -#ifdef WNT +#ifdef WIN32 #pragma warning(disable:4251) // Warning DLL Interface ... #pragma warning(disable:4290) // Warning Exception ... #endif diff --git a/src/SMESH/SMESH_SMESH.hxx b/src/SMESH/SMESH_SMESH.hxx index ec37560b9..106eeb30e 100755 --- a/src/SMESH/SMESH_SMESH.hxx +++ b/src/SMESH/SMESH_SMESH.hxx @@ -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 diff --git a/src/SMESHClient/CMakeLists.txt b/src/SMESHClient/CMakeLists.txt index 7a7b4e92e..e103f174c 100644 --- a/src/SMESHClient/CMakeLists.txt +++ b/src/SMESHClient/CMakeLists.txt @@ -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}) diff --git a/src/SMESHClient/SMESH_Client.cxx b/src/SMESHClient/SMESH_Client.cxx index 86caddbc3..48c963d97 100644 --- a/src/SMESHClient/SMESH_Client.cxx +++ b/src/SMESHClient/SMESH_Client.cxx @@ -37,7 +37,7 @@ #include "Basics_Utils.hxx" #include "utilities.h" -#ifdef WNT +#ifdef WIN32 #include #else #include @@ -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(); diff --git a/src/SMESHClient/SMESH_Client.hxx b/src/SMESHClient/SMESH_Client.hxx index f9c3babee..a8434f421 100644 --- a/src/SMESHClient/SMESH_Client.hxx +++ b/src/SMESHClient/SMESH_Client.hxx @@ -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 diff --git a/src/SMESHDS/SMESH_Controls.hxx b/src/SMESHDS/SMESH_Controls.hxx index 70dd6a6cb..bd7871ac7 100644 --- a/src/SMESHDS/SMESH_Controls.hxx +++ b/src/SMESHDS/SMESH_Controls.hxx @@ -30,7 +30,7 @@ #include -#ifdef WNT +#ifdef WIN32 #if defined SMESHCONTROLS_EXPORTS || defined SMESHControls_EXPORTS #define SMESHCONTROLS_EXPORT __declspec( dllexport ) #else diff --git a/src/SMESHDS/SMESH_SMESHDS.hxx b/src/SMESHDS/SMESH_SMESHDS.hxx index 554c43bd0..af1f4210d 100755 --- a/src/SMESHDS/SMESH_SMESHDS.hxx +++ b/src/SMESHDS/SMESH_SMESHDS.hxx @@ -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 diff --git a/src/SMESHFiltersSelection/SMESH_Type.h b/src/SMESHFiltersSelection/SMESH_Type.h index eeb605460..0625c55bc 100644 --- a/src/SMESHFiltersSelection/SMESH_Type.h +++ b/src/SMESHFiltersSelection/SMESH_Type.h @@ -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 diff --git a/src/SMESHGUI/CMakeLists.txt b/src/SMESHGUI/CMakeLists.txt index 725c34ae2..a3673cf3f 100644 --- a/src/SMESHGUI/CMakeLists.txt +++ b/src/SMESHGUI/CMakeLists.txt @@ -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} diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index 41d4e2cf8..7cc8229b2 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -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 ) diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index 7898e44e4..2d45966ed 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -55,13 +55,13 @@ // Other includes -#ifdef WNT +#ifdef WIN32 #include #else #include #endif -#ifdef WNT +#ifdef WIN32 #define LibHandle HMODULE #define LoadLib( name ) LoadLibrary( name ) #define GetProc GetProcAddress diff --git a/src/SMESHGUI/SMESHGUI_XmlHandler.cxx b/src/SMESHGUI/SMESHGUI_XmlHandler.cxx index 417b86bcc..d2c18706b 100644 --- a/src/SMESHGUI/SMESHGUI_XmlHandler.cxx +++ b/src/SMESHGUI/SMESHGUI_XmlHandler.cxx @@ -36,6 +36,8 @@ // SALOME KERNEL includes #include +#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" || diff --git a/src/SMESHGUI/SMESH_SMESHGUI.hxx b/src/SMESHGUI/SMESH_SMESHGUI.hxx index e94861c7e..c94612f6e 100755 --- a/src/SMESHGUI/SMESH_SMESHGUI.hxx +++ b/src/SMESHGUI/SMESH_SMESHGUI.hxx @@ -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 diff --git a/src/SMESHUtils/CMakeLists.txt b/src/SMESHUtils/CMakeLists.txt index bd1f13ce4..ecdc716c0 100644 --- a/src/SMESHUtils/CMakeLists.txt +++ b/src/SMESHUtils/CMakeLists.txt @@ -41,6 +41,7 @@ SET(_link_LIBRARIES ${CAS_TKG2d} ${CAS_TKG3d} ${CAS_TKGeomBase} + ${CAS_TKGeomAlgo} SMESHDS ) diff --git a/src/SMESHUtils/SMESH_File.cxx b/src/SMESHUtils/SMESH_File.cxx index da6c5122f..79bbfbc8a 100644 --- a/src/SMESHUtils/SMESH_File.cxx +++ b/src/SMESHUtils/SMESH_File.cxx @@ -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); diff --git a/src/SMESHUtils/SMESH_File.hxx b/src/SMESHUtils/SMESH_File.hxx index c7ec72dd0..9625c0339 100644 --- a/src/SMESHUtils/SMESH_File.hxx +++ b/src/SMESHUtils/SMESH_File.hxx @@ -29,7 +29,7 @@ #include #include -#ifdef WNT +#ifdef WIN32 #include #else #include @@ -82,7 +82,7 @@ private: std::string _name; //!< file name int _size; //!< file size -#ifdef WNT +#ifdef WIN32 HANDLE _file, _mapObj; #else int _file; diff --git a/src/SMESHUtils/SMESH_MeshAlgos.hxx b/src/SMESHUtils/SMESH_MeshAlgos.hxx index 0236f6737..a02ba10dd 100644 --- a/src/SMESHUtils/SMESH_MeshAlgos.hxx +++ b/src/SMESHUtils/SMESH_MeshAlgos.hxx @@ -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 diff --git a/src/SMESHUtils/SMESH_Utils.hxx b/src/SMESHUtils/SMESH_Utils.hxx index b08279fea..815c1c435 100755 --- a/src/SMESHUtils/SMESH_Utils.hxx +++ b/src/SMESHUtils/SMESH_Utils.hxx @@ -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 diff --git a/src/SMESH_I/CMakeLists.txt b/src/SMESH_I/CMakeLists.txt index 0fc7efbac..7eaa07cf3 100644 --- a/src/SMESH_I/CMakeLists.txt +++ b/src/SMESH_I/CMakeLists.txt @@ -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}) diff --git a/src/SMESH_I/SMESH.hxx b/src/SMESH_I/SMESH.hxx index 961e54416..4565eb8b7 100644 --- a/src/SMESH_I/SMESH.hxx +++ b/src/SMESH_I/SMESH.hxx @@ -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 diff --git a/src/SMESH_I/SMESHEngine.cxx b/src/SMESH_I/SMESHEngine.cxx deleted file mode 100644 index 4b8c0cae6..000000000 --- a/src/SMESH_I/SMESHEngine.cxx +++ /dev/null @@ -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; -} diff --git a/src/SMESH_I/SMESH_2smeshpy.cxx b/src/SMESH_I/SMESH_2smeshpy.cxx index 870112bf9..44cb333a5 100644 --- a/src/SMESH_I/SMESH_2smeshpy.cxx +++ b/src/SMESH_I/SMESH_2smeshpy.cxx @@ -44,7 +44,7 @@ #include -#ifdef WNT +#ifdef WIN32 #include #else #include diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index a5b429431..32b6fecfc 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -45,14 +45,14 @@ #include #include -#ifdef WNT +#ifdef WIN32 #include #include #else #include #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 diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 7a89a00cf..c1034c7e6 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -23,7 +23,7 @@ // Author : Nicolas REJNERI // Module : SMESH -#ifdef WNT +#ifdef WIN32 #define NOMINMAX #endif diff --git a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h index 84ca48614..9b4c5319d 100644 --- a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h +++ b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h @@ -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 diff --git a/src/StdMeshers/CMakeLists.txt b/src/StdMeshers/CMakeLists.txt index 8ac5d1375..040bb90f0 100644 --- a/src/StdMeshers/CMakeLists.txt +++ b/src/StdMeshers/CMakeLists.txt @@ -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}) diff --git a/src/StdMeshers/SMESH_StdMeshers.hxx b/src/StdMeshers/SMESH_StdMeshers.hxx index 961884ace..7904c05ea 100755 --- a/src/StdMeshers/SMESH_StdMeshers.hxx +++ b/src/StdMeshers/SMESH_StdMeshers.hxx @@ -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 diff --git a/src/StdMeshersGUI/CMakeLists.txt b/src/StdMeshersGUI/CMakeLists.txt index 2725c2443..f6e38a1f9 100644 --- a/src/StdMeshersGUI/CMakeLists.txt +++ b/src/StdMeshersGUI/CMakeLists.txt @@ -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 diff --git a/src/StdMeshersGUI/SMESH_StdMeshersGUI.hxx b/src/StdMeshersGUI/SMESH_StdMeshersGUI.hxx index 3fe783bc8..a85cdc286 100755 --- a/src/StdMeshersGUI/SMESH_StdMeshersGUI.hxx +++ b/src/StdMeshersGUI/SMESH_StdMeshersGUI.hxx @@ -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 diff --git a/src/StdMeshers_I/CMakeLists.txt b/src/StdMeshers_I/CMakeLists.txt index e1a00be7f..be2903f91 100644 --- a/src/StdMeshers_I/CMakeLists.txt +++ b/src/StdMeshers_I/CMakeLists.txt @@ -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}) diff --git a/src/StdMeshers_I/SMESH_StdMeshers_I.hxx b/src/StdMeshers_I/SMESH_StdMeshers_I.hxx index b309c2df2..dc04b886c 100755 --- a/src/StdMeshers_I/SMESH_StdMeshers_I.hxx +++ b/src/StdMeshers_I/SMESH_StdMeshers_I.hxx @@ -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 diff --git a/src/StdMeshers_I/StdMeshers_i.cxx b/src/StdMeshers_I/StdMeshers_i.cxx index e67a54585..a13257107 100644 --- a/src/StdMeshers_I/StdMeshers_i.cxx +++ b/src/StdMeshers_I/StdMeshers_i.cxx @@ -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; +#ifdef ENABLE_MEFISTO else if (strcmp(aHypName, "MEFISTO_2D") == 0) aCreator = new StdHypothesisCreator_i; +#endif else if (strcmp(aHypName, "Quadrangle_2D") == 0) aCreator = new StdHypothesisCreator_i; else if (strcmp(aHypName, "Hexa_3D") == 0) diff --git a/src/Tools/MGCleanerPlug/doc/CMakeLists.txt b/src/Tools/MGCleanerPlug/doc/CMakeLists.txt index b2c2b7f6e..4e9248fd7 100755 --- a/src/Tools/MGCleanerPlug/doc/CMakeLists.txt +++ b/src/Tools/MGCleanerPlug/doc/CMakeLists.txt @@ -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}") diff --git a/src/Tools/YamsPlug/doc/CMakeLists.txt b/src/Tools/YamsPlug/doc/CMakeLists.txt index 26484b5f8..a7c38fec0 100755 --- a/src/Tools/YamsPlug/doc/CMakeLists.txt +++ b/src/Tools/YamsPlug/doc/CMakeLists.txt @@ -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}") diff --git a/src/Tools/padder/meshjob/idl/CMakeLists.txt b/src/Tools/padder/meshjob/idl/CMakeLists.txt index 0a0c6dfab..ab73887fd 100755 --- a/src/Tools/padder/meshjob/idl/CMakeLists.txt +++ b/src/Tools/padder/meshjob/idl/CMakeLists.txt @@ -24,6 +24,10 @@ INCLUDE_DIRECTORIES( ${KERNEL_INCLUDE_DIRS} ) +IF(WIN32) + ADD_DEFINITIONS(-DNOGDI) +ENDIF(WIN32) + SET(SalomeIDLSPADDER_IDLSOURCES MESHJOB.idl SPADDERPluginTest.idl diff --git a/src/Tools/padder/meshjob/impl/CMakeLists.txt b/src/Tools/padder/meshjob/impl/CMakeLists.txt index 19602bc56..8933c4fc5 100644 --- a/src/Tools/padder/meshjob/impl/CMakeLists.txt +++ b/src/Tools/padder/meshjob/impl/CMakeLists.txt @@ -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} diff --git a/src/Tools/padder/meshjob/impl/MeshJobManager_i.cxx b/src/Tools/padder/meshjob/impl/MeshJobManager_i.cxx index b0c33b0b7..8f5a39b1d 100644 --- a/src/Tools/padder/meshjob/impl/MeshJobManager_i.cxx +++ b/src/Tools/padder/meshjob/impl/MeshJobManager_i.cxx @@ -124,7 +124,7 @@ MeshJobManager_i::~MeshJobManager_i() { // ==================================================================== // #include // to get the file streams -#ifdef WNT +#ifdef WIN32 #include // to get _splitpath #include // to get _mkdir #else