disable MG_ADAPT for Windows #2

This commit is contained in:
Viktor Uzlov 2021-03-25 00:31:38 +03:00
parent 32676d52c7
commit a0b7319830
4 changed files with 20 additions and 13 deletions

View File

@ -240,10 +240,16 @@ IF(WIN32)
ENDIF(${F2C_FOUND}) ENDIF(${F2C_FOUND})
ENDIF(WIN32) ENDIF(WIN32)
#On Linux enable MG_ADAPT
IF(NOT WIN32) SET (SALOME_SMESH_DISABLE_MG_ADAPT OFF)
ADD_DEFINITIONS(-DMGADAPT_ENABLE) IF(WIN32)
ENDIF(NOT 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) IF(SALOME_SMESH_ENABLE_MEFISTO)
SET(MEFISTO2D_NAME "MEFISTO_2D") SET(MEFISTO2D_NAME "MEFISTO_2D")

View 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_CGNS @SALOME_SMESH_USE_CGNS@)
SET(SALOME_SMESH_USE_TBB @SALOME_SMESH_USE_TBB@) SET(SALOME_SMESH_USE_TBB @SALOME_SMESH_USE_TBB@)
SET(SALOME_SMESH_ENABLE_MEFISTO @SALOME_SMESH_ENABLE_MEFISTO@) SET(SALOME_SMESH_ENABLE_MEFISTO @SALOME_SMESH_ENABLE_MEFISTO@)
SET(SALOME_SMESH_DISABLE_MG_ADAPT @SALOME_SMESH_DISABLE_MG_ADAPT@)
IF(NOT WIN32) IF(NOT WIN32)
LIST(APPEND SMESH_DEFINITIONS "-DENABLE_MEFISTO") LIST(APPEND SMESH_DEFINITIONS "-DENABLE_MEFISTO")
ENDIF(NOT WIN32) ENDIF(NOT WIN32)

View File

@ -3044,7 +3044,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
break; break;
} }
// Adaptation - begin // Adaptation - begin
#if defined(MGADAPT_ENABLE) #ifndef DISABLE_MG_ADAPT
case SMESHOp::OpMGAdapt: case SMESHOp::OpMGAdapt:
{ {
if ( isStudyLocked() ) if ( isStudyLocked() )
@ -4296,7 +4296,7 @@ void SMESHGUI::initialize( CAM_Application* app )
createSMESHAction( SMESHOp::OpDisableAutoColor, "DISABLE_AUTO_COLOR" ); createSMESHAction( SMESHOp::OpDisableAutoColor, "DISABLE_AUTO_COLOR" );
// Adaptation - begin // Adaptation - begin
#if defined(MGADAPT_ENABLE) #ifndef DISABLE_MG_ADAPT
createSMESHAction( SMESHOp::OpMGAdapt, "MG_ADAPT", "ICON_MG_ADAPT" ); createSMESHAction( SMESHOp::OpMGAdapt, "MG_ADAPT", "ICON_MG_ADAPT" );
#endif #endif
// Adaptation - end // Adaptation - end
@ -4516,7 +4516,7 @@ void SMESHGUI::initialize( CAM_Application* app )
createMenu( SMESHOp::OpPatternMapping, modifyId, -1 ); createMenu( SMESHOp::OpPatternMapping, modifyId, -1 );
// Adaptation - begin // Adaptation - begin
#if defined(MGADAPT_ENABLE) #ifndef DISABLE_MG_ADAPT
createMenu( SMESHOp::OpMGAdapt, adaptId, -1 ); createMenu( SMESHOp::OpMGAdapt, adaptId, -1 );
#endif #endif
// Adaptation - end // Adaptation - end
@ -4665,7 +4665,7 @@ void SMESHGUI::initialize( CAM_Application* app )
createTool( SMESHOp::OpPatternMapping, modifyTb ); createTool( SMESHOp::OpPatternMapping, modifyTb );
// Adaptation - begin // Adaptation - begin
#if defined(MGADAPT_ENABLE) #ifndef DISABLE_MG_ADAPT
int adaptTb = createTool( tr( "TB_ADAPTATION" ),QString( "SMESHAdaptationToolbar" ) ) ; int adaptTb = createTool( tr( "TB_ADAPTATION" ),QString( "SMESHAdaptationToolbar" ) ) ;
createTool( SMESHOp::OpMGAdapt, adaptTb ); createTool( SMESHOp::OpMGAdapt, adaptTb );
#endif #endif
@ -4753,7 +4753,7 @@ void SMESHGUI::initialize( CAM_Application* app )
popupMgr()->insert( separator(), -1, 0 ); popupMgr()->insert( separator(), -1, 0 );
// Adaptation - begin // Adaptation - begin
#if defined(MGADAPT_ENABLE) #ifndef DISABLE_MG_ADAPT
createPopupItem( SMESHOp::OpMGAdapt, OB, mesh ); createPopupItem( SMESHOp::OpMGAdapt, OB, mesh );
#endif #endif
// Adaptation - end // Adaptation - end
@ -6027,7 +6027,7 @@ LightApp_Operation* SMESHGUI::createOperation( const int id ) const
op = new SMESHGUI_Add0DElemsOnAllNodesOp(); op = new SMESHGUI_Add0DElemsOnAllNodesOp();
break; break;
// Adaptation - begin // Adaptation - begin
#if defined(MGADAPT_ENABLE) #ifndef DISABLE_MG_ADAPT
case SMESHOp::OpMGAdapt: case SMESHOp::OpMGAdapt:
break; break;
#endif #endif

View File

@ -96,7 +96,7 @@ void MG_ADAPT_i::copyHypothesisDataFromImpl(const ::MG_ADAPT::MgAdaptHypothesisD
SMESH::MG_ADAPT_ptr SMESH_Gen_i::CreateMG_ADAPT() 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_i* aMGadapt = new SMESH::MG_ADAPT_i();
SMESH::MG_ADAPT_var anObj = aMGadapt->_this(); SMESH::MG_ADAPT_var anObj = aMGadapt->_this();
return anObj._retn(); return anObj._retn();
@ -106,7 +106,7 @@ SMESH::MG_ADAPT_ptr SMESH_Gen_i::CreateMG_ADAPT()
} }
SMESH::MG_ADAPT_ptr SMESH_Gen_i::CreateAdaptationHypothesis() 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_i* aMGadapt = new SMESH::MG_ADAPT_i();
SMESH::MG_ADAPT_var anObj = aMGadapt->_this(); SMESH::MG_ADAPT_var anObj = aMGadapt->_this();
return anObj._retn(); 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) 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")) if (!strcmp(adaptationType, "MG_Adapt"))
{ {
SMESH::MG_ADAPT_OBJECT_i* mg_adapt_object = new SMESH::MG_ADAPT_OBJECT_i(); SMESH::MG_ADAPT_OBJECT_i* mg_adapt_object = new SMESH::MG_ADAPT_OBJECT_i();