From da5298f1234626dba7d635a97ffb51a6eb014b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 15 Oct 2014 10:02:53 +0200 Subject: [PATCH] fix warnings --- .../Surface_mesh_shortest_path.h | 3 +- .../Surface_mesh_shortest_path/CMakeLists.txt | 56 +++++++++++++++++++ .../Surface_mesh_shortest_path_test_3.cpp | 1 - .../Surface_mesh_shortest_path_test_4.cpp | 1 - 4 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt diff --git a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h index bae28561f1c..60e18c0a28f 100644 --- a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h +++ b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h @@ -207,6 +207,7 @@ public: Source_point_handle& operator=(const Source_point_handle& other) { m_iterator = other.m_iterator; + return *this; } const Face_location& operator*() const @@ -2104,7 +2105,7 @@ public: */ Source_point_handle add_source_point(face_descriptor f, Barycentric_coordinate location) { - add_source_point(std::make_pair(f, location)); + return add_source_point(std::make_pair(f, location)); } /*! diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt new file mode 100644 index 00000000000..901c6190518 --- /dev/null +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt @@ -0,0 +1,56 @@ +# Created by the script cgal_create_cmake_script +# This is the CMake script for compiling a CGAL application. + + +project( Surface_mesh_shortest_path_ ) + +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() + +find_package(CGAL QUIET COMPONENTS Core ) + +if ( CGAL_FOUND ) + + include( ${CGAL_USE_FILE} ) + + include( CGAL_CreateSingleSourceCGALProgram ) + + include_directories (BEFORE "../../include") + + include_directories (BEFORE "include") + + create_single_source_cgal_program( "Surface_mesh_shortest_path_test_1.cpp" ) + create_single_source_cgal_program( "Surface_mesh_shortest_path_test_2.cpp" ) + create_single_source_cgal_program( "Surface_mesh_shortest_path_test_3.cpp" ) + create_single_source_cgal_program( "Surface_mesh_shortest_path_test_4.cpp" ) + create_single_source_cgal_program( "Surface_mesh_shortest_path_traits_test.cpp" ) + + + # Link with Boost.ProgramOptions (optional) + find_package(Boost QUIET COMPONENTS program_options) + if(Boost_PROGRAM_OPTIONS_FOUND) + if( CGAL_AUTO_LINK_ENABLED ) + message( STATUS "Boost.ProgramOptions library: found" ) + else() + message( STATUS "Boost.ProgramOptions library: ${Boost_PROGRAM_OPTIONS_LIBRARY}" ) + endif() + add_definitions( "-DCGAL_USE_BOOST_PROGRAM_OPTIONS" ) + list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY}) + create_single_source_cgal_program( "TestMesh.cpp" ) + else() + message(STATUS "NOTICE: Example TestMesh.cpp requires boost program_option and will not be compiled.") + endif() + + +else() + + message(STATUS "This program requires the CGAL library, and will not be compiled.") + +endif() + diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_3.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_3.cpp index c42ed3d3ae5..a8f8f00e6ae 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_3.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_3.cpp @@ -51,7 +51,6 @@ BOOST_AUTO_TEST_CASE( test_find_nearest_face_location_on_surface ) typedef CGAL::AABB_face_graph_triangle_primitive AABB_face_graph_primitive; typedef CGAL::AABB_traits AABB_face_graph_traits; - typedef CGAL::AABB_tree AABB_face_graph_tree; Traits traits; diff --git a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_4.cpp b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_4.cpp index 7c56e2cd401..c5a9dbd6598 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_4.cpp +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/Surface_mesh_shortest_path_test_4.cpp @@ -54,7 +54,6 @@ BOOST_AUTO_TEST_CASE( test_find_nearest_face_location_above_surface ) typedef CGAL::AABB_face_graph_triangle_primitive AABB_face_graph_primitive; typedef CGAL::AABB_traits AABB_face_graph_traits; - typedef CGAL::AABB_tree AABB_face_graph_tree; Traits traits;