Skip to content

Commit

Permalink
Add workaround for trusty ARM builds
Browse files Browse the repository at this point in the history
This workaround checks compiler version, ARM presence, and OSG version
to disable 3D visualization only on this target (the combination does
not work properly).
  • Loading branch information
sjoelund committed Nov 9, 2016
1 parent 45442e0 commit fdac34c
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 10 deletions.
4 changes: 2 additions & 2 deletions OMEdit/OMEditGUI/Animation/AnimationWindow.h
Expand Up @@ -44,15 +44,15 @@
#include <osg/Vec3>
#include <osgDB/ReadFile>
#include <osgGA/MultiTouchTrackballManipulator>
#include <../../osgQt/OMEdit_GraphicsWindowQt.h>
#include <osg/Version>
#include <osgViewer/CompositeViewer>
#include <osgViewer/View>
#include <osgViewer/ViewerEventHandlers>
#include "MainWindow.h"
#include <../../osgQt/OMEdit_GraphicsWindowQt.h>

#include "Utilities.h"
#include "AnimationUtil.h"
#include "MainWindow.h"
#include "OMPlot.h"
#include "Visualizer.h"
#include "VisualizerMAT.h"
Expand Down
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/Component/ComponentProperties.cpp
Expand Up @@ -32,6 +32,7 @@
* @author Adeel Asghar <adeel.asghar@liu.se>
*/

#include "MainWindow.h"
#include "ComponentProperties.h"
#include "Commands.h"

Expand Down
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/Component/Transformation.cpp
Expand Up @@ -32,6 +32,7 @@
* @author Adeel Asghar <adeel.asghar@liu.se>
*/

#include "MainWindow.h"
#include "Transformation.h"
#include "Component.h"

Expand Down
2 changes: 1 addition & 1 deletion OMEdit/OMEditGUI/Debugger/Breakpoints/BreakpointMarker.cpp
Expand Up @@ -32,8 +32,8 @@
*
*/

#include "BreakpointMarker.h"
#include "BreakpointsWidget.h"
#include "BreakpointMarker.h"

BreakpointMarker::BreakpointMarker(const QString &fileName, int lineNumber, BreakpointsTreeModel *pBreakpointsTreeModel)
: ITextMark()
Expand Down
2 changes: 1 addition & 1 deletion OMEdit/OMEditGUI/Debugger/Locals/ModelicaValue.cpp
Expand Up @@ -31,8 +31,8 @@
* @author Adeel Asghar <adeel.asghar@liu.se>
*/

#include "ModelicaValue.h"
#include "LocalsWidget.h"
#include "ModelicaValue.h"
#include "CommandFactory.h"

ModelicaValue::ModelicaValue(LocalsTreeItem *pLocalsTreeItem)
Expand Down
3 changes: 2 additions & 1 deletion OMEdit/OMEditGUI/MainWindow.cpp
Expand Up @@ -32,9 +32,10 @@
* @author Adeel Asghar <adeel.asghar@liu.se>
*/

#include "MainWindow.h"

#include <QtSvg/QSvgGenerator>

#include "MainWindow.h"
#include "VariablesWidget.h"
#include "Helper.h"
#include "SimulationOutputWidget.h"
Expand Down
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/OMC/OMCProxy.cpp
Expand Up @@ -53,6 +53,7 @@ void omc_Main_setWindowsPaths(threadData_t *threadData, void* _inOMHome);
#include <stdlib.h>
#include <iostream>

#include "MainWindow.h"
#include "OMCProxy.h"
#include "simulation_options.h"
#include "omc_error.h"
Expand Down
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/Plotting/PlotWindowContainer.cpp
Expand Up @@ -32,6 +32,7 @@
* @author Adeel Asghar <adeel.asghar@liu.se>
*/

#include "MainWindow.h"
#include "PlotWindowContainer.h"
#include "VariablesWidget.h"

Expand Down
33 changes: 28 additions & 5 deletions configure.ac
Expand Up @@ -38,11 +38,34 @@ FIND_OPENMODELICAHOME()
FIND_LIBOPENMODELICACOMPILER()
FIND_LIBOMQWT()

WITH_OSG=1
AC_CHECK_HEADERS(osg/Vec3f, [], [WITH_OSG=0])
AC_CHECK_HEADERS(osg/GraphicsContext, [], [WITH_OSG=0])
AC_CHECK_HEADERS(osg/Matrix, [], [WITH_OSG=0])
AC_CHECK_HEADERS(osg/Uniform, [], [WITH_OSG=0])
if test -z "$WITH_OSG"; then
WITH_OSG=1
else
AC_MSG_RESULT([WITH_OSG=$WITH_OSG])
fi
if test "$WITH_OSG" = 1; then
AC_PREPROC_IFELSE(
[AC_LANG_PROGRAM([[]], [[]])],
[],
[AC_MSG_ERROR([C++ preprocessor broken?])]
)
AC_MSG_CHECKING([for osg/qt include order bugs])
AC_PREPROC_IFELSE(
[AC_LANG_PROGRAM([[
#include <osg/Version>
#if __arm__==1 && __clang_major__==3 && __clang_minor__==4 && OPENSCENEGRAPH_MAJOR_VERSION==3 && OPENSCENEGRAPH_MINOR_VERSION==2 && OPENSCENEGRAPH_PATCH_VERSION==0
#error "ARM+clang 3.4+OSG3.2.0 does not work together"
#endif
]],
[[]])],
[AC_MSG_RESULT([OK])],
[AC_MSG_RESULT([no (giving up on OSG)]); WITH_OSG=0]
)
CPPFLAGS="$OLD_CPPFLAGS"
fi
if test "$WITH_OSG" = 1; then
AC_CHECK_HEADERS(osg/Uniform, [], [WITH_OSG=0])
fi

if test "$WITH_OSG" = 0; then
CPPFLAGS="$CPPFLAGS -DWITHOUT_OSG"
Expand Down

0 comments on commit fdac34c

Please sign in to comment.