Skip to content

Commit

Permalink
+ allow to load PartDesign even if PySide is not found, suppress MinG…
Browse files Browse the repository at this point in the history
…W warnings
  • Loading branch information
wwmayer committed Aug 30, 2014
1 parent cef2c1b commit 7c89591
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Expand Up @@ -702,8 +702,13 @@ ELSE(MSVC)
MESSAGE(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
ENDIF(MSVC)
IF(MINGW)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mthreads")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthreads")
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12477
# Actually '-Wno-inline-dllimport' should work to suppress warnings of the form:
# inline function 'foo' is declared as dllimport: attribute ignored
# But it doesn't work with MinGW gcc 4.5.0 while using '-Wno-attributes' seems to
# do the trick.
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mthreads -Wno-attributes")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthreads -Wno-attributes")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -mthreads -Wl,--export-all-symbols")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -mthreads -Wl,--export-all-symbols")
# http://stackoverflow.com/questions/8375310/warning-auto-importing-has-been-activated-without-enable-auto-import-specifie
Expand Down
6 changes: 4 additions & 2 deletions src/Mod/PartDesign/Gui/Workbench.cpp
Expand Up @@ -191,11 +191,13 @@ Gui::MenuItem* Workbench::setupMenuBar() const
<< "PartDesign_LinearPattern"
<< "PartDesign_PolarPattern"
// << "PartDesign_Scaled"
<< "PartDesign_MultiTransform"
<< "PartDesign_InvoluteGear";
<< "PartDesign_MultiTransform";
// For 0.13 a couple of python packages like numpy, matplotlib and others
// are not deployed with the installer on Windows. Thus, the WizardShaft is
// not deployed either hence the check for the existence of the command.
if (Gui::Application::Instance->commandManager().getCommandByName("PartDesign_InvoluteGear")) {
*part << "PartDesign_InvoluteGear";
}
if (Gui::Application::Instance->commandManager().getCommandByName("PartDesign_WizardShaft")) {
*part << "Separator" << "PartDesign_WizardShaft";
}
Expand Down
7 changes: 5 additions & 2 deletions src/Mod/PartDesign/InitGui.py
Expand Up @@ -69,10 +69,13 @@ def Initialize(self):
try:
from WizardShaft import WizardShaft
except:
print "Wizard shaft not installed"
print "Wizard shaft module cannot be loaded"
import PartDesignGui
import PartDesign
import InvoluteGearFeature
try:
import InvoluteGearFeature
except:
print "Involute gear module cannot be loaded"
def GetClassName(self):
return "PartDesignGui::Workbench"

Expand Down

0 comments on commit 7c89591

Please sign in to comment.