]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
disable MG_ADAPT for Windows #2
authorViktor Uzlov <viktor.uzlov@opencascade.com>
Wed, 24 Mar 2021 21:31:38 +0000 (00:31 +0300)
committerViktor Uzlov <viktor.uzlov@opencascade.com>
Wed, 24 Mar 2021 21:31:38 +0000 (00:31 +0300)
CMakeLists.txt
SalomeSMESHConfig.cmake.in
src/SMESHGUI/SMESHGUI.cxx
src/SMESH_I/MG_ADAPT_i.cxx

index 2935fe10c01434d95ed53e2e0df862cdc43b3f1f..854959040b9d8d44d5ee02e7f9ab78d1b8093777 100644 (file)
@@ -240,10 +240,16 @@ IF(WIN32)
   ENDIF(${F2C_FOUND})
 ENDIF(WIN32)
 
-#On Linux enable MG_ADAPT
-IF(NOT WIN32)
-  ADD_DEFINITIONS(-DMGADAPT_ENABLE)
-ENDIF(NOT WIN32)
+
+SET (SALOME_SMESH_DISABLE_MG_ADAPT OFF)
+IF(WIN32)
+  SET (SALOME_SMESH_DISABLE_MG_ADAPT ON)
+ENDIF()
+
+#On Windows disable MG_ADAPT
+IF(SALOME_SMESH_DISABLE_MG_ADAPT)
+  ADD_DEFINITIONS(-DDISABLE_MG_ADAPT)
+ENDIF()
 
 IF(SALOME_SMESH_ENABLE_MEFISTO)
  SET(MEFISTO2D_NAME "MEFISTO_2D")
index fba20e0cba0b86dcfbe5257c408232309dcba113..106114efdd4dd74809f2392e49bcbbcf259f5a99 100644 (file)
@@ -59,6 +59,7 @@ SET(SALOME_SMESH_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@)
+SET(SALOME_SMESH_DISABLE_MG_ADAPT   @SALOME_SMESH_DISABLE_MG_ADAPT@)
 IF(NOT WIN32)
   LIST(APPEND SMESH_DEFINITIONS "-DENABLE_MEFISTO")
 ENDIF(NOT WIN32)
index 0b16abc3ec25a779f5d045dae1e187d84b5f4947..a5ca8c86e47382cac80c24cd6e7cdbd692671113 100644 (file)
@@ -3044,7 +3044,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
       break;
     }
   // Adaptation - begin
-#if defined(MGADAPT_ENABLE)
+#ifndef DISABLE_MG_ADAPT
   case SMESHOp::OpMGAdapt:
     {
       if ( isStudyLocked() )
@@ -4296,7 +4296,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createSMESHAction( SMESHOp::OpDisableAutoColor, "DISABLE_AUTO_COLOR" );
 
   // Adaptation - begin
-#if defined(MGADAPT_ENABLE)
+#ifndef DISABLE_MG_ADAPT
   createSMESHAction( SMESHOp::OpMGAdapt,              "MG_ADAPT",                "ICON_MG_ADAPT" );
 #endif
   // Adaptation - end
@@ -4516,7 +4516,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createMenu( SMESHOp::OpPatternMapping,         modifyId, -1 );
 
   // Adaptation - begin
-#if defined(MGADAPT_ENABLE)
+#ifndef DISABLE_MG_ADAPT
   createMenu( SMESHOp::OpMGAdapt,              adaptId, -1 );
 #endif
   // Adaptation - end
@@ -4665,7 +4665,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   createTool( SMESHOp::OpPatternMapping,         modifyTb );
 
   // Adaptation - begin
-#if defined(MGADAPT_ENABLE)
+#ifndef DISABLE_MG_ADAPT
   int adaptTb      = createTool( tr( "TB_ADAPTATION" ),QString( "SMESHAdaptationToolbar" ) ) ;
   createTool( SMESHOp::OpMGAdapt,              adaptTb );
 #endif
@@ -4753,7 +4753,7 @@ void SMESHGUI::initialize( CAM_Application* app )
   popupMgr()->insert( separator(), -1, 0 );
 
   // Adaptation - begin
-#if defined(MGADAPT_ENABLE)
+#ifndef DISABLE_MG_ADAPT
   createPopupItem( SMESHOp::OpMGAdapt,              OB, mesh );
 #endif
   // Adaptation - end
@@ -6027,7 +6027,7 @@ LightApp_Operation* SMESHGUI::createOperation( const int id ) const
     op = new SMESHGUI_Add0DElemsOnAllNodesOp();
     break;
   // Adaptation - begin
-#if defined(MGADAPT_ENABLE)
+#ifndef DISABLE_MG_ADAPT
   case SMESHOp::OpMGAdapt:
     break;
 #endif
index 8c20914f7625e9550c89b930b8b7dcee01e95b61..7654aba60e63e87c81667ef41fc4f894518c2f54 100644 (file)
@@ -96,7 +96,7 @@ void MG_ADAPT_i::copyHypothesisDataFromImpl(const ::MG_ADAPT::MgAdaptHypothesisD
 
 SMESH::MG_ADAPT_ptr SMESH_Gen_i::CreateMG_ADAPT()
 {
-#if defined(MGADAPT_ENABLE)
+#ifndef DISABLE_MG_ADAPT
   SMESH::MG_ADAPT_i* aMGadapt = new SMESH::MG_ADAPT_i();
   SMESH::MG_ADAPT_var anObj = aMGadapt->_this();
   return anObj._retn();
@@ -106,7 +106,7 @@ SMESH::MG_ADAPT_ptr SMESH_Gen_i::CreateMG_ADAPT()
 }
 SMESH::MG_ADAPT_ptr SMESH_Gen_i::CreateAdaptationHypothesis()
 {
-#if defined(MGADAPT_ENABLE)
+#ifndef DISABLE_MG_ADAPT
   SMESH::MG_ADAPT_i* aMGadapt = new SMESH::MG_ADAPT_i();
   SMESH::MG_ADAPT_var anObj = aMGadapt->_this();
   return anObj._retn();
@@ -116,7 +116,7 @@ SMESH::MG_ADAPT_ptr SMESH_Gen_i::CreateAdaptationHypothesis()
 }
 SMESH::MG_ADAPT_OBJECT_ptr SMESH_Gen_i::Adaptation( const char* adaptationType)
 {
-#if defined(MGADAPT_ENABLE)
+#ifndef DISABLE_MG_ADAPT
   if (!strcmp(adaptationType, "MG_Adapt"))
   {
     SMESH::MG_ADAPT_OBJECT_i* mg_adapt_object = new SMESH::MG_ADAPT_OBJECT_i();