From 90414d195fc457d07d39976adf9878c5f57ec5d0 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 9 Aug 2012 15:34:08 +0000 Subject: [PATCH] Move to (in the Installation package) That is a followup to the following commit: | ------------------------------------------------------------------------ | r71090 | pmoeller | 2012-08-07 13:04:32 +0200 (Tue, 07 Aug 2012) | 6 lines | Changed paths: | M /branches/next/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h | M /branches/next/Circulator/include/CGAL/circulator.h | M /branches/next/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/Reflex_vertex_searcher.h | M /branches/next/Intersections_3/test/Intersections_3/bbox_other_do_intersect_test.cpp | M /branches/next/Kernel_d/include/CGAL/Cartesian_d.h | M /branches/next/Mesh_3/include/CGAL/IO/File_medit.h | M /branches/next/Mesh_3/include/CGAL/Mesh_cell_criteria_3.h | M /branches/next/Mesh_3/include/CGAL/Mesh_edge_criteria_3.h | M /branches/next/Mesh_3/include/CGAL/Mesh_facet_criteria_3.h | M /branches/next/Mesh_3/include/CGAL/make_mesh_3.h | M /branches/next/Nef_2/include/CGAL/Bounded_kernel.h | M /branches/next/Nef_2/include/CGAL/Nef_polyhedron_2.h | M /branches/next/Nef_3/include/CGAL/Nef_3/ID_support_handler.h | M /branches/next/Nef_3/include/CGAL/Nef_3/Infimaximal_box.h | M /branches/next/Nef_3/include/CGAL/Nef_3/vertex_cycle_to_nef_3.h | M /branches/next/Nef_3/include/CGAL/Nef_polyhedron_3.h | M /branches/next/Nef_3/test/Nef_3/nef_union_error_llvm.cpp | M /branches/next/Nef_S2/include/CGAL/Nef_S2/SM_overlayer.h | M /branches/next/OpenNL/include/CGAL/OpenNL/blas.h | M /branches/next/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h | M /branches/next/Point_set_processing_3/include/CGAL/mst_orient_normals.h | M /branches/next/QP_solver/include/CGAL/QP_solver/QP_functions_impl.h | M /branches/next/STL_Extension/include/CGAL/iterator.h | M /branches/next/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_simple_site_2.h | M /branches/next/Subdivision_method_3/include/CGAL/Polyhedron_decorator_3.h | M /branches/next/Subdivision_method_3/include/CGAL/Subdivision_mask_3.h | M /branches/next/Surface_mesher/include/CGAL/Surface_mesh_default_criteria_3.h | M /branches/next/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Adaptation_traits_functors.h | M /branches/next/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Default_site_inserters.h | M /branches/next/Voronoi_diagram_2/include/CGAL/Voronoi_diagram_2/Default_site_removers.h | | WARNFIX: Silence a good part of unused variable/parameter warnings. | | Wextra results in a dreadful wall of yellow in the test-suite and is | scary when using CGAL. Reduce some of the noise by silencing the | obvious cases with CGAL_USE or comments. | | ------------------------------------------------------------------------ The reason is that everything from CGAL/Testsuite/ is removed in public releases (that was discussed at a CGAL developers meetings, long ago). That means that r71090 introduced compilation errors undetectable by the tests of internal releases. I hope that the minutes of that developers meeting say that I was against the removal of headers between internal and public releases! -- Laurent Rineau --- Circulator/include/CGAL/circulator.h | 2 +- Installation/include/CGAL/use.h | 34 +++++++++++++++++++ .../include/CGAL/mst_orient_normals.h | 2 +- STL_Extension/include/CGAL/iterator.h | 2 +- Testsuite/include/CGAL/Testsuite/use.h | 12 ++----- 5 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 Installation/include/CGAL/use.h diff --git a/Circulator/include/CGAL/circulator.h b/Circulator/include/CGAL/circulator.h index ee9088d3adf..9efc045bc9c 100644 --- a/Circulator/include/CGAL/circulator.h +++ b/Circulator/include/CGAL/circulator.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include // These are name redefinitions for backwards compatibility // with the pre iterator-traits style adaptors. diff --git a/Installation/include/CGAL/use.h b/Installation/include/CGAL/use.h new file mode 100644 index 00000000000..fb513be303a --- /dev/null +++ b/Installation/include/CGAL/use.h @@ -0,0 +1,34 @@ +// Copyright (c) 2007 INRIA Sophia-Antipolis (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$ +// +// Author(s) : Sylvain Pion + +#ifndef CGAL_USE_H +#define CGAL_USE_H + +namespace CGAL { namespace internal { + +template < typename T > inline +void use(const T&) {} + +} } + +// CGAL_USE() is a macro which aims at removing "variable is unused" warnings. + +#define CGAL_USE(x) ::CGAL::internal::use(x) + +#endif // CGAL_USE_H diff --git a/Point_set_processing_3/include/CGAL/mst_orient_normals.h b/Point_set_processing_3/include/CGAL/mst_orient_normals.h index db3fd373efe..48015dcafbb 100644 --- a/Point_set_processing_3/include/CGAL/mst_orient_normals.h +++ b/Point_set_processing_3/include/CGAL/mst_orient_normals.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index 8198f63aa2f..40f3d059cc5 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include #include diff --git a/Testsuite/include/CGAL/Testsuite/use.h b/Testsuite/include/CGAL/Testsuite/use.h index 0e7aca616ed..daee40b9051 100644 --- a/Testsuite/include/CGAL/Testsuite/use.h +++ b/Testsuite/include/CGAL/Testsuite/use.h @@ -20,15 +20,9 @@ #ifndef CGAL_TESTSUITE_USE_H #define CGAL_TESTSUITE_USE_H -namespace CGAL { namespace internal { +// This is a wrapper file, for backward compatibility. +// The macro CGAL_USE is now defined in -template < typename T > inline -void use(const T&) {} - -} } - -// CGAL_USE() is a macro which aims at removing "variable is unused" warnings. - -#define CGAL_USE(x) ::CGAL::internal::use(x) +#include #endif // CGAL_TESTSUITE_USE_H