Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Re: Compiling a basic CGAL program in C++ on Mac OS X 10.7.2

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Re: Compiling a basic CGAL program in C++ on Mac OS X 10.7.2


Chronological Thread 
  • From: "Laurent Rineau (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Re: Compiling a basic CGAL program in C++ on Mac OS X 10.7.2
  • Date: Wed, 15 Feb 2012 12:16:33 +0100
  • Organization: GeometryFactory

Le mercredi 15 février 2012 03:06:27 Bagga a écrit :
> I tried that but now when I do *make* WITH_CGAL_QT4 =ON using cmake-gui it
> gives me these errors:
>
> singhg@~/CGAL-3.9
> $ make
> Scanning dependencies of target CGAL
> [ 5%] Building CXX object src/CGAL/CMakeFiles/CGAL.dir/all_files.cpp.o
> Linking CXX shared library ../../lib/libCGAL.dylib
> [ 5%] Built target CGAL
> Scanning dependencies of target CGAL_Core
> [ 10%] Building CXX object src/Core/CMakeFiles/CGAL_Core.dir/all_files.cpp.o
> Linking CXX shared library ../../lib/libCGAL_Core.dylib
> [ 10%] Built target CGAL_Core
> Scanning dependencies of target CGAL_ImageIO
> [ 15%] Building CXX object
> src/ImageIO/CMakeFiles/CGAL_ImageIO.dir/all_files.cpp.o
> Linking CXX shared library ../../lib/libCGAL_ImageIO.dylib
> [ 15%] Built target CGAL_ImageIO
> [ 20%] Generating qrc_Triangulation_2.cxx
> [ 25%] Generating __/__/include/CGAL/Qt/moc_GraphicsViewNavigation.cxx
> [ 30%] Generating __/__/include/CGAL/Qt/moc_DemosMainWindow.cxx
> [ 35%] Generating __/__/include/CGAL/Qt/moc_GraphicsItem.cxx
> usr/local/Cellar/boost/1.48.0/include/boost/type_traits/detail/has_binary_op
> erator.hp:50: Parse error at "BOOST_JOIN"
> make[2]: *** [src/Qt4/__/__/include/CGAL/Qt/moc_GraphicsItem.cxx] Error 1
> make[1]: *** [src/Qt4/CMakeFiles/CGAL_Qt4.dir/all] Error 2
> make: *** [all] Error 2

There is bug in the Qt4 moc tool, that makes it incompatible with some Boost
files from Boost-1.48.

In CGAL-4.0-beta1, we have introduced a workaround. Copy the following lines
near the beginning of CGAL-3.9/include/CGAL/config.h, if you want to fix that
bug keeping CGAL-3.9:


// Workaround to the following bug:
// https://bugreports.qt.nokia.com/browse/QTBUG-22829
#ifdef Q_MOC_RUN
// When Qt moc runs on CGAL files, do not process
// <boost/type_traits/has_operator.hpp>
# define BOOST_TT_HAS_OPERATOR_HPP_INCLUDED
#endif


I am not really proud of that workaround of mines, but at least it works.

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/




Archive powered by MHonArc 2.6.16.

Top of Page