Search code examples
c++macosc++11clangcgal

Is CGAL compatible with the Clang compiler on OSX?


Ever since switching to std=c++11 mode (or gnu++11, which seems slightly more stable), CGAL has been exceptionally crash-prone for me on OSX (there might have been more changes made at the same time; it was very chaotic).

We are building with Clang. This very dated FAQ entry suggests that the standard OSX compiler used to have issues with CGAL.

The default compiler on Mac OS X is g++ 4.0 (at least on Tiger and Leopard). It has some bugs that are unfortunately encountered by some programs using CGAL when optimizing. We recommend that you use a more recent version of g++, such as g++ 4.2, which you can get by upgrading to the latest XCode, or using Fink.

Is this still relevant?

About to try rebuilding CGAL (and header including libraries) without optimizations, but I'd like to know what the official support is for Clang on OSX.

Update

It's looking like user error. A number of APPLE #ifdefs were added during the C++11 upgrade (for unclear reasons), and removing them seems to be fixing many of the crashes.


Solution

  • According to CGAL's website, CLANG is supported.

    http://doc.cgal.org/latest/Manual/installation.html#seccompilers