From ae0b45b79f38f645536bd62a91573778a2fdf3f8 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 6 Apr 2018 16:07:21 +0200 Subject: [PATCH] Fix a compilation bug if Mesh_3 and Mesh_2 are both used The conflict is withing the Boost parameters defined for Lloyd 2D and Lloyd 3D. --- Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h | 6 +- .../include/CGAL/Mesh_3/global_parameters.h | 6 +- .../include/CGAL/Meshes/global_parameters.h | 59 +++++++++++++++++++ 3 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 Mesher_level/include/CGAL/Meshes/global_parameters.h diff --git a/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h b/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h index 48b1457c19f..1db8ca4d089 100644 --- a/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h +++ b/Mesh_2/include/CGAL/lloyd_optimize_mesh_2.h @@ -34,6 +34,8 @@ #include +#include + #if ( defined( __clang__ ) || (BOOST_GCC >= 40600 ) ) && (BOOST_VERSION < 106000) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-variable" @@ -57,10 +59,6 @@ namespace parameters BOOST_PARAMETER_NAME( cdt ) -BOOST_PARAMETER_NAME( (max_iteration_number, tag) max_iteration_number_ ) -BOOST_PARAMETER_NAME( (convergence, tag) convergence_) -BOOST_PARAMETER_NAME( (time_limit, tag) time_limit_ ) -BOOST_PARAMETER_NAME( (freeze_bound, tag) freeze_bound_) BOOST_PARAMETER_NAME( (seeds_begin, tag) seeds_begin_) BOOST_PARAMETER_NAME( (seeds_end, tag) seeds_end_) BOOST_PARAMETER_NAME( (mark, tag) mark_) diff --git a/Mesh_3/include/CGAL/Mesh_3/global_parameters.h b/Mesh_3/include/CGAL/Mesh_3/global_parameters.h index 60fa12b61be..a6f5dc5be08 100644 --- a/Mesh_3/include/CGAL/Mesh_3/global_parameters.h +++ b/Mesh_3/include/CGAL/Mesh_3/global_parameters.h @@ -32,6 +32,8 @@ #include #include +#include + #ifdef BOOST_PARAMETER_MAX_ARITY # if (BOOST_PARAMETER_MAX_ARITY < 12) # error "BOOST_PARAMETER_MAX_ARITY must be at least 12 for CGAL::Mesh_3" @@ -75,14 +77,10 @@ BOOST_PARAMETER_NAME( c3t3 ) BOOST_PARAMETER_NAME( domain ) BOOST_PARAMETER_NAME( criteria ) -BOOST_PARAMETER_NAME( (time_limit, tag) time_limit_ ) BOOST_PARAMETER_NAME( (sliver_bound, tag) sliver_bound_) BOOST_PARAMETER_NAME( (sliver_criterion, tag) sliver_criterion_) BOOST_PARAMETER_NAME( (perturbation_vector, tag) perturbation_vector_) -BOOST_PARAMETER_NAME( (freeze_bound, tag) freeze_bound_) BOOST_PARAMETER_NAME( (do_freeze, tag) do_freeze_) -BOOST_PARAMETER_NAME( (max_iteration_number, tag) max_iteration_number_ ) -BOOST_PARAMETER_NAME( (convergence, tag) convergence_) BOOST_PARAMETER_NAME( (mesh_topology, tag) mesh_topology_) diff --git a/Mesher_level/include/CGAL/Meshes/global_parameters.h b/Mesher_level/include/CGAL/Meshes/global_parameters.h new file mode 100644 index 00000000000..87cadb57469 --- /dev/null +++ b/Mesher_level/include/CGAL/Meshes/global_parameters.h @@ -0,0 +1,59 @@ +// Copyright (c) 2009-2018 GeometryFactory (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; either version 3 of the License, +// or (at your option) any later version. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0+ +// +// Author(s) : Jane Tournois, Laurent Rineau +// + +#ifndef CGAL_MESHES_GLOBAL_PARAMETERS_H +#define CGAL_MESHES_GLOBAL_PARAMETERS_H + +#include + +#include + +#include +#include + +#if ( defined( __clang__ ) || (BOOST_GCC >= 40600 ) ) && (BOOST_VERSION < 106000) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + +namespace CGAL +{ +namespace parameters +{ + +BOOST_PARAMETER_NAME( (max_iteration_number, tag) max_iteration_number_ ) +BOOST_PARAMETER_NAME( (convergence, tag) convergence_) +BOOST_PARAMETER_NAME( (time_limit, tag) time_limit_ ) +BOOST_PARAMETER_NAME( (freeze_bound, tag) freeze_bound_) + +}//end namespace parameters +}//end namespace CGAL + +//CGAL_PRAGMA_DIAG_POP +#if ( defined( __clang__ ) || (BOOST_GCC >= 40600 ) ) && (BOOST_VERSION < 106000) +#pragma GCC diagnostic pop +#endif + + +#include + +#endif