From 84fcae478826641cd27ec45e2f463b4cf9067500 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 11 Jul 2014 12:04:42 +0200 Subject: [PATCH] Workaround the incompatibility with Boost 1.54 --- .../Point_set_processing_3/CMakeLists.txt | 17 +++++++++++++++-- .../normal_estimation_test.cpp | 9 +++++++++ .../test/collect_cgal_testresults_from_cmake | 2 +- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt index 3d6035ae72f..3a22cc8e781 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt @@ -23,6 +23,8 @@ if ( CGAL_FOUND ) include( ${CGAL_USE_FILE} ) include( CGAL_CreateSingleSourceCGALProgram ) + find_package(Boost QUIET) + # VisualC++ optimization for applications dealing with large data if (MSVC) # Use /EHa option to catch stack overflows. @@ -48,7 +50,9 @@ if ( CGAL_FOUND ) # Executables that do *not* require EIGEN or LAPACK create_single_source_cgal_program( "average_spacing_example.cpp" ) create_single_source_cgal_program( "grid_simplification_example.cpp" ) - create_single_source_cgal_program( "normals_example.cpp" ) + if(NOT Boost_VERSION EQUAL "105400") + create_single_source_cgal_program( "normals_example.cpp" ) + endif() create_single_source_cgal_program( "property_map.cpp" ) create_single_source_cgal_program( "random_simplification_example.cpp" ) create_single_source_cgal_program( "read_write_xyz_point_set_example.cpp" ) @@ -70,13 +74,22 @@ if ( CGAL_FOUND ) if(EIGEN3_FOUND OR LAPACK_FOUND) # Executables that require Eigen or BLAS and LAPACK create_single_source_cgal_program( "jet_smoothing_example.cpp" ) - create_single_source_cgal_program( "normal_estimation.cpp" ) + if(NOT Boost_VERSION EQUAL "105400") + create_single_source_cgal_program( "normal_estimation.cpp" ) + endif() else(EIGEN3_FOUND OR LAPACK_FOUND) message(STATUS "NOTICE: Some of the executables in this directory need either Eigen 3.1 (or greater) or LAPACK, and will not be compiled.") endif(EIGEN3_FOUND OR LAPACK_FOUND) + if(Boost_VERSION EQUAL "105400") + message(STATUS + "NOTICE: The examples \"normals_examples.cpp\" and " + "\"normal_estimation.cpp\" are incompatible with Boost 1.54," + " and will not be compiled.") + message(STATUS "See the following bug: https://svn.boost.org/trac/boost/ticket/9012") + endif() else() message(STATUS "NOTICE: This program requires the CGAL library, and will not be compiled.") diff --git a/Point_set_processing_3/test/Point_set_processing_3/normal_estimation_test.cpp b/Point_set_processing_3/test/Point_set_processing_3/normal_estimation_test.cpp index 02c1bbdf9d9..ba7fec1a167 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/normal_estimation_test.cpp +++ b/Point_set_processing_3/test/Point_set_processing_3/normal_estimation_test.cpp @@ -234,6 +234,15 @@ bool run_mst_orient_normals(PointList& points, // input points + input/output no unsigned int nb_neighbors_mst, // number of neighbors const std::vector& original_normals) // may be empty { +#if (BOOST_VERSION / 100) == 1054 + std::cerr << + "In run_mst_orient_normals():\n" + "NOTICE: This function is incompatible with Boost 1.54, " + "and will not be tested. See the following bug:\n" + " https://svn.boost.org/trac/boost/ticket/9012\n"; + return true; +#endif // Boost version is 1.54 + std::cerr << "Orients Normals with a Minimum Spanning Tree (k="<< nb_neighbors_mst << ")...\n"; CGAL::Timer task_timer; task_timer.start(); diff --git a/Testsuite/test/collect_cgal_testresults_from_cmake b/Testsuite/test/collect_cgal_testresults_from_cmake index 935f1c47000..f38beeea9b9 100755 --- a/Testsuite/test/collect_cgal_testresults_from_cmake +++ b/Testsuite/test/collect_cgal_testresults_from_cmake @@ -53,7 +53,7 @@ print_testresult() then RESULT="w" else - if grep -E -q 'NOTICE: .*(need|require).*and.*will not be' CompilerOutput_$1 + if grep -E -q 'NOTICE: .*(need|require|incompatible).*and.*will not be' CompilerOutput_$1 then RESULT="r" else