Commit 335dff03 authored by Mario Hlawitschka's avatar Mario Hlawitschka
Browse files

[FIX] compile fix for combinations of qt versions around 4.8 (qt < 5.0) and boost >= 1.48

QT's moc in these versions < 5.0 is not able to perform proper macro substitution, which
is required by some boost includes. This lead to compile errors such as:
opt/local/include/boost/type_traits/detail/has_binary_operator.hp:50: Parse error at "BOOST_JOIN"
The errors can be prevented by removing the appropriate (boost) include files from the
moc parser using the pre-defined macro.
To avoid excluding these parts in the OpenWalnut core, I decided to exclude the files in
the files parsed by moc directly, i.e., all files in the qt4gui that seem to be an issue.
parent ee3660b4
......@@ -27,9 +27,18 @@
#include <QtGui/QToolBar>
#ifndef Q_MOC_RUN
// There is an issue with the moc compiler and some boost headers where
// moc for qt versions < 5.0 is not able to do a macro substitution.
// The issue occurs in the boost library versions 1.48 and higher,
// and is tested in boost version 1.52 using moc version 4.8.4
// Excluding the relevant headers removes the problem.
#include "core/kernel/WModuleCombinerTypes.h"
#endif
#ifndef Q_MOC_RUN
#include "WQtCombinerActionList.h"
#endif
#include "WQtToolBarBase.h"
class WMainWindow;
......
......@@ -30,7 +30,14 @@
#include <QtGui/QAction>
#include <QtGui/QMessageBox>
#ifndef Q_MOC_RUN
// There is an issue with the moc compiler and some boost headers where
// moc for qt versions < 5.0 is not able to do a macro substitution.
// The issue occurs in the boost library versions 1.48 and higher,
// and is tested in boost version 1.52 using moc version 4.8.4
// Excluding the relevant headers removes the problem.
#include "WQt4Gui.h"
#endif
class WMainWindow;
......
......@@ -44,9 +44,16 @@
#include "WPropertyTransferFunctionWidget.h"
#include "WPropertyStructWidget.h"
#ifndef Q_MOC_RUN
// There is an issue with the moc compiler and some boost headers where
// moc for qt versions < 5.0 is not able to do a macro substitution.
// The issue occurs in the boost library versions 1.48 and higher,
// and is tested in boost version 1.52 using moc version 4.8.4
// Excluding the relevant headers removes the problem.
#include "core/common/WPropertyVariable.h"
#include "core/common/WPropertyStruct.h"
#include "core/common/WPropertyGroupBase.h"
#endif
/**
* Container widget to contain a number of properties for the module context in the control panel.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment