Subject: CGAL users discussion list
List archive
- From: Mark Brand <>
- To:
- Subject: [cgal-discuss] [PATCH] prevent Qt's moc from choking on BOOST_JOIN
- Date: Fri, 18 Nov 2011 00:47:13 +0100
Hi,
When building CGAL in mingw-cross-env, I noticed that the build failed if Qt happened to be present. This turned out to be caused by Qt's moc choking on a Boost header:
<includedir>/boost/type_traits/detail/has_binary_operator.hp:50:
Parse error at "BOOST_JOIN"
I have seen this with Qt 4.8.0 and Qt 4.7.4.
It seems reasonable to avoid this problem by letting moc skip these headers, which is what "#ifndef Q_MOC_RUN" does in the patch below.
The patch applies to CGAL-3.8.
regards,
Mark
From 5a7fc183023450d520993a36402a8783d709b683 Mon Sep 17 00:00:00 2001
From: Mark Brand
<>
Date: Fri, 18 Nov 2011 00:08:25 +0100
Subject: [PATCH] prevent Qt's moc from choking on BOOST_JOIN
---
include/CGAL/Qt/GraphicsItem.h | 2 ++
include/CGAL/Qt/GraphicsViewInput.h | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/include/CGAL/Qt/GraphicsItem.h b/include/CGAL/Qt/GraphicsItem.h
index 7348d02..807e200 100644
--- a/include/CGAL/Qt/GraphicsItem.h
+++ b/include/CGAL/Qt/GraphicsItem.h
@@ -24,7 +24,9 @@
#include <CGAL/auto_link/Qt4.h>
#include <QObject>
#include <QGraphicsItem>
+#ifndef Q_MOC_RUN
#include <CGAL/Object.h>
+#endif
diff --git a/include/CGAL/Qt/GraphicsViewInput.h b/include/CGAL/Qt/GraphicsViewInput.h
index 6c912cc..a5c5da8 100644
--- a/include/CGAL/Qt/GraphicsViewInput.h
+++ b/include/CGAL/Qt/GraphicsViewInput.h
@@ -22,7 +22,9 @@
#define CGAL_QT_GRAPHICS_VIEW_INPUT_H
#include <CGAL/auto_link/Qt4.h>
+#ifndef Q_MOC_RUN
#include <CGAL/Object.h>
+#endif
#include <QObject>
namespace CGAL {
--
1.7.7.3
- [cgal-discuss] [PATCH] prevent Qt's moc from choking on BOOST_JOIN, Mark Brand, 11/18/2011
- Re: [cgal-discuss] [PATCH] prevent Qt's moc from choking on BOOST_JOIN, Laurent Rineau (GeometryFactory), 11/18/2011
- Re: [cgal-discuss] [PATCH] prevent Qt's moc from choking on BOOST_JOIN, Vivien Clauzon, 11/18/2011
- Re: [cgal-discuss] [PATCH] prevent Qt's moc from choking on BOOST_JOIN, Mark Brand, 11/18/2011
- Re: [cgal-discuss] [PATCH] prevent Qt's moc from choking on BOOST_JOIN, Panagiotis Foteinos, 11/18/2011
- Re: Re: [cgal-discuss] [PATCH] prevent Qt's moc from choking on BOOST_JOIN, Laurent Rineau (GeometryFactory), 11/18/2011
- Re: [cgal-discuss] [PATCH] prevent Qt's moc from choking on BOOST_JOIN, Panagiotis Foteinos, 11/18/2011
- Re: [cgal-discuss] [PATCH] prevent Qt's moc from choking on BOOST_JOIN, Mark Brand, 11/18/2011
- Re: [cgal-discuss] [PATCH] prevent Qt's moc from choking on BOOST_JOIN, Vivien Clauzon, 11/18/2011
- Re: [cgal-discuss] [PATCH] prevent Qt's moc from choking on BOOST_JOIN, Laurent Rineau (GeometryFactory), 11/21/2011
- Re: [cgal-discuss] [PATCH] prevent Qt's moc from choking on BOOST_JOIN, Panagiotis Foteinos, 11/21/2011
- <Possible follow-up(s)>
- Re: [cgal-discuss] [PATCH] prevent Qt's moc from choking on BOOST_JOIN, au9ustine, 11/20/2011
- Re: [cgal-discuss] [PATCH] prevent Qt's moc from choking on BOOST_JOIN, Laurent Rineau (GeometryFactory), 11/18/2011
Archive powered by MHonArc 2.6.16.