diff options
author | Marius Kintel <marius@kintel.net> | 2011-12-06 00:43:44 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-12-06 00:43:44 (GMT) |
commit | bb0ec94290733835df0716531c30460fc5b5210a (patch) | |
tree | 97e0c552ac7d7a19d9819a89c9277e461ff7c074 /src/cgal.h | |
parent | 65a5aa23bfd78718972082f82eb7366d01a968a6 (diff) |
#undef NDEBUG before including any CGAL headers
Diffstat (limited to 'src/cgal.h')
-rw-r--r-- | src/cgal.h | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -16,6 +16,16 @@ using boost::uintmax_t; #error CGAL >= 3.6 is required! #endif +// NDEBUG must be disabled when including CGAL headers, otherwise CGAL assertions +// will not be thrown, causing OpenSCAD's CGAL error checking to fail. +// To be on the safe side, this has to be done when including any CGAL header file. +// FIXME: It might be possible to rewrite the error checking to get rid of this +// requirement. kintel 20111206. +#ifdef NDEBUG +#define PREV_NDEBUG NDEBUG +#undef NDEBUG +#endif + #include <CGAL/Gmpq.h> #include <CGAL/Extended_cartesian.h> #include <CGAL/Nef_polyhedron_2.h> @@ -26,6 +36,11 @@ using boost::uintmax_t; #include <CGAL/Exact_predicates_exact_constructions_kernel.h> #include <CGAL/Polygon_2.h> #include <CGAL/Polygon_with_holes_2.h> +#include <CGAL/minkowski_sum_2.h> +#include <CGAL/minkowski_sum_3.h> + +#include <CGAL/assertions_behaviour.h> +#include <CGAL/exceptions.h> typedef CGAL::Gmpq NT; typedef CGAL::Extended_cartesian<NT> CGAL_Kernel2; @@ -44,6 +59,10 @@ typedef CGAL::Polyhedron_3<CGAL_Kernel3> CGAL_Polyhedron; typedef CGAL_Polyhedron::HalfedgeDS CGAL_HDS; typedef CGAL::Polyhedron_incremental_builder_3<CGAL_HDS> CGAL_Polybuilder; +#ifdef PREV_NDEBUG +#define NDEBUG PREV_NDEBUG +#endif + #endif /* ENABLE_CGAL */ #endif |