diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake index 649c2825cfe..9df648182d5 100644 --- a/Installation/lib/cmake/CGAL/CGALConfig.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake @@ -131,7 +131,11 @@ include(CGAL_setup_target_dependencies) foreach(cgal_lib ${CGAL_LIBRARIES}) set(WITH_${cgal_lib} TRUE) if(${cgal_lib}_FOUND AND NOT TARGET ${cgal_lib}) - add_library(${cgal_lib} INTERFACE) + if(CGAL_BUILDING_LIBS OR CMAKE_VERSION VERSION_LESS "3.11") + add_library(${cgal_lib} INTERFACE) + else() + add_library(${cgal_lib} INTERFACE IMPORTED GLOBAL) + endif() if(NOT TARGET CGAL::${cgal_lib}) add_library(CGAL::${cgal_lib} ALIAS ${cgal_lib}) endif() diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index 1ecba32cce2..629102a8891 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -67,7 +67,6 @@ if ( CGAL_FOUND ) endif() - if ( Boost_FOUND AND Boost_VERSION GREATER 103400 ) # Compilable examples create_single_source_cgal_program( "mesh_hybrid_mesh_domain.cpp" ) create_single_source_cgal_program( "mesh_implicit_sphere.cpp" ) @@ -136,10 +135,6 @@ if ( CGAL_FOUND ) endif() endforeach() - else() - message(STATUS "NOTICE: This program requires Boost >= 1.34.1, and will not be compiled.") - endif() - else() message(STATUS "This program requires the CGAL library, and will not be compiled.") endif() diff --git a/Mesh_3/examples/Mesh_3/mesh_3D_image_with_custom_initialization.cpp b/Mesh_3/examples/Mesh_3/mesh_3D_image_with_custom_initialization.cpp index 9bd06e32ae4..7a326ee1b2f 100644 --- a/Mesh_3/examples/Mesh_3/mesh_3D_image_with_custom_initialization.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_3D_image_with_custom_initialization.cpp @@ -54,7 +54,7 @@ int main() image, criteria, (unsigned char)0); - CGAL::refine_mesh_3(c3t3, domain, criteria); + CGAL::refine_mesh_3(c3t3, domain, criteria); /// [Meshing] // Output diff --git a/Mesh_3/include/CGAL/Mesh_criteria_3.h b/Mesh_3/include/CGAL/Mesh_criteria_3.h index 57854afdeb5..de8a22cf5e4 100644 --- a/Mesh_3/include/CGAL/Mesh_criteria_3.h +++ b/Mesh_3/include/CGAL/Mesh_criteria_3.h @@ -83,17 +83,17 @@ public: typedef CellCriteria Cell_criteria; // Constructor - Mesh_criteria_3_impl(const Facet_criteria& facet_criteria, - const Cell_criteria& cell_criteria) + Mesh_criteria_3_impl(Facet_criteria facet_criteria, + Cell_criteria cell_criteria) : edge_criteria_(0) , facet_criteria_(facet_criteria) , cell_criteria_(cell_criteria) { } // Constructor - Mesh_criteria_3_impl(const Edge_criteria& edge_criteria, - const Facet_criteria& facet_criteria, - const Cell_criteria& cell_criteria) + Mesh_criteria_3_impl(Edge_criteria edge_criteria, + Facet_criteria facet_criteria, + Cell_criteria cell_criteria) : edge_criteria_(edge_criteria) , facet_criteria_(facet_criteria) , cell_criteria_(cell_criteria) @@ -182,15 +182,15 @@ public: typedef typename Base::Cell_criteria Cell_criteria; // Constructor - Mesh_criteria_3(const Facet_criteria& facet_criteria, - const Cell_criteria& cell_criteria) + Mesh_criteria_3(Facet_criteria facet_criteria, + Cell_criteria cell_criteria) : Base(facet_criteria, cell_criteria) {} // Constructor - Mesh_criteria_3(const Edge_criteria& edge_criteria, - const Facet_criteria& facet_criteria, - const Cell_criteria& cell_criteria) + Mesh_criteria_3(Edge_criteria edge_criteria, + Facet_criteria facet_criteria, + Cell_criteria cell_criteria) : Base(edge_criteria, facet_criteria, cell_criteria) {} diff --git a/Mesh_3/test/Mesh_3/test_meshing_polyhedral_complex.cpp b/Mesh_3/test/Mesh_3/test_meshing_polyhedral_complex.cpp index 5ff4f6daff8..bee4a693508 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_polyhedral_complex.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_polyhedral_complex.cpp @@ -106,7 +106,7 @@ struct Polyhedral_complex_tester : public Tester true /*nonlinear_growth_of_balls*/); domain.add_vertices_to_c3t3_on_patch_without_feature_edges(c3t3); - CGAL::refine_mesh_3(c3t3, domain, criteria); + CGAL::refine_mesh_3(c3t3, domain, criteria); CGAL::remove_far_points_in_mesh_3(c3t3); diff --git a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2.h b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2.h index 35d71f91df2..24aa1ed5478 100644 --- a/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2.h +++ b/Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2.h @@ -589,12 +589,8 @@ public: typedef std::vector Vertex_indices; typedef std::vector Vertices; - Vertex_indices vertex_indices; - vertex_indices.resize(points.size()); - - std::copy(boost::counting_iterator(0), - boost::counting_iterator(points.size()), - std::back_inserter(vertex_indices)); + Vertex_indices vertex_indices(boost::counting_iterator(0), + boost::counting_iterator(points.size())); size_type n = this->number_of_vertices(); Spatial_sort_traits_adapter_2 Vertex_indices; typedef std::vector Vertices; - Vertex_indices vertex_indices; - vertex_indices.resize(points.size()); - - std::copy(boost::counting_iterator(0), - boost::counting_iterator(points.size()), - std::back_inserter(vertex_indices)); + Vertex_indices vertex_indices(boost::counting_iterator(0), + boost::counting_iterator(points.size())); typename T::size_type n = t.number_of_vertices(); CGAL::Spatial_sort_traits_adapter_2<