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(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")

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_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)

View 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

View 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();