From a77205a33c0ee342f6e28cfc0c277e70ce944189 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 16 Dec 2014 17:13:30 +0100 Subject: [PATCH 1/5] disable warning with push/pop macros around boost header --- QP_solver/include/CGAL/QP_models.h | 9 ++ QP_solver/include/CGAL/QP_solution.h | 7 ++ .../examples/Spatial_searching/CMakeLists.txt | 90 +++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 Spatial_searching/examples/Spatial_searching/CMakeLists.txt diff --git a/QP_solver/include/CGAL/QP_models.h b/QP_solver/include/CGAL/QP_models.h index 5e68e025e37..4015dbbbdfe 100644 --- a/QP_solver/include/CGAL/QP_models.h +++ b/QP_solver/include/CGAL/QP_models.h @@ -31,7 +31,16 @@ #include #include #include + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4244) +#endif #include +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + #include // this file defines the following models: diff --git a/QP_solver/include/CGAL/QP_solution.h b/QP_solver/include/CGAL/QP_solution.h index abf7cf14594..75794420fc3 100644 --- a/QP_solver/include/CGAL/QP_solution.h +++ b/QP_solver/include/CGAL/QP_solution.h @@ -33,7 +33,14 @@ #include #include #include +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4244) +#endif #include +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif #include namespace CGAL { diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt new file mode 100644 index 00000000000..4329110eb95 --- /dev/null +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -0,0 +1,90 @@ +# Created by the script cgal_create_CMakeLists +# This is the CMake script for compiling a set of CGAL applications. + +project( Spatial_searching ) + + +cmake_minimum_required(VERSION 2.6.2) +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6) + if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3) + cmake_policy(VERSION 2.8.4) + else() + cmake_policy(VERSION 2.6) + endif() +endif() + +set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true ) + +if ( COMMAND cmake_policy ) + + cmake_policy( SET CMP0003 NEW ) + +endif() + +# CGAL and its components +find_package( CGAL QUIET COMPONENTS ) + +if ( NOT CGAL_FOUND ) + + message(STATUS "This project requires the CGAL library, and will not be compiled.") + return() + +endif() + +# include helper file +include( ${CGAL_USE_FILE} ) + +if (MSVC) + # Turn off VC++ warning + SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244") +endif() + +# Boost and its components +find_package( Boost REQUIRED ) + +if ( NOT Boost_FOUND ) + + message(STATUS "This project requires the Boost library, and will not be compiled.") + + return() + +endif() + +# include for local directory + +# include for local package +include_directories( BEFORE ../../include ) + + +# Creating entries for all .cpp/.C files with "main" routine +# ########################################################## + +include( CGAL_CreateSingleSourceCGALProgram ) + +create_single_source_cgal_program( "circular_query.cpp" ) + +create_single_source_cgal_program( "distance_browsing.cpp" ) + +create_single_source_cgal_program( "fuzzy_range_query.cpp" ) + +create_single_source_cgal_program( "general_neighbor_searching.cpp" ) + +create_single_source_cgal_program( "iso_rectangle_2_query.cpp" ) + +create_single_source_cgal_program( "nearest_neighbor_searching.cpp" ) + +create_single_source_cgal_program( "searching_with_circular_query.cpp" ) + +create_single_source_cgal_program( "searching_with_point_with_info.cpp" ) + +create_single_source_cgal_program( "searching_with_point_with_info_inplace.cpp" ) + +create_single_source_cgal_program( "searching_with_point_with_info_pmap.cpp" ) + +create_single_source_cgal_program( "user_defined_point_and_distance.cpp" ) + +create_single_source_cgal_program( "using_fair_splitting_rule.cpp" ) + +create_single_source_cgal_program( "weighted_Minkowski_distance.cpp" ) + + From 6a00be26021eed17a61ee1144048b954ba5fe135 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 16 Dec 2014 17:25:33 +0100 Subject: [PATCH 2/5] disable warning with push/pop macros around boost header --- Random_numbers/include/CGAL/Random.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Random_numbers/include/CGAL/Random.h b/Random_numbers/include/CGAL/Random.h index b6ea695da1f..3433ccfb865 100644 --- a/Random_numbers/include/CGAL/Random.h +++ b/Random_numbers/include/CGAL/Random.h @@ -29,9 +29,16 @@ #include #include +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4244) +#endif +#include +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif #include #include -#include #include #include #include From 30faf6241b6427034b7677885be309048136d8f8 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 19 Dec 2014 16:10:02 +0100 Subject: [PATCH 3/5] Add wrappers around 2 boost headers to push/pop pragma --- .../include/CGAL/Coercion_traits.h | 2 +- .../include/CGAL/Algebraic_kernel_d/shear.h | 2 +- .../examples/Min_annulus_d/min_annulus_d.cpp | 19 +++++++++ Bounding_volumes/include/CGAL/Min_annulus_d.h | 2 +- .../CGAL/boost/iterator/counting_iterator.hpp | 41 +++++++++++++++++++ .../boost/iterator/transform_iterator.hpp | 41 +++++++++++++++++++ QP_solver/include/CGAL/QP_models.h | 10 +---- QP_solver/include/CGAL/QP_solution.h | 10 +---- QP_solver/include/CGAL/QP_solver/QP_solver.h | 1 + 9 files changed, 108 insertions(+), 20 deletions(-) create mode 100644 Installation/include/CGAL/boost/iterator/counting_iterator.hpp create mode 100644 Installation/include/CGAL/boost/iterator/transform_iterator.hpp diff --git a/Algebraic_foundations/include/CGAL/Coercion_traits.h b/Algebraic_foundations/include/CGAL/Coercion_traits.h index bc220340f77..b443bc6a375 100644 --- a/Algebraic_foundations/include/CGAL/Coercion_traits.h +++ b/Algebraic_foundations/include/CGAL/Coercion_traits.h @@ -32,7 +32,7 @@ #include -#include +#include #include #include diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/shear.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/shear.h index fb4696ac0e2..2ac5c95712e 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/shear.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/shear.h @@ -32,7 +32,7 @@ #include #include #include -#include +#include namespace CGAL { diff --git a/Bounding_volumes/examples/Min_annulus_d/min_annulus_d.cpp b/Bounding_volumes/examples/Min_annulus_d/min_annulus_d.cpp index 801f88c0778..306e154394d 100644 --- a/Bounding_volumes/examples/Min_annulus_d/min_annulus_d.cpp +++ b/Bounding_volumes/examples/Min_annulus_d/min_annulus_d.cpp @@ -3,7 +3,26 @@ // as input type and some internal EXACT floating point type #include #include + +#if 0 +#include + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4244) +#endif + +//#include +#include + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif +#endif + #include + + #include #include diff --git a/Bounding_volumes/include/CGAL/Min_annulus_d.h b/Bounding_volumes/include/CGAL/Min_annulus_d.h index 538e53abf34..6bd19bd71c7 100644 --- a/Bounding_volumes/include/CGAL/Min_annulus_d.h +++ b/Bounding_volumes/include/CGAL/Min_annulus_d.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include // here is how it works. We have d+2 variables: diff --git a/Installation/include/CGAL/boost/iterator/counting_iterator.hpp b/Installation/include/CGAL/boost/iterator/counting_iterator.hpp new file mode 100644 index 00000000000..14ca38a0b0b --- /dev/null +++ b/Installation/include/CGAL/boost/iterator/counting_iterator.hpp @@ -0,0 +1,41 @@ +// Copyright (c) 2014 +// Utrecht University (The Netherlands), +// ETH Zurich (Switzerland), +// INRIA Sophia-Antipolis (France), +// Max-Planck-Institute Saarbruecken (Germany), +// and Tel-Aviv University (Israel). 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) : Andreas Fabri + +#ifndef CGAL_BOOST_ITERATOR_COUNTING_ITERATOR_H +#define CGAL_BOOST_ITERATOR_COUNTING_ITERATOR_H + +#include + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4244) +#endif + +#include + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif // CGAL_BOOST_ITERATOR_COUNTING_ITERATOR_H diff --git a/Installation/include/CGAL/boost/iterator/transform_iterator.hpp b/Installation/include/CGAL/boost/iterator/transform_iterator.hpp new file mode 100644 index 00000000000..14ca38a0b0b --- /dev/null +++ b/Installation/include/CGAL/boost/iterator/transform_iterator.hpp @@ -0,0 +1,41 @@ +// Copyright (c) 2014 +// Utrecht University (The Netherlands), +// ETH Zurich (Switzerland), +// INRIA Sophia-Antipolis (France), +// Max-Planck-Institute Saarbruecken (Germany), +// and Tel-Aviv University (Israel). 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) : Andreas Fabri + +#ifndef CGAL_BOOST_ITERATOR_COUNTING_ITERATOR_H +#define CGAL_BOOST_ITERATOR_COUNTING_ITERATOR_H + +#include + +#if defined(BOOST_MSVC) +# pragma warning(push) +# pragma warning(disable:4244) +#endif + +#include + +#if defined(BOOST_MSVC) +# pragma warning(pop) +#endif + +#endif // CGAL_BOOST_ITERATOR_COUNTING_ITERATOR_H diff --git a/QP_solver/include/CGAL/QP_models.h b/QP_solver/include/CGAL/QP_models.h index 4015dbbbdfe..1c7e51c0931 100644 --- a/QP_solver/include/CGAL/QP_models.h +++ b/QP_solver/include/CGAL/QP_models.h @@ -32,15 +32,7 @@ #include #include -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4244) -#endif -#include -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif - +#include #include // this file defines the following models: diff --git a/QP_solver/include/CGAL/QP_solution.h b/QP_solver/include/CGAL/QP_solution.h index 75794420fc3..3704372fb5c 100644 --- a/QP_solver/include/CGAL/QP_solution.h +++ b/QP_solver/include/CGAL/QP_solution.h @@ -33,14 +33,8 @@ #include #include #include -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4244) -#endif -#include -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif + +#include #include namespace CGAL { diff --git a/QP_solver/include/CGAL/QP_solver/QP_solver.h b/QP_solver/include/CGAL/QP_solver/QP_solver.h index 01aa6ac1472..d84c96d739f 100644 --- a/QP_solver/include/CGAL/QP_solver/QP_solver.h +++ b/QP_solver/include/CGAL/QP_solver/QP_solver.h @@ -43,6 +43,7 @@ #include #include + #include #include From 6b54e74af5f48c4a159362e159c90407471598e7 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Sat, 20 Dec 2014 16:15:08 +0100 Subject: [PATCH 4/5] fix opy paste error --- .../include/CGAL/boost/iterator/transform_iterator.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Installation/include/CGAL/boost/iterator/transform_iterator.hpp b/Installation/include/CGAL/boost/iterator/transform_iterator.hpp index 14ca38a0b0b..cb9a611ad70 100644 --- a/Installation/include/CGAL/boost/iterator/transform_iterator.hpp +++ b/Installation/include/CGAL/boost/iterator/transform_iterator.hpp @@ -22,8 +22,8 @@ // // Author(s) : Andreas Fabri -#ifndef CGAL_BOOST_ITERATOR_COUNTING_ITERATOR_H -#define CGAL_BOOST_ITERATOR_COUNTING_ITERATOR_H +#ifndef CGAL_BOOST_ITERATOR_TRANSFORM_ITERATOR_H +#define CGAL_BOOST_ITERATOR_TRANSFORM_ITERATOR_H #include @@ -32,10 +32,10 @@ # pragma warning(disable:4244) #endif -#include +#include #if defined(BOOST_MSVC) # pragma warning(pop) #endif -#endif // CGAL_BOOST_ITERATOR_COUNTING_ITERATOR_H +#endif // CGAL_BOOST_ITERATOR_TRANSFORM_ITERATOR_H From c813050469c8ebede39b09d49cecd4fd26747f95 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 1 Jan 2015 19:07:28 +0100 Subject: [PATCH 5/5] cleanup --- .../examples/Min_annulus_d/min_annulus_d.cpp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/Bounding_volumes/examples/Min_annulus_d/min_annulus_d.cpp b/Bounding_volumes/examples/Min_annulus_d/min_annulus_d.cpp index 306e154394d..801f88c0778 100644 --- a/Bounding_volumes/examples/Min_annulus_d/min_annulus_d.cpp +++ b/Bounding_volumes/examples/Min_annulus_d/min_annulus_d.cpp @@ -3,26 +3,7 @@ // as input type and some internal EXACT floating point type #include #include - -#if 0 -#include - -#if defined(BOOST_MSVC) -# pragma warning(push) -# pragma warning(disable:4244) -#endif - -//#include -#include - -#if defined(BOOST_MSVC) -# pragma warning(pop) -#endif -#endif - #include - - #include #include