From 28ba446895561001df26b8c21f704b461fe6c014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 6 Sep 2022 15:38:18 +0200 Subject: [PATCH 01/60] Clean (some) CMakeLists.txt indentation --- AABB_tree/demo/AABB_tree/CMakeLists.txt | 14 ++-- .../test/Algebraic_kernel_d/CMakeLists.txt | 18 +++-- .../demo/Alpha_shapes_3/CMakeLists.txt | 1 + BGL/examples/BGL_polyhedron_3/CMakeLists.txt | 6 -- BGL/test/BGL/CMakeLists.txt | 46 ++----------- .../Barycentric_coordinates_2/CMakeLists.txt | 2 - CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt | 2 - .../test/Classification/CMakeLists.txt | 7 +- .../examples/Cone_spanners_2/CMakeLists.txt | 1 - .../examples/Convex_hull_3/CMakeLists.txt | 10 --- .../demo/Alpha_shapes_2/CMakeLists.txt | 1 - .../test/Heat_method_3/CMakeLists.txt | 7 +- .../Hyperbolic_triangulation_2/CMakeLists.txt | 1 - Installation/CMakeLists.txt | 6 +- Mesh_3/examples/Mesh_3/CMakeLists.txt | 9 +-- Number_types/test/Number_types/CMakeLists.txt | 3 +- .../test/Periodic_3_mesh_3/CMakeLists.txt | 6 +- .../Point_set_processing_3/CMakeLists.txt | 20 ++---- .../CMakeLists.txt | 25 ++----- .../CMakeLists.txt | 19 ++---- .../Polygon_mesh_processing/CMakeLists.txt | 5 +- .../Polygon_mesh_processing/CMakeLists.txt | 1 - Polyhedron/demo/Polyhedron/CMakeLists.txt | 11 ++-- .../Plugins/Classification/CMakeLists.txt | 10 ++- .../Plugins/Point_set/CMakeLists.txt | 6 +- .../Plugins/Three_examples/CMakeLists.txt | 7 +- Ridges_3/examples/Ridges_3/CMakeLists.txt | 1 + .../test/STL_Extension/CMakeLists.txt | 66 +++++++++---------- .../CMakeLists.txt | 1 + .../Set_movable_separability_2/CMakeLists.txt | 3 +- .../examples/Shape_detection/CMakeLists.txt | 10 ++- .../test/Shape_detection/CMakeLists.txt | 50 +++++--------- .../examples/Solver_interface/CMakeLists.txt | 11 ---- .../examples/Spatial_searching/CMakeLists.txt | 18 +---- .../Surface_mesh_approximation/CMakeLists.txt | 3 +- .../Surface_mesh_deformation/CMakeLists.txt | 15 ++--- .../Surface_mesh_segmentation/CMakeLists.txt | 8 +-- .../examples/Triangulation_3/CMakeLists.txt | 9 +-- .../test/Triangulation_3/CMakeLists.txt | 3 +- Weights/test/Weights/CMakeLists.txt | 4 -- 40 files changed, 134 insertions(+), 312 deletions(-) diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt index 8cc6c27c3f8..c8a7e6dffce 100644 --- a/AABB_tree/demo/AABB_tree/CMakeLists.txt +++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt @@ -5,6 +5,7 @@ project(AABB_tree_Demo) # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) + # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) if(NOT POLICY CMP0070 AND POLICY CMP0053) @@ -31,10 +32,8 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(AddFileDependencies) - qt5_generate_moc("MainWindow.h" - "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp") - add_file_dependencies(MainWindow_moc.cpp - "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h") + qt5_generate_moc("MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp") + add_file_dependencies(MainWindow_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h") qt5_generate_moc("Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp") add_file_dependencies(Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h") @@ -62,8 +61,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(AABB_demo) -else(CGAL_Qt5_FOUND - AND Qt5_FOUND) +else(CGAL_Qt5_FOUND AND Qt5_FOUND) set(AABB_MISSING_DEPS "") @@ -80,6 +78,4 @@ else(CGAL_Qt5_FOUND "NOTICE: This demo requires ${AABB_MISSING_DEPS}and will not be compiled." ) -endif( - CGAL_Qt5_FOUND - AND Qt5_FOUND) +endif(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt index 78210e47045..850c3396759 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt @@ -4,11 +4,12 @@ project(Algebraic_kernel_d_Tests) # CGAL and its components find_package(CGAL REQUIRED COMPONENTS Core) -find_package(RS3 QUIET) - +find_package(MPFI QUIET) if(MPFI_FOUND) include(${MPFI_USE_FILE}) endif() + +find_package(RS3 QUIET) if(RS3_FOUND) include(${RS3_USE_FILE}) endif() @@ -33,19 +34,16 @@ include_directories(BEFORE include) create_single_source_cgal_program("cyclic.cpp") create_single_source_cgal_program("Descartes.cpp") + if(NOT CGAL_DISABLE_GMP) create_single_source_cgal_program("Algebraic_curve_kernel_2.cpp") create_single_source_cgal_program("algebraic_curve_kernel_2_tools.cpp") create_single_source_cgal_program("Algebraic_kernel_d_1_LEDA.cpp") - create_single_source_cgal_program( - "Algebraic_kernel_d_1_CORE_Integer_rational.cpp") - create_single_source_cgal_program( - "Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp") - create_single_source_cgal_program( - "Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp") - create_single_source_cgal_program( - "Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp") + create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_Integer_rational.cpp") + create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp") + create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp") + create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp") create_single_source_cgal_program("Algebraic_kernel_d_1_GMP.cpp") create_single_source_cgal_program("Algebraic_kernel_d_2.cpp") diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt index 4ebb4334fbd..dde215bbeee 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt @@ -6,6 +6,7 @@ project(Alpha_shapes_3_Demo) # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) + # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) if(NOT POLICY CMP0070 AND POLICY CMP0053) diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index 4179ca63745..51c84c35aed 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -27,17 +27,11 @@ endif() # ########################################################## create_single_source_cgal_program("distance.cpp") - create_single_source_cgal_program("incident_vertices.cpp") - create_single_source_cgal_program("kruskal.cpp") - create_single_source_cgal_program("kruskal_with_stored_id.cpp") - create_single_source_cgal_program("normals.cpp") - create_single_source_cgal_program("range.cpp") - create_single_source_cgal_program("transform_iterator.cpp") create_single_source_cgal_program("copy_polyhedron.cpp") diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index da8baf25ccb..8a06a97cb2a 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -36,68 +36,36 @@ if(OpenMesh_FOUND) endif() create_single_source_cgal_program("test_split.cpp") - create_single_source_cgal_program("next.cpp") - create_single_source_cgal_program("test_circulator.cpp") - create_single_source_cgal_program("test_Gwdwg.cpp") - create_single_source_cgal_program("test_bgl_dual.cpp") - create_single_source_cgal_program("graph_concept_Polyhedron_3.cpp") - create_single_source_cgal_program("graph_concept_Dual.cpp") - create_single_source_cgal_program("graph_concept_Triangulation_2.cpp") - create_single_source_cgal_program("graph_concept_Surface_mesh.cpp") - create_single_source_cgal_program("graph_concept_Seam_mesh_Surface_mesh.cpp") - create_single_source_cgal_program("graph_concept_Gwdwg_Surface_mesh.cpp") - create_single_source_cgal_program("graph_concept_Linear_cell_complex.cpp") - create_single_source_cgal_program("graph_concept_Arrangement_2.cpp") - -create_single_source_cgal_program( "graph_concept_Derived.cpp" ) - -create_single_source_cgal_program( "test_clear.cpp" ) - +create_single_source_cgal_program("graph_concept_Derived.cpp" ) +create_single_source_cgal_program("test_clear.cpp" ) create_single_source_cgal_program("test_helpers.cpp") - create_single_source_cgal_program("test_Has_member_clear.cpp") - create_single_source_cgal_program("test_Has_member_id.cpp") - create_single_source_cgal_program("test_bgl_read_write.cpp") - create_single_source_cgal_program("graph_concept_Face_filtered_graph.cpp") - create_single_source_cgal_program("test_Manifold_face_removal.cpp") - create_single_source_cgal_program("test_Regularize_face_selection_borders.cpp") - create_single_source_cgal_program("test_Face_filtered_graph.cpp") - create_single_source_cgal_program("test_Euler_operations.cpp") - -create_single_source_cgal_program( "test_test_face.cpp" ) - -create_single_source_cgal_program( "test_Collapse_edge.cpp" ) - -create_single_source_cgal_program( "test_Collapse_edge_with_constraints.cpp" ) - +create_single_source_cgal_program("test_test_face.cpp" ) +create_single_source_cgal_program("test_Collapse_edge.cpp" ) +create_single_source_cgal_program("test_Collapse_edge_with_constraints.cpp" ) create_single_source_cgal_program("test_graph_traits.cpp") - create_single_source_cgal_program("test_Properties.cpp") - -create_single_source_cgal_program( - "bench_read_from_stream_vs_add_face_and_add_faces.cpp") - -create_single_source_cgal_program( "graph_traits_inheritance.cpp" ) - +create_single_source_cgal_program("bench_read_from_stream_vs_add_face_and_add_faces.cpp") +create_single_source_cgal_program("graph_traits_inheritance.cpp" ) create_single_source_cgal_program("test_deprecated_io.cpp") if(OpenMesh_FOUND) diff --git a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt index 8dfd74dd75c..41c76ac2db2 100644 --- a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt @@ -45,7 +45,6 @@ create_single_source_cgal_program("test_dh_deprecated_api.cpp") find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) - create_single_source_cgal_program("test_hm_unit_square.cpp") target_link_libraries(test_hm_unit_square PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("test_hm_const_linear_precision.cpp") @@ -56,7 +55,6 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(test_bc_projection_traits PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("test_bc_all_coordinates.cpp") target_link_libraries(test_bc_all_coordinates PUBLIC CGAL::Eigen3_support) - else() message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.") endif() diff --git a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt index 0cffb49018c..1a6c6591822 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt @@ -33,7 +33,6 @@ if(NOT TARGET CGAL::Eigen3_support) endif() find_package(IPE 7) - if(IPE_FOUND) if ( NOT ${IPE_VERSION} EQUAL "7") message("-- Error: ${IPE_VERSION} is not a supported version of IPE (only 7 is).") @@ -41,7 +40,6 @@ if(IPE_FOUND) endif() endif() - if(IPE_FOUND AND IPE_VERSION) message("-- Using IPE version ${IPE_VERSION} compatibility.") diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index f45464cb3ad..8e6794dae27 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -29,6 +29,7 @@ if(NOT TARGET CGAL::Boost_serialization_support) ) set(Classification_dependencies_met FALSE) endif() + if(NOT TARGET CGAL::Boost_iostreams_support) message( STATUS @@ -56,9 +57,9 @@ create_single_source_cgal_program("test_classification_point_set.cpp") create_single_source_cgal_program("test_classification_io.cpp") foreach(target test_classification_point_set test_classification_io) - target_link_libraries( - ${target} PUBLIC CGAL::Eigen3_support CGAL::Boost_iostreams_support - CGAL::Boost_serialization_support) + target_link_libraries(${target} PUBLIC CGAL::Eigen3_support + CGAL::Boost_iostreams_support + CGAL::Boost_serialization_support) if(TARGET CGAL::TBB_support) target_link_libraries(${target} PUBLIC CGAL::TBB_support) endif() diff --git a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt index 7bb7268e27e..608e8c0a839 100644 --- a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt +++ b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt @@ -20,7 +20,6 @@ if(CGAL_Core_FOUND OR LEDA_FOUND) foreach(cppfile ${cppfiles}) create_single_source_cgal_program("${cppfile}") endforeach() - else() message( diff --git a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt index 0a7e6ea7968..a9ff9378850 100644 --- a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt @@ -35,25 +35,15 @@ endif() # ########################################################## create_single_source_cgal_program("quickhull_indexed_triangle_set_3.cpp") - create_single_source_cgal_program("dynamic_hull_3.cpp") - create_single_source_cgal_program("dynamic_hull_LCC_3.cpp") - create_single_source_cgal_program("dynamic_hull_SM_3.cpp") - create_single_source_cgal_program("halfspace_intersection_3.cpp") - create_single_source_cgal_program("lloyd_algorithm.cpp") - create_single_source_cgal_program("quickhull_3.cpp") - create_single_source_cgal_program("graph_hull_3.cpp") - create_single_source_cgal_program("quickhull_any_dim_3.cpp") - create_single_source_cgal_program("extreme_points_3_sm.cpp") - create_single_source_cgal_program("extreme_indices_3.cpp") if(OpenMesh_FOUND) diff --git a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt index af2ccbeeca2..5dfc09dac1f 100644 --- a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt +++ b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt @@ -46,7 +46,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(Alpha_shapes_2) - else() message( diff --git a/Heat_method_3/test/Heat_method_3/CMakeLists.txt b/Heat_method_3/test/Heat_method_3/CMakeLists.txt index b096f0338c6..98bd95f5d56 100644 --- a/Heat_method_3/test/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/test/Heat_method_3/CMakeLists.txt @@ -21,7 +21,6 @@ endif() find_package(Eigen3 3.3.0) include(CGAL_Eigen3_support) - if(NOT TARGET CGAL::Eigen3_support) message( STATUS @@ -41,8 +40,6 @@ target_link_libraries(heat_method_concept PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh_test.cpp") target_link_libraries(heat_method_surface_mesh_test PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh_direct_test.cpp") -target_link_libraries(heat_method_surface_mesh_direct_test - PUBLIC CGAL::Eigen3_support) +target_link_libraries(heat_method_surface_mesh_direct_test PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh_intrinsic_test.cpp") -target_link_libraries(heat_method_surface_mesh_intrinsic_test - PUBLIC CGAL::Eigen3_support) +target_link_libraries(heat_method_surface_mesh_intrinsic_test PUBLIC CGAL::Eigen3_support) diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt index 13f97548589..1236c0453b1 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt @@ -17,7 +17,6 @@ find_package(LEDA QUIET) # Find Qt5 itself find_package(Qt5 QUIET COMPONENTS OpenGL Gui) - if(CGAL_Qt5_FOUND AND Qt5_FOUND AND (CGAL_Core_FOUND OR LEDA_FOUND)) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 28ee5079fdb..19ba65d9900 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -75,10 +75,8 @@ if(CGAL_BRANCH_BUILD) "${CGAL_SOURCE_DIR}/GraphicsView" CACHE INTERNAL "Directory containing the GraphicsView package") - message( - STATUS "Installation package directory: ${CGAL_INSTALLATION_PACKAGE_DIR}") - message( - STATUS "Maintenance package directory: ${CGAL_MAINTENANCE_PACKAGE_DIR}") + message(STATUS "Installation package directory: ${CGAL_INSTALLATION_PACKAGE_DIR}") + message(STATUS "Maintenance package directory: ${CGAL_MAINTENANCE_PACKAGE_DIR}") message(STATUS "Core package directory: ${CGAL_CORE_PACKAGE_DIR}") else(CGAL_BRANCH_BUILD) diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index 6f848c2c657..b91fb018970 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -51,12 +51,10 @@ create_single_source_cgal_program("mesh_implicit_sphere.cpp") target_link_libraries(mesh_implicit_sphere PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("mesh_implicit_sphere_variable_size.cpp") -target_link_libraries(mesh_implicit_sphere_variable_size - PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_implicit_sphere_variable_size PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("mesh_two_implicit_spheres_with_balls.cpp") -target_link_libraries(mesh_two_implicit_spheres_with_balls - PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_two_implicit_spheres_with_balls PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("mesh_implicit_domains_2.cpp" "implicit_functions.cpp") @@ -66,8 +64,7 @@ create_single_source_cgal_program("mesh_cubes_intersection.cpp") target_link_libraries(mesh_cubes_intersection PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("mesh_cubes_intersection_with_features.cpp") -target_link_libraries(mesh_cubes_intersection_with_features - PUBLIC CGAL::Eigen3_support) +target_link_libraries(mesh_cubes_intersection_with_features PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("mesh_implicit_domains.cpp" "implicit_functions.cpp") diff --git a/Number_types/test/Number_types/CMakeLists.txt b/Number_types/test/Number_types/CMakeLists.txt index 49b8cd31ba3..b26ca0fe97a 100644 --- a/Number_types/test/Number_types/CMakeLists.txt +++ b/Number_types/test/Number_types/CMakeLists.txt @@ -12,7 +12,6 @@ include(CGAL_VersionUtils) include_directories(BEFORE include) - create_single_source_cgal_program("bench_interval.cpp") create_single_source_cgal_program("constant.cpp") create_single_source_cgal_program("CORE_BigFloat.cpp") @@ -65,6 +64,7 @@ create_single_source_cgal_program("_test_valid_finite_float.cpp") create_single_source_cgal_program("to_interval_test.cpp") create_single_source_cgal_program("unsigned.cpp") create_single_source_cgal_program("utilities.cpp") + find_package( GMP ) if( GMP_FOUND AND NOT CGAL_DISABLE_GMP ) create_single_source_cgal_program( "CORE_Expr_ticket_4296.cpp" ) @@ -73,6 +73,7 @@ if( GMP_FOUND AND NOT CGAL_DISABLE_GMP ) include( ${MPFI_USE_FILE} ) endif() #MPFI_FOUND endif() #GMP_FOUND AND NOT CGAL_DISABLE_GMP + if(NOT CGAL_DISABLE_GMP) create_single_source_cgal_program( "Gmpfi.cpp" ) create_single_source_cgal_program( "Gmpfr_bug.cpp" ) diff --git a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt index 25990ad8479..5ff935ae611 100644 --- a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt @@ -18,8 +18,6 @@ endif() create_single_source_cgal_program("test_implicit_shapes_bunch.cpp") target_link_libraries(test_implicit_shapes_bunch PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("test_implicit_shapes_with_features.cpp") -target_link_libraries(test_implicit_shapes_with_features - PUBLIC CGAL::Eigen3_support) +target_link_libraries(test_implicit_shapes_with_features PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("test_triply_periodic_minimal_surfaces.cpp") -target_link_libraries(test_triply_periodic_minimal_surfaces - PUBLIC CGAL::Eigen3_support) +target_link_libraries(test_triply_periodic_minimal_surfaces PUBLIC CGAL::Eigen3_support) 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 c3ccee0d7a4..c4d8da3b0a0 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 @@ -18,21 +18,10 @@ if(MSVC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE") endif() # Prints new compilation options - message( - STATUS - "USING DEBUG CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'") - message( - STATUS - "USING DEBUG EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'" - ) - message( - STATUS - "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'" - ) - message( - STATUS - "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" - ) + message(STATUS "USING DEBUG CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'") + message(STATUS "USING DEBUG EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'") + message(STATUS "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'") + message(STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'") endif() # Activate concurrency? @@ -104,6 +93,7 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(orient_scanlines_example PRIVATE ${CGAL_libs} CGAL::Eigen3_support CGAL::LASLIB_support) endif() + # Executables that require libpointmatcher find_package(libpointmatcher QUIET) include(CGAL_pointmatcher_support) diff --git a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt index 044b462442d..287652eae55 100644 --- a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt +++ b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -12,21 +12,10 @@ if(MSVC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE") # Print new compilation options - message( - STATUS - "USING DEBUG CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'") - message( - STATUS - "USING DEBUG EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'" - ) - message( - STATUS - "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'" - ) - message( - STATUS - "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" - ) + message(STATUS "USING DEBUG CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'") + message(STATUS "USING DEBUG EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'") + message(STATUS "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'") + message(STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'") endif() # Find Eigen3 (requires 3.1.0 or greater) @@ -35,13 +24,11 @@ include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) # Executables that require Eigen 3 create_single_source_cgal_program("poisson_reconstruction_example.cpp") - target_link_libraries(poisson_reconstruction_example - PUBLIC CGAL::Eigen3_support) + target_link_libraries(poisson_reconstruction_example PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("poisson_reconstruction.cpp") target_link_libraries(poisson_reconstruction PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("poisson_reconstruction_function.cpp") - target_link_libraries(poisson_reconstruction_function - PUBLIC CGAL::Eigen3_support) + target_link_libraries(poisson_reconstruction_function PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("tutorial_example.cpp") target_link_libraries(tutorial_example PUBLIC CGAL::Eigen3_support) else() diff --git a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt index e3adcb68d37..978908627f2 100644 --- a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt +++ b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -12,21 +12,10 @@ if(MSVC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE") # Prints new compilation options - message( - STATUS - "USING DEBUG CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'") - message( - STATUS - "USING DEBUG EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'" - ) - message( - STATUS - "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'" - ) - message( - STATUS - "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" - ) + message(STATUS "USING DEBUG CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}'") + message(STATUS "USING DEBUG EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_DEBUG}'") + message(STATUS "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'") + message(STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'") endif() # Temporary debugging stuff find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) diff --git a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt index 44b2282519a..ccd26052b98 100644 --- a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt @@ -16,7 +16,6 @@ if(NOT Boost_FOUND) STATUS "This project requires the Boost library, and will not be compiled.") return() - endif() # include for local directory @@ -33,7 +32,7 @@ if (FAST_ENVELOPE_BUILD_DIR) message(STATUS "Using ${FAST_ENVELOPE_BUILD_DIR} as build directory of fast-evelope") include_directories("${FAST_ENVELOPE_BUILD_DIR}/include") - link_directories ( "${FAST_ENVELOPE_BUILD_DIR}/lib" "${FAST_ENVELOPE_BUILD_DIR}" "${FAST_ENVELOPE_BUILD_DIR}/tbb" ) + link_directories ( "${FAST_ENVELOPE_BUILD_DIR}/lib" "${FAST_ENVELOPE_BUILD_DIR}" "${FAST_ENVELOPE_BUILD_DIR}/tbb") find_package(OpenMP) if (OPENMP_FOUND) @@ -42,7 +41,7 @@ if (FAST_ENVELOPE_BUILD_DIR) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") endif() - create_single_source_cgal_program( "fastE.cpp" ) + create_single_source_cgal_program("fastE.cpp") target_link_libraries( fastE PUBLIC CGAL::Eigen3_support) target_link_libraries( fastE PUBLIC FastEnvelope IndirectPredicates geogram) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index 909dd292063..9eb13d3458e 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -140,7 +140,6 @@ endif() find_package(Ceres QUIET) include(CGAL_Ceres_support) - if(TARGET CGAL::Ceres_support AND TARGET CGAL::Eigen3_support) target_link_libraries( test_mesh_smoothing PUBLIC CGAL::Eigen3_support CGAL::Ceres_support) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 68b0afc77d6..b3a6562f1c4 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.1...3.23) -project( Polyhedron_Demo ) +project(Polyhedron_Demo) include(FeatureSummary) # Find includes in corresponding build directories @@ -29,6 +29,7 @@ if(CMAKE_CXX_COMPILER_ID EQUAL Clang set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -z defs") endif() endif() + # Let plugins be compiled in the same directory as the executable. set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") @@ -60,7 +61,6 @@ set_package_properties( ) if(Qt5_FOUND) - add_definitions(-DQT_NO_KEYWORDS) add_definitions(-DSCENE_IMAGE_GL_BUFFERS_AVAILABLE) endif(Qt5_FOUND) @@ -83,7 +83,6 @@ set_package_properties( # Activate concurrency? option(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY "Enable concurrency" ON) - if(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY) find_package(TBB) include(CGAL_TBB_support) @@ -475,8 +474,7 @@ else(CGAL_Qt5_FOUND AND Qt5_FOUND) set(POLYHEDRON_MISSING_DEPS "") if(NOT CGAL_Qt5_FOUND) - set(POLYHEDRON_MISSING_DEPS - "the CGAL Qt5 library, ${POLYHEDRON_MISSING_DEPS}") + set(POLYHEDRON_MISSING_DEPS "the CGAL Qt5 library, ${POLYHEDRON_MISSING_DEPS}") endif() if(NOT Qt5_FOUND) @@ -493,8 +491,7 @@ endif(CGAL_Qt5_FOUND AND Qt5_FOUND) feature_summary( WHAT REQUIRED_PACKAGES_NOT_FOUND INCLUDE_QUIET_PACKAGES - DESCRIPTION - "NOTICE: Missing required packages that prevent the demo from being compiled:" + DESCRIPTION "NOTICE: Missing required packages that prevent the demo from being compiled:" QUIET_ON_EMPTY VAR NotFound_REQ_PACKAGES) if(NOT ${NotFound_REQ_PACKAGES} STREQUAL "") diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt index a44ae7fd8b4..4ed41201cf4 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt @@ -15,7 +15,7 @@ if(TARGET CGAL::Eigen3_support) find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning set_package_properties( OpenCV PROPERTIES - DESCRIPTION "A library for real-time computer vision." + DESCRIPTION "A library for real-time computer vision." PURPOSE "Enables the random forest predicate for the classification plugin." ) include(CGAL_OpenCV_support) @@ -54,9 +54,8 @@ if(TARGET CGAL::Eigen3_support) endif() if(TARGET CGAL::Boost_serialization_support AND TARGET CGAL::Boost_iostreams_support) - target_link_libraries(classification_plugin PUBLIC - CGAL::Boost_serialization_support - CGAL::Boost_iostreams_support) + target_link_libraries(classification_plugin PUBLIC CGAL::Boost_serialization_support + CGAL::Boost_iostreams_support) endif() if(TARGET CGAL::OpenCV_support) @@ -67,8 +66,7 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(classification_plugin PUBLIC CGAL::TBB_support) endif() - add_dependencies(classification_plugin point_set_selection_plugin - selection_plugin) + add_dependencies(classification_plugin point_set_selection_plugin selection_plugin) else() message( diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt index 0c562c8a6f2..ef370a1fbe6 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt @@ -46,11 +46,9 @@ if(TARGET CGAL::Eigen3_support) scene_points_with_normal_item CGAL::Eigen3_support) if(TARGET CGAL::SCIP_support) - target_link_libraries(surface_reconstruction_plugin - PUBLIC CGAL::SCIP_support) + target_link_libraries(surface_reconstruction_plugin PUBLIC CGAL::SCIP_support) elseif(TARGET CGAL::GLPK_support) - target_link_libraries(surface_reconstruction_plugin - PUBLIC CGAL::GLPK_support) + target_link_libraries(surface_reconstruction_plugin PUBLIC CGAL::GLPK_support) endif() qt5_wrap_ui(point_set_normal_estimationUI_FILES diff --git a/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt index f6b0e9c045b..05337f34adf 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Three_examples/CMakeLists.txt @@ -12,10 +12,9 @@ set(CMAKE_AUTOMOC ON) #Find CGAL find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5 ImageIO) # Find Qt5 itself -find_package( - Qt5 QUIET - COMPONENTS OpenGL Script Svg - OPTIONAL_COMPONENTS ScriptTools WebSockets) +find_package(Qt5 QUIET + COMPONENTS OpenGL Script Svg + OPTIONAL_COMPONENTS ScriptTools WebSockets) if(RUNNING_CGAL_AUTO_TEST) if(Qt5_FOUND) diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index 707e5835f9d..74b132ea916 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -19,6 +19,7 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(Ridges_Umbilics_SM PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program(Ridges_Umbilics_LCC.cpp) target_link_libraries(Ridges_Umbilics_LCC PUBLIC CGAL::Eigen3_support) + add_definitions("-DCGAL_USE_BOOST_PROGRAM_OPTIONS") if(TARGET Boost::program_options) target_link_libraries(Compute_Ridges_Umbilics PRIVATE Boost::program_options) diff --git a/STL_Extension/test/STL_Extension/CMakeLists.txt b/STL_Extension/test/STL_Extension/CMakeLists.txt index 2eba3848727..98018bcf782 100644 --- a/STL_Extension/test/STL_Extension/CMakeLists.txt +++ b/STL_Extension/test/STL_Extension/CMakeLists.txt @@ -2,8 +2,7 @@ # This is the CMake script for compiling a CGAL application. cmake_minimum_required(VERSION 3.1...3.23) -project( STL_Extension_Tests ) - +project(STL_Extension_Tests) find_package(CGAL REQUIRED) find_package( TBB QUIET ) @@ -18,45 +17,44 @@ else() message(STATUS "Tests that use OpenMesh will not be compiled.") endif() - -create_single_source_cgal_program( "test_Boolean_tag.cpp" ) -create_single_source_cgal_program( "test_Cache.cpp" ) -create_single_source_cgal_program( "test_Compact_container.cpp" ) -create_single_source_cgal_program( "test_Compact_container_is_used.cpp" ) -create_single_source_cgal_program( "test_complexity_tags.cpp" ) -create_single_source_cgal_program( "test_composition.cpp" ) -create_single_source_cgal_program( "test_Concatenate_iterator.cpp" ) -create_single_source_cgal_program( "test_Concurrent_compact_container.cpp" ) +create_single_source_cgal_program("test_Boolean_tag.cpp") +create_single_source_cgal_program("test_Cache.cpp") +create_single_source_cgal_program("test_Compact_container.cpp") +create_single_source_cgal_program("test_Compact_container_is_used.cpp") +create_single_source_cgal_program("test_complexity_tags.cpp") +create_single_source_cgal_program("test_composition.cpp") +create_single_source_cgal_program("test_Concatenate_iterator.cpp") +create_single_source_cgal_program("test_Concurrent_compact_container.cpp") if(TARGET CGAL::TBB_support) target_link_libraries(test_Concurrent_compact_container PUBLIC CGAL::TBB_support) endif() -create_single_source_cgal_program( "test_dispatch_output.cpp" ) -create_single_source_cgal_program( "test_Flattening_iterator.cpp" ) -create_single_source_cgal_program( "test_Handle_with_policy.cpp" ) -create_single_source_cgal_program( "test_In_place_list.cpp" ) -create_single_source_cgal_program( "test_is_iterator.cpp" ) -create_single_source_cgal_program( "test_is_streamable.cpp" ) -create_single_source_cgal_program( "test_lexcompare_outputrange.cpp" ) -create_single_source_cgal_program( "test_Modifiable_priority_queue.cpp" ) -create_single_source_cgal_program( "test_multiset.cpp" ) +create_single_source_cgal_program("test_dispatch_output.cpp") +create_single_source_cgal_program("test_Flattening_iterator.cpp") +create_single_source_cgal_program("test_Handle_with_policy.cpp") +create_single_source_cgal_program("test_In_place_list.cpp") +create_single_source_cgal_program("test_is_iterator.cpp") +create_single_source_cgal_program("test_is_streamable.cpp") +create_single_source_cgal_program("test_lexcompare_outputrange.cpp") +create_single_source_cgal_program("test_Modifiable_priority_queue.cpp") +create_single_source_cgal_program("test_multiset.cpp") create_single_source_cgal_program("test_cgal_named_params.cpp") -add_executable( test_multiset_cc "test_multiset.cpp" ) -target_link_libraries( test_multiset_cc PUBLIC CGAL::CGAL ) -target_compile_options( test_multiset_cc PUBLIC -DCGAL_MULTISET_USE_COMPACT_CONTAINER_AS_DEFAULT ) -cgal_add_test(test_multiset_cc ) +add_executable(test_multiset_cc "test_multiset.cpp") +target_link_libraries(test_multiset_cc PUBLIC CGAL::CGAL) +target_compile_options(test_multiset_cc PUBLIC -DCGAL_MULTISET_USE_COMPACT_CONTAINER_AS_DEFAULT) +cgal_add_test(test_multiset_cc) add_to_cached_list(CGAL_EXECUTABLE_TARGETS test_multiset_cc) -create_single_source_cgal_program( "test_N_tuple.cpp" ) -create_single_source_cgal_program( "test_namespaces.cpp" ) -create_single_source_cgal_program( "test_Nested_iterator.cpp" ) -create_single_source_cgal_program( "test_Object.cpp" ) -create_single_source_cgal_program( "test_stl_extension.cpp" ) -create_single_source_cgal_program( "test_type_traits.cpp" ) -create_single_source_cgal_program( "test_Uncertain.cpp" ) -create_single_source_cgal_program( "test_vector.cpp" ) -create_single_source_cgal_program( "test_join_iterators.cpp" ) -create_single_source_cgal_program( "test_for_each.cpp" ) +create_single_source_cgal_program("test_N_tuple.cpp") +create_single_source_cgal_program("test_namespaces.cpp") +create_single_source_cgal_program("test_Nested_iterator.cpp") +create_single_source_cgal_program("test_Object.cpp") +create_single_source_cgal_program("test_stl_extension.cpp") +create_single_source_cgal_program("test_type_traits.cpp") +create_single_source_cgal_program("test_Uncertain.cpp") +create_single_source_cgal_program("test_vector.cpp") +create_single_source_cgal_program("test_join_iterators.cpp") +create_single_source_cgal_program("test_for_each.cpp") if(TARGET CGAL::TBB_support) target_link_libraries(test_for_each PUBLIC CGAL::TBB_support) endif() diff --git a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt index 4c1714d2ace..2532c9defb5 100644 --- a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt +++ b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt @@ -27,6 +27,7 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(scale_space_manifold PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("scale_space_advancing_front.cpp") target_link_libraries(scale_space_advancing_front PUBLIC CGAL::Eigen3_support) + if(ACTIVATE_CONCURRENCY AND TARGET CGAL::TBB_support) target_link_libraries(scale_space PUBLIC CGAL::TBB_support) target_link_libraries(scale_space_incremental PUBLIC CGAL::TBB_support) diff --git a/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt b/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt index c59acf0e24a..3a9a7471fa9 100644 --- a/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt +++ b/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt @@ -24,5 +24,4 @@ endif() find_package(CGAL REQUIRED) create_single_source_cgal_program("test_top_edges_single_mold_trans_cast.cpp") -create_single_source_cgal_program( - "test_is_pullout_directions_single_mold_trans_cast.cpp") +create_single_source_cgal_program("test_is_pullout_directions_single_mold_trans_cast.cpp") diff --git a/Shape_detection/examples/Shape_detection/CMakeLists.txt b/Shape_detection/examples/Shape_detection/CMakeLists.txt index e677c27b214..f9f83b8095d 100644 --- a/Shape_detection/examples/Shape_detection/CMakeLists.txt +++ b/Shape_detection/examples/Shape_detection/CMakeLists.txt @@ -6,7 +6,10 @@ project(Shape_detection_Examples) find_package(CGAL REQUIRED COMPONENTS Core) -# Use Eigen. +create_single_source_cgal_program("efficient_RANSAC_with_custom_shape.cpp") +create_single_source_cgal_program("efficient_RANSAC_with_parameters.cpp") +create_single_source_cgal_program("efficient_RANSAC_with_point_access.cpp") + find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) @@ -37,9 +40,4 @@ if(TARGET CGAL::Eigen3_support) shape_detection_basic_deprecated) target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() - endif() - -create_single_source_cgal_program("efficient_RANSAC_with_custom_shape.cpp") -create_single_source_cgal_program("efficient_RANSAC_with_parameters.cpp") -create_single_source_cgal_program("efficient_RANSAC_with_point_access.cpp") diff --git a/Shape_detection/test/Shape_detection/CMakeLists.txt b/Shape_detection/test/Shape_detection/CMakeLists.txt index a80a3be8640..92e45de666c 100644 --- a/Shape_detection/test/Shape_detection/CMakeLists.txt +++ b/Shape_detection/test/Shape_detection/CMakeLists.txt @@ -6,7 +6,18 @@ project(Shape_detection_Tests) find_package(CGAL REQUIRED COMPONENTS Core) -# Use Eigen. +create_single_source_cgal_program("test_efficient_RANSAC_cone_connected_component.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_cone_parameters.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_cylinder_connected_component.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_cylinder_parameters.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_plane_connected_component.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_plane_parameters.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_sphere_connected_component.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_sphere_parameters.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_torus_connected_component.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_torus_parameters.cpp") +create_single_source_cgal_program("test_efficient_RANSAC_scene.cpp") + find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) include(CGAL_Eigen3_support) if(EIGEN3_FOUND) @@ -15,14 +26,10 @@ if(EIGEN3_FOUND) create_single_source_cgal_program("test_region_growing_on_point_set_2.cpp") create_single_source_cgal_program("test_region_growing_on_point_set_3.cpp") create_single_source_cgal_program("test_region_growing_on_polygon_mesh.cpp") - create_single_source_cgal_program( - "test_region_growing_on_point_set_2_with_sorting.cpp") - create_single_source_cgal_program( - "test_region_growing_on_point_set_3_with_sorting.cpp") - create_single_source_cgal_program( - "test_region_growing_on_polygon_mesh_with_sorting.cpp") - create_single_source_cgal_program( - "test_region_growing_on_degenerated_mesh.cpp") + create_single_source_cgal_program("test_region_growing_on_point_set_2_with_sorting.cpp") + create_single_source_cgal_program("test_region_growing_on_point_set_3_with_sorting.cpp") + create_single_source_cgal_program("test_region_growing_on_polygon_mesh_with_sorting.cpp") + create_single_source_cgal_program("test_region_growing_on_degenerated_mesh.cpp") foreach( target test_region_growing_basic @@ -38,7 +45,7 @@ if(EIGEN3_FOUND) endforeach() set(RANSAC_PROTO_DIR CACHE PATH "") - if (NOT RANSAC_PROTO_DIR STREQUAL "") + if(NOT RANSAC_PROTO_DIR STREQUAL "") add_definitions(-DPOINTSWITHINDEX -DCGAL_TEST_RANSAC_PROTOTYPE) include_directories(${RANSAC_PROTO_DIR}) include_directories(${RANSAC_PROTO_DIR}/MiscLib/) @@ -53,26 +60,3 @@ if(EIGEN3_FOUND) endif() cgal_add_test(test_validity_sampled_data) endif() - -create_single_source_cgal_program( - "test_efficient_RANSAC_cone_connected_component.cpp") -create_single_source_cgal_program("test_efficient_RANSAC_cone_parameters.cpp") - -create_single_source_cgal_program( - "test_efficient_RANSAC_cylinder_connected_component.cpp") -create_single_source_cgal_program( - "test_efficient_RANSAC_cylinder_parameters.cpp") - -create_single_source_cgal_program( - "test_efficient_RANSAC_plane_connected_component.cpp") -create_single_source_cgal_program("test_efficient_RANSAC_plane_parameters.cpp") - -create_single_source_cgal_program( - "test_efficient_RANSAC_sphere_connected_component.cpp") -create_single_source_cgal_program("test_efficient_RANSAC_sphere_parameters.cpp") - -create_single_source_cgal_program( - "test_efficient_RANSAC_torus_connected_component.cpp") -create_single_source_cgal_program("test_efficient_RANSAC_torus_parameters.cpp") - -create_single_source_cgal_program("test_efficient_RANSAC_scene.cpp") diff --git a/Solver_interface/examples/Solver_interface/CMakeLists.txt b/Solver_interface/examples/Solver_interface/CMakeLists.txt index b65e4965bb5..a8ce3e9a528 100644 --- a/Solver_interface/examples/Solver_interface/CMakeLists.txt +++ b/Solver_interface/examples/Solver_interface/CMakeLists.txt @@ -9,7 +9,6 @@ find_package(CGAL REQUIRED) # Use Eigen find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) - if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("singular_value_decomposition.cpp") target_link_libraries(singular_value_decomposition PUBLIC CGAL::Eigen3_support) @@ -21,35 +20,26 @@ endif() find_package(OSQP QUIET) include(CGAL_OSQP_support) - if(TARGET CGAL::OSQP_support) - create_single_source_cgal_program("osqp_quadratic_program.cpp") target_link_libraries(osqp_quadratic_program PUBLIC CGAL::OSQP_support) message("OSQP found and used") else() - message(STATUS "NOTICE: OSQP was not found. OSQP examples won't be available.") - endif() find_package(SCIP QUIET) include(CGAL_SCIP_support) - if(TARGET CGAL::SCIP_support) - create_single_source_cgal_program("mixed_integer_program.cpp") target_link_libraries(mixed_integer_program PUBLIC CGAL::SCIP_support) message("SCIP found and used") else() - find_package(GLPK QUIET) include(CGAL_GLPK_support) - if(TARGET CGAL::GLPK_support) - create_single_source_cgal_program("mixed_integer_program.cpp") target_link_libraries(mixed_integer_program PUBLIC CGAL::GLPK_support) message("GLPK found and used") @@ -63,5 +53,4 @@ else() ) endif() - endif() diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index 811774b5ed5..9dd43a935e1 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -23,42 +23,26 @@ endif() # ########################################################## create_single_source_cgal_program("circular_query.cpp") - create_single_source_cgal_program("distance_browsing.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("searching_surface_mesh_vertices.cpp") - create_single_source_cgal_program("searching_polyhedron_vertices.cpp") - -create_single_source_cgal_program( - "searching_polyhedron_vertices_with_fuzzy_sphere.cpp") - +create_single_source_cgal_program("searching_polyhedron_vertices_with_fuzzy_sphere.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") if(TARGET CGAL::Eigen3_support) - create_single_source_cgal_program("fuzzy_range_query.cpp") target_link_libraries(fuzzy_range_query PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("general_neighbor_searching.cpp") target_link_libraries(general_neighbor_searching PUBLIC CGAL::Eigen3_support) - else() message(STATUS "fuzzy_range_query.cpp and general_neighbor_searching.cpp") diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt index e6f30275b74..49b649baf99 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt @@ -43,5 +43,4 @@ create_single_source_cgal_program("vsa_segmentation_example.cpp") target_link_libraries(vsa_segmentation_example PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("vsa_simple_approximation_example.cpp") -target_link_libraries(vsa_simple_approximation_example - PUBLIC CGAL::Eigen3_support) +target_link_libraries(vsa_simple_approximation_example PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt index 7ddddf95188..80137f8569b 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt @@ -10,17 +10,13 @@ find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("all_roi_assign_example.cpp") - create_single_source_cgal_program( - "all_roi_assign_example_custom_polyhedron.cpp") + create_single_source_cgal_program("all_roi_assign_example_custom_polyhedron.cpp") create_single_source_cgal_program("all_roi_assign_example_Surface_mesh.cpp") create_single_source_cgal_program("custom_weight_for_edges_example.cpp") - create_single_source_cgal_program( - "deform_polyhedron_with_custom_pmap_example.cpp") + create_single_source_cgal_program("deform_polyhedron_with_custom_pmap_example.cpp") create_single_source_cgal_program("k_ring_roi_translate_rotate_example.cpp") - create_single_source_cgal_program( - "k_ring_roi_translate_rotate_Surface_mesh.cpp") - create_single_source_cgal_program( - "deform_mesh_for_botsch08_format_sre_arap.cpp") + create_single_source_cgal_program("k_ring_roi_translate_rotate_Surface_mesh.cpp") + create_single_source_cgal_program("deform_mesh_for_botsch08_format_sre_arap.cpp") foreach( target @@ -38,8 +34,7 @@ if(TARGET CGAL::Eigen3_support) find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) - create_single_source_cgal_program( - "all_roi_assign_example_with_OpenMesh.cpp") + create_single_source_cgal_program("all_roi_assign_example_with_OpenMesh.cpp") target_link_libraries(all_roi_assign_example_with_OpenMesh PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) else() diff --git a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt index 56243f443ec..b0802132a2e 100644 --- a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt +++ b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt @@ -33,17 +33,11 @@ endif() # ########################################################## create_single_source_cgal_program("sdf_values_example.cpp") - create_single_source_cgal_program("segmentation_from_sdf_values_example.cpp") - create_single_source_cgal_program("segmentation_via_sdf_values_example.cpp") - create_single_source_cgal_program("segmentation_with_facet_ids_example.cpp") - create_single_source_cgal_program("segmentation_from_sdf_values_SM_example.cpp") -create_single_source_cgal_program( - "segmentation_from_sdf_values_LCC_example.cpp") - +create_single_source_cgal_program("segmentation_from_sdf_values_LCC_example.cpp") create_single_source_cgal_program("extract_segmentation_into_mesh_example.cpp") if(OpenMesh_FOUND) diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index 94b035fc9d0..3bc81426b94 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -31,14 +31,11 @@ find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) - create_single_source_cgal_program( - "parallel_insertion_and_removal_in_regular_3.cpp") + create_single_source_cgal_program("parallel_insertion_and_removal_in_regular_3.cpp") create_single_source_cgal_program("parallel_insertion_in_delaunay_3.cpp") create_single_source_cgal_program("sequential_parallel.cpp") - target_link_libraries(parallel_insertion_and_removal_in_regular_3 - PUBLIC CGAL::TBB_support) - target_link_libraries(parallel_insertion_in_delaunay_3 - PUBLIC CGAL::TBB_support) + target_link_libraries(parallel_insertion_and_removal_in_regular_3 PUBLIC CGAL::TBB_support) + target_link_libraries(parallel_insertion_in_delaunay_3 PUBLIC CGAL::TBB_support) target_link_libraries(sequential_parallel PUBLIC CGAL::TBB_support) if(BUILD_TESTING) diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index a820549bf20..20960afe639 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -19,8 +19,7 @@ create_single_source_cgal_program("test_regular_as_delaunay_3.cpp") create_single_source_cgal_program("test_regular_insert_range_with_info.cpp") create_single_source_cgal_program("test_regular_remove_3.cpp") create_single_source_cgal_program("test_regular_traits_3.cpp") -create_single_source_cgal_program( - "test_RT_cell_base_with_weighted_circumcenter_3.cpp") +create_single_source_cgal_program("test_RT_cell_base_with_weighted_circumcenter_3.cpp") create_single_source_cgal_program("test_robust_weighted_circumcenter.cpp") create_single_source_cgal_program("test_simplex_3.cpp") create_single_source_cgal_program( "test_simplex_iterator_3.cpp" ) diff --git a/Weights/test/Weights/CMakeLists.txt b/Weights/test/Weights/CMakeLists.txt index 9b7dddc43b7..81a9c9eb367 100644 --- a/Weights/test/Weights/CMakeLists.txt +++ b/Weights/test/Weights/CMakeLists.txt @@ -12,16 +12,12 @@ create_single_source_cgal_program("test_shepard_weights.cpp") create_single_source_cgal_program("test_inverse_distance_weights.cpp") create_single_source_cgal_program("test_three_point_family_weights.cpp") create_single_source_cgal_program("test_projected_weights.cpp") - create_single_source_cgal_program("test_wachspress_weights.cpp") create_single_source_cgal_program("test_authalic_weights.cpp") - create_single_source_cgal_program("test_mean_value_weights.cpp") create_single_source_cgal_program("test_tangent_weights.cpp") - create_single_source_cgal_program("test_discrete_harmonic_weights.cpp") create_single_source_cgal_program("test_cotangent_weights.cpp") - create_single_source_cgal_program("test_uniform_region_weights.cpp") create_single_source_cgal_program("test_triangular_region_weights.cpp") create_single_source_cgal_program("test_barycentric_region_weights.cpp") From 7cb21c24b05346c4fe95922527093f1fd14ae926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 6 Sep 2022 16:07:31 +0200 Subject: [PATCH 02/60] Uniformize message() for missing 3rd party libraries STATUS for non-essential, NOTICE for important stuff --- AABB_tree/benchmark/AABB_tree/CMakeLists.txt | 2 + AABB_tree/demo/AABB_tree/CMakeLists.txt | 5 +- .../Algebraic_kernel_d/CMakeLists.txt | 2 +- .../test/Algebraic_kernel_d/CMakeLists.txt | 7 +-- .../demo/Alpha_shapes_3/CMakeLists.txt | 4 +- .../test/Arithmetic_kernel/CMakeLists.txt | 10 +--- .../Arrangement_on_surface_2/CMakeLists.txt | 3 +- BGL/examples/BGL_OpenMesh/CMakeLists.txt | 2 + BGL/examples/BGL_polyhedron_3/CMakeLists.txt | 4 +- BGL/examples/BGL_surface_mesh/CMakeLists.txt | 2 +- BGL/test/BGL/CMakeLists.txt | 2 +- .../Barycentric_coordinates_2/CMakeLists.txt | 4 +- .../Barycentric_coordinates_2/CMakeLists.txt | 4 +- .../Barycentric_coordinates_2/CMakeLists.txt | 2 +- .../Boolean_set_operations_2/CMakeLists.txt | 5 +- .../test/Box_intersection_d/CMakeLists.txt | 3 +- CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt | 5 +- CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt | 11 ++-- .../demo/Circular_kernel_3/CMakeLists.txt | 4 +- .../examples/Classification/CMakeLists.txt | 14 ++--- .../test/Classification/CMakeLists.txt | 13 +--- .../examples/Cone_spanners_2/CMakeLists.txt | 7 +-- .../examples/Convex_hull_3/CMakeLists.txt | 2 + .../demo/Alpha_shapes_2/CMakeLists.txt | 5 +- .../demo/Apollonius_graph_2/CMakeLists.txt | 6 +- .../demo/Bounding_volumes/CMakeLists.txt | 3 +- .../demo/Circular_kernel_2/CMakeLists.txt | 3 +- GraphicsView/demo/Generator/CMakeLists.txt | 4 +- GraphicsView/demo/GraphicsView/CMakeLists.txt | 3 +- .../demo/L1_Voronoi_diagram_2/CMakeLists.txt | 3 +- .../demo/Largest_empty_rect_2/CMakeLists.txt | 4 +- .../Periodic_2_triangulation_2/CMakeLists.txt | 3 +- GraphicsView/demo/Polygon/CMakeLists.txt | 12 +--- .../Segment_Delaunay_graph_2/CMakeLists.txt | 6 +- .../CMakeLists.txt | 5 +- .../demo/Snap_rounding_2/CMakeLists.txt | 6 +- .../demo/Spatial_searching_2/CMakeLists.txt | 4 +- .../demo/Stream_lines_2/CMakeLists.txt | 3 +- .../demo/Triangulation_2/CMakeLists.txt | 6 +- .../examples/Heat_method_3/CMakeLists.txt | 6 +- .../test/Heat_method_3/CMakeLists.txt | 5 +- .../Hyperbolic_triangulation_2/CMakeLists.txt | 5 +- Installation/CMakeLists.txt | 3 +- .../modules/CGAL_pointmatcher_support.cmake | 2 +- .../examples/Jet_fitting_3/CMakeLists.txt | 12 +--- .../test/Jet_fitting_3/CMakeLists.txt | 5 +- .../demo/Linear_cell_complex/CMakeLists.txt | 3 +- Mesh_3/examples/Mesh_3/CMakeLists.txt | 16 ++--- NewKernel_d/test/NewKernel_d/CMakeLists.txt | 12 +--- .../Optimal_bounding_box/CMakeLists.txt | 3 +- .../Optimal_bounding_box/CMakeLists.txt | 3 +- .../test/Optimal_bounding_box/CMakeLists.txt | 3 +- .../CMakeLists.txt | 15 ++--- .../test/Periodic_3_mesh_3/CMakeLists.txt | 3 +- .../Periodic_3_triangulation_3/CMakeLists.txt | 5 +- .../demo/Periodic_Lloyd_3/CMakeLists.txt | 5 +- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 6 +- .../CMakeLists.txt | 8 +-- .../examples/Point_set_3/CMakeLists.txt | 2 + Point_set_3/test/Point_set_3/CMakeLists.txt | 4 +- .../Point_set_processing_3/CMakeLists.txt | 25 ++------ .../Point_set_processing_3/CMakeLists.txt | 11 ++-- .../CMakeLists.txt | 4 +- .../Polygon_mesh_processing/CMakeLists.txt | 9 +-- .../Polygon_mesh_processing/CMakeLists.txt | 9 ++- .../CMakeLists.txt | 10 +--- .../CMakeLists.txt | 10 +--- Polyhedron/demo/Polyhedron/CMakeLists.txt | 60 +++++++------------ .../Plugins/Classification/CMakeLists.txt | 15 +---- .../demo/Polyhedron/Plugins/IO/CMakeLists.txt | 34 +++-------- .../Polyhedron/Plugins/Mesh_3/CMakeLists.txt | 33 +++------- .../Operations_on_polyhedra/CMakeLists.txt | 4 +- .../Polyhedron/Plugins/PMP/CMakeLists.txt | 21 ++----- .../Plugins/Point_set/CMakeLists.txt | 46 ++++---------- .../Plugins/Surface_mesh/CMakeLists.txt | 5 +- .../Surface_mesh_deformation/CMakeLists.txt | 5 +- .../implicit_functions/CMakeLists.txt | 5 +- .../Polyline_simplification_2/CMakeLists.txt | 3 +- .../CMakeLists.txt | 10 +--- .../CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- .../examples/Property_map/CMakeLists.txt | 2 + Ridges_3/examples/Ridges_3/CMakeLists.txt | 10 +--- Ridges_3/test/Ridges_3/CMakeLists.txt | 7 +-- .../test/STL_Extension/CMakeLists.txt | 2 + .../CMakeLists.txt | 9 +-- .../test/Shape_detection/CMakeLists.txt | 2 + .../Shape_regularization/CMakeLists.txt | 2 +- .../Shape_regularization/CMakeLists.txt | 4 +- .../test/Shape_regularization/CMakeLists.txt | 2 +- .../examples/Skin_surface_3/CMakeLists.txt | 5 +- .../examples/Solver_interface/CMakeLists.txt | 20 +++---- .../examples/Spatial_searching/CMakeLists.txt | 11 +--- .../Straight_skeleton_2/CMakeLists.txt | 2 +- .../test/Stream_support/CMakeLists.txt | 5 +- Surface_mesh/test/Surface_mesh/CMakeLists.txt | 2 +- .../Surface_mesh_approximation/CMakeLists.txt | 3 +- .../Surface_mesh_approximation/CMakeLists.txt | 3 +- .../optimal_rotation/CMakeLists.txt | 5 +- .../Surface_mesh_deformation/CMakeLists.txt | 5 +- .../Surface_mesh_deformation/CMakeLists.txt | 7 +-- .../Surface_mesh_deformation/CMakeLists.txt | 7 +-- .../CMakeLists.txt | 15 +---- .../CMakeLists.txt | 5 +- .../Surface_mesh_shortest_path/CMakeLists.txt | 2 +- .../Surface_mesh_shortest_path/CMakeLists.txt | 10 +--- .../CMakeLists.txt | 5 +- .../CMakeLists.txt | 5 +- .../CMakeLists.txt | 6 +- .../examples/Surface_mesher/CMakeLists.txt | 6 +- .../Tetrahedral_remeshing/CMakeLists.txt | 2 +- .../applications/Triangulation/CMakeLists.txt | 4 ++ .../benchmark/Triangulation/CMakeLists.txt | 5 +- .../examples/Triangulation/CMakeLists.txt | 10 +--- .../test/Triangulation/CMakeLists.txt | 10 +--- .../examples/Triangulation_2/CMakeLists.txt | 5 +- .../demo/Triangulation_3/CMakeLists.txt | 5 +- .../examples/Triangulation_3/CMakeLists.txt | 4 +- .../test/Triangulation_3/CMakeLists.txt | 2 + .../Triangulation_on_sphere_2/CMakeLists.txt | 2 +- .../Triangulation_on_sphere_2/CMakeLists.txt | 4 +- .../examples/Voronoi_diagram_2/CMakeLists.txt | 2 + .../test/Voronoi_diagram_2/CMakeLists.txt | 3 +- Weights/examples/Weights/CMakeLists.txt | 2 +- 125 files changed, 257 insertions(+), 616 deletions(-) diff --git a/AABB_tree/benchmark/AABB_tree/CMakeLists.txt b/AABB_tree/benchmark/AABB_tree/CMakeLists.txt index 162d8cd9a15..3a314302b01 100644 --- a/AABB_tree/benchmark/AABB_tree/CMakeLists.txt +++ b/AABB_tree/benchmark/AABB_tree/CMakeLists.txt @@ -12,6 +12,8 @@ find_package(benchmark) if (benchmark_FOUND) create_single_source_cgal_program("tree_creation.cpp") target_link_libraries(tree_creation benchmark::benchmark) +else() + message(STATUS "NOTICE: The benchmark 'tree_creation.cpp' requires the Google benchmark library, and will not be compiled.") endif() create_single_source_cgal_program("test.cpp") create_single_source_cgal_program("tree_construction.cpp") diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt index c8a7e6dffce..c777eba1798 100644 --- a/AABB_tree/demo/AABB_tree/CMakeLists.txt +++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt @@ -73,9 +73,6 @@ else(CGAL_Qt5_FOUND AND Qt5_FOUND) set(AABB_MISSING_DEPS "Qt5, ${AABB_MISSING_DEPS}") endif() - message( - STATUS - "NOTICE: This demo requires ${AABB_MISSING_DEPS}and will not be compiled." - ) + message("NOTICE: This demo requires ${AABB_MISSING_DEPS}, and will not be compiled.") endif(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt index de5a1876957..841c0b28d95 100644 --- a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt @@ -14,5 +14,5 @@ if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP) create_single_source_cgal_program("Sign_at_1.cpp") create_single_source_cgal_program("Solve_1.cpp") else() - message(STATUS "This program requires the CGAL, CGAL_Core and MPFI libraries, and will not be compiled.") + message("NOTICE: This project requires the MPFI library and GMP support, and will not be compiled.") endif() diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt index 850c3396759..1a16e619149 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt @@ -52,14 +52,13 @@ if(NOT CGAL_DISABLE_GMP) create_single_source_cgal_program("Curve_analysis_2.cpp") create_single_source_cgal_program("Curve_pair_analysis_2.cpp") create_single_source_cgal_program("Real_embeddable_traits_extension.cpp") + if(RS_FOUND) create_single_source_cgal_program("Algebraic_kernel_rs_gmpq_d_1.cpp") create_single_source_cgal_program("Algebraic_kernel_rs_gmpz_d_1.cpp") else() - message( - STATUS - "NOTICE: Some tests require the RS library, and will not be compiled.") + message(STATUS "NOTICE: Some tests require the RS library, and will not be compiled.") endif() else() - message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.") + message(STATUS "NOTICE: Some tests require GMP support, and will not be compiled.") endif() diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt index dde215bbeee..27ebe2ddbf6 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt @@ -47,8 +47,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) else() - message( - STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled." - ) + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt b/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt index 3c1e32fa19f..cb56ac2bc55 100644 --- a/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt +++ b/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt @@ -27,16 +27,13 @@ if(GMP_FOUND) # version needs GMP>=4.2, so we require this dependency only here and # not in FindMPFI.cmake if(_IS_GMP_VERSION_TO_LOW) - message( - STATUS - "MPFI tests need GMP>=4.2, some of the tests will not be compiled") + message(STATUS "NOTICE: MPFI tests need GMP>=4.2, some of the tests will not be compiled") else(_IS_GMP_VERSION_TO_LOW) include(${MPFI_USE_FILE}) create_single_source_cgal_program("GMP_arithmetic_kernel.cpp") endif(_IS_GMP_VERSION_TO_LOW) else(MPFI_FOUND) - message( - STATUS "MPFI is not present, some of the tests will not be compiled.") + message(STATUS "NOTICE: MPFI is not present, some of the tests will not be compiled.") endif(MPFI_FOUND) create_single_source_cgal_program("Arithmetic_kernel.cpp") @@ -46,7 +43,6 @@ if(GMP_FOUND) else() - message( - STATUS "This program requires the CGAL library, and will not be compiled.") + message("NOTICE: This project requires GMP support, and will not be compiled.") endif() diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt index e91295a5d90..35940772325 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt @@ -133,6 +133,5 @@ else() if(NOT Qt5_FOUND) set(MISSING_DEPS "Qt5, ${MISSING_DEPS}") endif() - message(STATUS - "NOTICE: This demo requires ${MISSING_DEPS} and will not be compiled.") + message("NOTICE: This demo requires ${MISSING_DEPS} and will not be compiled.") endif() diff --git a/BGL/examples/BGL_OpenMesh/CMakeLists.txt b/BGL/examples/BGL_OpenMesh/CMakeLists.txt index ca213799b53..19ade1e416b 100644 --- a/BGL/examples/BGL_OpenMesh/CMakeLists.txt +++ b/BGL/examples/BGL_OpenMesh/CMakeLists.txt @@ -41,4 +41,6 @@ endif() if(OpenMesh_FOUND) create_single_source_cgal_program("TriMesh.cpp") target_link_libraries(TriMesh PRIVATE ${OPENMESH_LIBRARIES}) +else() + message("NOTICE: This project requires OpenMesh and will not be compiled.") endif() diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index 51c84c35aed..f898cb277fa 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -41,7 +41,7 @@ if(OpenMesh_FOUND) target_link_libraries( copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES} ) target_compile_definitions( copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH ) else() - message(STATUS "Examples that use OpenMesh will not be compiled.") + message(STATUS "NOTICE: The example 'copy_polyhedron' requires OpenMesh, and will not be compiled.") endif() find_package( METIS ) @@ -50,5 +50,5 @@ if( TARGET CGAL::METIS_support ) create_single_source_cgal_program( "polyhedron_partition.cpp" ) target_link_libraries( polyhedron_partition PUBLIC CGAL::METIS_support) else() - message( STATUS "Examples that use the METIS library will not be compiled." ) + message(STATUS "NOTICE: The example 'polyhedron_partition' requires the METIS library, and will not be compiled.") endif() diff --git a/BGL/examples/BGL_surface_mesh/CMakeLists.txt b/BGL/examples/BGL_surface_mesh/CMakeLists.txt index b96ec0308e1..e53938277bb 100644 --- a/BGL/examples/BGL_surface_mesh/CMakeLists.txt +++ b/BGL/examples/BGL_surface_mesh/CMakeLists.txt @@ -18,5 +18,5 @@ if( TARGET CGAL::METIS_support ) create_single_source_cgal_program( "surface_mesh_partition.cpp" ) target_link_libraries( surface_mesh_partition PUBLIC CGAL::METIS_support ) else() - message(STATUS "Examples that use the METIS library will not be compiled.") + message(STATUS "NOTICE: Examples that use the METIS library will not be compiled.") endif() diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index 8a06a97cb2a..f695c456d7d 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -118,5 +118,5 @@ if(3MF_LIBRARIES AND 3MF_INCLUDE_DIR AND EXISTS "${3MF_INCLUDE_DIR}/Model/COM/N target_link_libraries(test_3mf_to_sm PRIVATE ${3MF_LIBRARIES}) target_compile_definitions(test_3mf_to_sm PRIVATE -DCGAL_LINKED_WITH_3MF) else() - message(STATUS "NOTICE : This program requires the lib3MF library, and will not be compiled.") + message(STATUS "NOTICE: The test 'test_3mf_to_sm' requires the lib3MF library, and will not be compiled.") endif() diff --git a/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt index f8b37af9c4b..9aa881ce12f 100644 --- a/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt @@ -19,12 +19,10 @@ create_single_source_cgal_program("benchmark_mv_34_vertices.cpp") find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) - create_single_source_cgal_program("benchmark_hm_4_vertices.cpp") target_link_libraries(benchmark_hm_4_vertices PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("benchmark_hm_n_vertices.cpp") target_link_libraries(benchmark_hm_n_vertices PUBLIC CGAL::Eigen3_support) - else() - message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.") + message(STATUS "NOTICE: Several benchmarks require the Eigen library, and will not be compiled.") endif() diff --git a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt index 547eb21203d..95f907fbb10 100644 --- a/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/examples/Barycentric_coordinates_2/CMakeLists.txt @@ -20,14 +20,12 @@ create_single_source_cgal_program("deprecated_coordinates.cpp") find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) - create_single_source_cgal_program("affine_coordinates.cpp") target_link_libraries(affine_coordinates PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("harmonic_coordinates.cpp") target_link_libraries(harmonic_coordinates PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("shape_deformation.cpp") target_link_libraries(shape_deformation PUBLIC CGAL::Eigen3_support) - else() - message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.") + message(STATUS "NOTICE: Several examples require the Eigen library, and will not be compiled.") endif() diff --git a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt index 41c76ac2db2..e147d8f5dae 100644 --- a/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/test/Barycentric_coordinates_2/CMakeLists.txt @@ -56,5 +56,5 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("test_bc_all_coordinates.cpp") target_link_libraries(test_bc_all_coordinates PUBLIC CGAL::Eigen3_support) else() - message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.") + message(STATUS "NOTICE: Several tests require the Eigen library, and will not be compiled.") endif() diff --git a/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt b/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt index 73a02373208..f24ead2e8bd 100644 --- a/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt +++ b/Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt @@ -18,8 +18,5 @@ endforeach() if(CGAL_Qt5_FOUND) target_link_libraries(draw_polygon_set PUBLIC CGAL::CGAL_Basic_viewer) else() - message( - STATUS - "NOTICE: The example draw_polygon_set requires Qt and drawing will be disabled." - ) + message(STATUS "NOTICE: The example 'draw_polygon_set' requires Qt and drawing will be disabled.") endif() diff --git a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt index 1d331fd485f..81d14bb28d7 100644 --- a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt +++ b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt @@ -18,6 +18,5 @@ create_single_source_cgal_program("test_Has_member_report.cpp") if(TARGET CGAL::TBB_support) target_link_libraries(test_box_grid PUBLIC CGAL::TBB_support) else() - message( - STATUS "NOTICE: Intel TBB was not found. Sequential code will be used.") + message(STATUS "NOTICE: Intel TBB was not found. Sequential code will be used.") endif() diff --git a/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt b/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt index 8e2edfb8f13..81349809977 100644 --- a/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt +++ b/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt @@ -9,8 +9,5 @@ find_package(CGAL REQUIRED COMPONENTS ImageIO) if(WITH_CGAL_ImageIO) create_single_source_cgal_program("test_trilinear_interpolation.cpp") else() - message( - STATUS - "NOTICE: Some tests require the CGAL_ImageIO library, and will not be compiled." - ) + message("NOTICE: This project requires the CGAL_ImageIO library, and will not be compiled.") endif() diff --git a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt index 1a6c6591822..8944aae476d 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt @@ -25,17 +25,14 @@ include(${CGAL_USE_FILE}) find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS - "NOTICE: This project requires the Eigen library, and will not be compiled." - ) + message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() endif() find_package(IPE 7) if(IPE_FOUND) - if ( NOT ${IPE_VERSION} EQUAL "7") - message("-- Error: ${IPE_VERSION} is not a supported version of IPE (only 7 is).") + if(NOT ${IPE_VERSION} EQUAL "7") + message("NOTICE: ${IPE_VERSION} is not a supported version of IPE (only 7 is).") set(IPE_FOUND FALSE) endif() endif() @@ -117,5 +114,5 @@ if(IPE_FOUND AND IPE_VERSION) cgal_add_compilation_test(simple_triangulation) else() - message(STATUS "NOTICE: This program requires the Ipe include files and library, and will not be compiled.") + message("NOTICE: This project requires the Ipe include files and library, and will not be compiled.") endif() diff --git a/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt b/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt index 651458bf5c0..54c3be3aba4 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt +++ b/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt @@ -33,8 +33,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) else() - message( - STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled." - ) + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index aef4c8b5952..2af17775b7c 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -23,17 +23,12 @@ include(CGAL_Boost_serialization_support) include(CGAL_Boost_iostreams_support) if(NOT TARGET CGAL::Boost_serialization_support) - message( - STATUS - "NOTICE: This project requires Boost Serialization, and will not be compiled." - ) + message("NOTICE: This project requires Boost Serialization, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() + if(NOT TARGET CGAL::Boost_iostreams_support) - message( - STATUS - "NOTICE: This project requires Boost IO Streams, and will not be compiled." - ) + message("NOTICE: This project requires Boost IO Streams, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() @@ -49,8 +44,7 @@ endif() find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires the Eigen library, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index 8e6794dae27..63ba324644c 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -23,26 +23,19 @@ include(CGAL_Boost_serialization_support) include(CGAL_Boost_iostreams_support) if(NOT TARGET CGAL::Boost_serialization_support) - message( - STATUS - "NOTICE: This project requires Boost Serialization, and will not be compiled." - ) + message("NOTICE: This project requires Boost Serialization, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() if(NOT TARGET CGAL::Boost_iostreams_support) - message( - STATUS - "NOTICE: This project requires Boost IO Streams, and will not be compiled." - ) + message("NOTICE: This project requires Boost IO Streams, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires the Eigen library, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() diff --git a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt index 608e8c0a839..06592fa2548 100644 --- a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt +++ b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt @@ -21,10 +21,5 @@ if(CGAL_Core_FOUND OR LEDA_FOUND) create_single_source_cgal_program("${cppfile}") endforeach() else() - - message( - STATUS - "This program requires the CGAL_Core library (or LEDA), and will not be compiled." - ) - + message("NOTICE: This program requires the CGAL_Core library (or LEDA), and will not be compiled.") endif() diff --git a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt index a9ff9378850..097eb885bd6 100644 --- a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt @@ -52,4 +52,6 @@ if(OpenMesh_FOUND) target_link_libraries(quickhull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(dynamic_hull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) +else() + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() diff --git a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt index 5dfc09dac1f..0b8741ef5d2 100644 --- a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt +++ b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt @@ -47,8 +47,5 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(Alpha_shapes_2) else() - - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") - + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt index 3433ff6e691..ab0f43011f9 100644 --- a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt @@ -45,10 +45,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(Apollonius_graph_2) - else() - - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") - + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt index 311b31d8e25..8eba3017587 100644 --- a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt +++ b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt @@ -53,7 +53,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) else() - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt index 6426853a664..9b0fbd66a4a 100644 --- a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt +++ b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt @@ -51,7 +51,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) else() - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Generator/CMakeLists.txt b/GraphicsView/demo/Generator/CMakeLists.txt index 984dd76b770..b9644157f9e 100644 --- a/GraphicsView/demo/Generator/CMakeLists.txt +++ b/GraphicsView/demo/Generator/CMakeLists.txt @@ -45,8 +45,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) cgal_add_compilation_test(Generator_2) else() - message( - STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled." - ) + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/GraphicsView/CMakeLists.txt b/GraphicsView/demo/GraphicsView/CMakeLists.txt index f21185f0fbd..51617b00b87 100644 --- a/GraphicsView/demo/GraphicsView/CMakeLists.txt +++ b/GraphicsView/demo/GraphicsView/CMakeLists.txt @@ -31,7 +31,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) cgal_add_compilation_test(min) else() - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt index f853f269b66..3345c6df337 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt @@ -51,7 +51,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) else() - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt index 02e1504bfa2..ff7f9dc4b71 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt +++ b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt @@ -46,8 +46,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) cgal_add_compilation_test(Largest_empty_rectangle_2) else() - message( - STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled." - ) + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt index 1fcba00f1bb..993391e843a 100644 --- a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt @@ -58,7 +58,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) cgal_add_compilation_test(Periodic_2_Delaunay_triangulation_2) else() - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index d59836a1962..fc0a5e8cda2 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -18,10 +18,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5 Core) find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS - "NOTICE: This project requires the Eigen library, and will not be compiled." - ) + message("NOTICE: This demo requires the Eigen library, and will not be compiled.") return() endif() @@ -60,10 +57,5 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(Polygon_2) else() - - message( - STATUS - "NOTICE: This demo requires CGAL, CGAL_Core, and Qt5, and will not be compiled." - ) - + message("NOTICE: This demo requires CGAL, CGAL_Core, and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt index 33153f23df0..2615db48f37 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt @@ -50,10 +50,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(Segment_voronoi_2) - else() - - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") - + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt index 2c46585863c..5f80bc0a62e 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt @@ -50,8 +50,5 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(Segment_voronoi_linf_2) else() - - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") - + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt index 6aa164e6d86..34af3f712aa 100644 --- a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt +++ b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt @@ -44,10 +44,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(Snap_rounding_2) - else() - - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") - + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt index 9fb9c869f2b..a67f0aa90d8 100644 --- a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt +++ b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt @@ -46,8 +46,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) cgal_add_compilation_test(Spatial_searching_2) else() - message( - STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled." - ) + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt index 36f479ebe4d..e45c19bc07a 100644 --- a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt +++ b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt @@ -48,7 +48,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) else() - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/GraphicsView/demo/Triangulation_2/CMakeLists.txt b/GraphicsView/demo/Triangulation_2/CMakeLists.txt index fdf6a86dd26..4560bc339dc 100644 --- a/GraphicsView/demo/Triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Triangulation_2/CMakeLists.txt @@ -19,10 +19,8 @@ set(CMAKE_INCLUDE_CURRENT_DIR TRUE) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) find_package(Qt5 QUIET COMPONENTS Widgets) -if(NOT CGAL_Qt5_FOUND - OR NOT Qt5_FOUND) - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") +if(NOT CGAL_Qt5_FOUND OR NOT Qt5_FOUND) + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") return() endif() diff --git a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt index b766023186e..5d52ae0861b 100644 --- a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt @@ -21,12 +21,8 @@ endif() find_package(Eigen3 3.3.0) include(CGAL_Eigen3_support) - if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS - "This project requires the Eigen library (3.3 or greater), and will not be compiled." - ) + message("NOTICE: These examples require the Eigen library (3.3 or greater), and will not be compiled.") return() endif() diff --git a/Heat_method_3/test/Heat_method_3/CMakeLists.txt b/Heat_method_3/test/Heat_method_3/CMakeLists.txt index 98bd95f5d56..b248cc08734 100644 --- a/Heat_method_3/test/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/test/Heat_method_3/CMakeLists.txt @@ -22,10 +22,7 @@ endif() find_package(Eigen3 3.3.0) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS - "This project requires the Eigen library (3.3 or greater), and will not be compiled." - ) + message("NOTICE: These tests require the Eigen library (3.3 or greater), and will not be compiled.") return() endif() diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt index 1236c0453b1..b61e95c544a 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt @@ -39,8 +39,5 @@ if(CGAL_Qt5_FOUND include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test( HDT2 ) else() - message( - STATUS - "NOTICE: This demo requires CGAL, CGAL_Core (or LEDA), and Qt5 and will not be compiled." - ) + message("NOTICE: This demo requires CGAL_Core (or LEDA), and Qt5 and will not be compiled.") endif() diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 19ba65d9900..3c0e1ec0fdb 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -24,8 +24,7 @@ include(GNUInstallDirs) if(CGAL_BRANCH_BUILD) - message( - STATUS "Build CGAL from ${CGAL_SCM_NAME}-branch: ${CGAL_SCM_BRANCH_NAME}") + message(STATUS "Build CGAL from ${CGAL_SCM_NAME}-branch: ${CGAL_SCM_BRANCH_NAME}") # list packages file( diff --git a/Installation/cmake/modules/CGAL_pointmatcher_support.cmake b/Installation/cmake/modules/CGAL_pointmatcher_support.cmake index ab55c3b86f9..19ca4ed14de 100644 --- a/Installation/cmake/modules/CGAL_pointmatcher_support.cmake +++ b/Installation/cmake/modules/CGAL_pointmatcher_support.cmake @@ -11,6 +11,6 @@ if(libpointmatcher_FOUND AND NOT TARGET CGAL::pointmatcher_support) target_include_directories(CGAL::pointmatcher_support INTERFACE "${libpointmatcher_INCLUDE_DIR}") target_link_libraries(CGAL::pointmatcher_support INTERFACE ${libpointmatcher_LIBRARIES}) else() - message(STATUS "NOTICE : the libpointmatcher library requires the following boost components: thread filesystem system program_options date_time chrono.") + message(STATUS "NOTICE: the libpointmatcher library requires the following boost components: thread filesystem system program_options date_time chrono.") endif() endif() diff --git a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt index 37576cd9dce..e3c35fe60a2 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt @@ -10,9 +10,9 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) + # Link with Boost.ProgramOptions (optional) find_package(Boost QUIET COMPONENTS program_options) - if(Boost_PROGRAM_OPTIONS_FOUND) create_single_source_cgal_program("Mesh_estimation.cpp") target_link_libraries(Mesh_estimation PUBLIC CGAL::Eigen3_support) @@ -22,18 +22,12 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(Mesh_estimation PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) endif() else() - message( - STATUS - "NOTICE: This program requires Boost Program Options and will not be compiled." - ) + message(STATUS "NOTICE: The example 'Mesh_estimation' requires Boost Program Options, and will not be compiled.") endif() create_single_source_cgal_program("Single_estimation.cpp") target_link_libraries(Single_estimation PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "NOTICE: This program requires Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: These examples require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt index 55604c4c554..c371969ef24 100644 --- a/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt @@ -13,8 +13,5 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("blind_1pt.cpp") target_link_libraries(blind_1pt PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "NOTICE: This program requires Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt index 8f715aac084..06cbe3335e9 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt @@ -48,8 +48,7 @@ if(NOT (CGAL_Qt5_FOUND AND Qt5_FOUND)) - message(STATUS "NOTICE: This demo requires CGAL, " - "and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") else() diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index b91fb018970..1044f4486a7 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -23,9 +23,9 @@ endif() find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( STATUS "NOTICE: All examples need the Eigen3 library, and will not be compiled." ) + message("NOTICE: All examples require the Eigen3 library, and will not be compiled.") return() -endif() #CGAL::Eigen_3_support +endif() find_package(VTK QUIET COMPONENTS vtkImagingGeneral vtkIOImage NO_MODULE) if(VTK_FOUND) @@ -166,21 +166,15 @@ if(TARGET CGAL::CGAL_ImageIO) target_link_libraries(mesh_3D_weighted_image PUBLIC CGAL::Eigen3_support CGAL::ITK_support) else(ITK_FOUND) - message(STATUS "NOTICE: The examples that need ITK will not be compiled.") + message(STATUS "NOTICE: The examples that need ITK will not be compiled.") endif(ITK_FOUND) else() - message( - STATUS - "NOTICE: The examples mesh_3D_image.cpp, mesh_3D_weighted_image.cpp, mesh_3D_image_variable_size.cpp, mesh_optimization_example.cpp and mesh_optimization_lloyd_example.cpp need CGAL_ImageIO to be configured with ZLIB support, and will not be compiled." - ) + message(STATUS "NOTICE: The examples mesh_3D_image.cpp, mesh_3D_weighted_image.cpp, mesh_3D_image_variable_size.cpp, mesh_optimization_example.cpp and mesh_optimization_lloyd_example.cpp need CGAL_ImageIO to be configured with ZLIB support, and will not be compiled.") endif() else() - message( - STATUS - "NOTICE: Some examples need the CGAL_ImageIO library, and will not be compiled." - ) + message(STATUS "NOTICE: Some examples need the CGAL_ImageIO library, and will not be compiled.") endif() if(CGAL_ACTIVATE_CONCURRENT_MESH_3 AND TARGET CGAL::TBB_support) diff --git a/NewKernel_d/test/NewKernel_d/CMakeLists.txt b/NewKernel_d/test/NewKernel_d/CMakeLists.txt index c8d8f00f844..103bcabd9ca 100644 --- a/NewKernel_d/test/NewKernel_d/CMakeLists.txt +++ b/NewKernel_d/test/NewKernel_d/CMakeLists.txt @@ -6,10 +6,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(NewKernel_d_Tests) if(CMAKE_COMPILER_IS_GNUCCX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4) - message( - STATUS - "NOTICE: this directory requires a version of gcc >= 4.4, and will not be compiled." - ) + message("NOTICE: this directory requires a version of gcc >= 4.4, and will not be compiled.") return() endif() @@ -28,10 +25,5 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() else() - - message( - STATUS - "NOTICE: These programs require the Eigen3 library, and will not be compiled." - ) - + message("NOTICE: These programs require the Eigen3 library, and will not be compiled.") endif() diff --git a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt index d7c0b148f90..cb165f79427 100644 --- a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt @@ -13,8 +13,7 @@ include(${CGAL_USE_FILE}) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() endif() diff --git a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt index 822eb0d43c4..e35a681812b 100644 --- a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt @@ -9,8 +9,7 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() endif() diff --git a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt index e3f74be5219..bd6f6a443b3 100644 --- a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt @@ -9,8 +9,7 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() endif() diff --git a/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt b/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt index fe35cc31bb4..81e68f53bd3 100644 --- a/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt +++ b/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt @@ -33,14 +33,10 @@ find_path( DOC "Path to the header of the CImg library") if(CIMG_INCLUDE_DIR) - message( - STATUS "CImg library found, the demo can load point set from image files.") + message(STATUS "NOTICE: CImg library found, the demo can load point set from image files.") else() - message( - STATUS - "CImg library was not found, the demo will not be able to load point set from image files. " - "Try setting the environment variable CIMG_INC_DIR to point to the path of the directory containing CImg.h." - ) + message(STATUS "CImg library was not found, the demo will not be able to load point set from image files. " + "Try setting the environment variable CIMG_INC_DIR to point to the path of the directory containing CImg.h.") endif() if(CGAL_Qt5_FOUND AND Qt5_FOUND) @@ -105,10 +101,7 @@ else( set(OTR2_MISSING_DEPS "Qt5.4, ${OTR2_MISSING_DEPS}") endif() - message( - STATUS - "NOTICE: This demo requires ${OTR2_MISSING_DEPS}and will not be compiled." - ) + message("NOTICE: This demo requires ${OTR2_MISSING_DEPS} and will not be compiled.") endif( CGAL_Qt5_FOUND diff --git a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt index 5ff935ae611..22faeaf1c29 100644 --- a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt @@ -10,8 +10,7 @@ find_package(CGAL REQUIRED COMPONENTS ImageIO) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() endif() diff --git a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt index b763183740b..3692008579e 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt +++ b/Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/CMakeLists.txt @@ -97,9 +97,6 @@ else() ) endif() - message( - STATUS - "NOTICE: This demo requires ${PERIODIC_TRIANGULATION_MISSING_DEPS}and will not be compiled." - ) + message("NOTICE: This demo requires ${PERIODIC_TRIANGULATION_MISSING_DEPS}and will not be compiled.") endif() diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt index eccdac1b231..b92bb85a4c3 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt @@ -92,9 +92,6 @@ else(CGAL_Qt5_FOUND "${CGAL_QCOLLECTIONGENERATOR_TARGET}, ${PERIODIC_LLOYD_MISSING_DEPS}") endif() - message( - STATUS - "NOTICE: This demo requires ${PERIODIC_LLOYD_MISSING_DEPS}and will not be compiled." - ) + message("NOTICE: This demo requires ${PERIODIC_LLOYD_MISSING_DEPS} and will not be compiled.") endif() diff --git a/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt b/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt index 013be0260c8..a2b4110a07f 100644 --- a/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt +++ b/Periodic_4_hyperbolic_triangulation_2/demo/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt @@ -41,5 +41,5 @@ if((CGAL_Core_FOUND OR LEDA_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(P4HDT2) else() - message(STATUS "NOTICE: This demo requires Qt5 and will not be compiled.") + message("NOTICE: This demo requires Qt5 and will not be compiled.") endif() diff --git a/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt b/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt index ddabef6c10d..1a7e63715ec 100644 --- a/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt +++ b/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt @@ -7,10 +7,6 @@ find_package(LEDA QUIET) if((CGAL_Core_FOUND OR LEDA_FOUND)) create_single_source_cgal_program("p4ht2_example_insertion.cpp") - else() - - message( - STATUS "This program requires the CGAL library, and will not be compiled.") - + message("NOTICE: This program requires the CGAL library, and will not be compiled.") endif() diff --git a/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt b/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt index f62e869c177..812dc8b307d 100644 --- a/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt +++ b/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt @@ -14,12 +14,6 @@ if((CGAL_Core_FOUND OR LEDA_FOUND)) create_single_source_cgal_program("test_p4ht2_removal_iterator.cpp") create_single_source_cgal_program("test_p4ht2_removal.cpp") create_single_source_cgal_program("test_p4ht2_insert_degenerate.cpp") - else() - - message( - STATUS - "This program requires the CGAL library and the GMP library, and will not be compiled." - ) - + message("NOTICE: This program requires the CGAL library and the GMP library, and will not be compiled.") endif() diff --git a/Point_set_3/examples/Point_set_3/CMakeLists.txt b/Point_set_3/examples/Point_set_3/CMakeLists.txt index 7fde9c1408d..f7600b60857 100644 --- a/Point_set_3/examples/Point_set_3/CMakeLists.txt +++ b/Point_set_3/examples/Point_set_3/CMakeLists.txt @@ -36,6 +36,8 @@ include(CGAL_Eigen3_support) if(EIGEN3_FOUND) create_single_source_cgal_program("point_set_algo.cpp") target_link_libraries(point_set_algo PUBLIC CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: The example 'point_set_algo' requires the Eigen library, and will not be compiled.") endif() create_single_source_cgal_program("draw_point_set_3.cpp") diff --git a/Point_set_3/test/Point_set_3/CMakeLists.txt b/Point_set_3/test/Point_set_3/CMakeLists.txt index bb283d43771..b7496eb6d5e 100644 --- a/Point_set_3/test/Point_set_3/CMakeLists.txt +++ b/Point_set_3/test/Point_set_3/CMakeLists.txt @@ -38,8 +38,8 @@ if(NOT MSVC_VERSION OR (MSVC_VERSION GREATER_EQUAL 1919 AND MSVC_VERSION LESS 1 if (TARGET CGAL::LASLIB_support) target_link_libraries(test_deprecated_io_ps PUBLIC CGAL::LASLIB_support) else() - message(STATUS "NOTICE : the LAS reader test requires LASlib and will not be compiled.") + message(STATUS "NOTICE: the LAS reader test requires LASlib, and will not be compiled.") endif() else() - message(STATUS "NOTICE : the LAS reader does not work with Visual Studio 2017.") + message(STATUS "NOTICE: the LAS reader does not work with Visual Studio 2017.") endif() 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 c4d8da3b0a0..39655c8b217 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 @@ -62,9 +62,7 @@ if(TARGET CGAL::LASLIB_support) create_single_source_cgal_program("read_las_example.cpp") target_link_libraries(read_las_example PRIVATE ${CGAL_libs} CGAL::LASLIB_support) else() - message( - STATUS - "NOTICE : the LAS reader test requires LASlib and will not be compiled.") + message(STATUS "NOTICE: the LAS reader example requires LASlib and will not be compiled.") endif() # Use Eigen @@ -102,11 +100,9 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(registration_with_pointmatcher PRIVATE ${CGAL_libs} CGAL::pointmatcher_support) else() - message( - STATUS - "NOTICE : the registration_with_pointmatcher test requires libpointmatcher and will not be compiled." - ) + message(STATUS "NOTICE: registration with pointmatcher requires libpointmatcher and will not be compiled.") endif() + # Executables that require OpenGR find_package(OpenGR QUIET) include(CGAL_OpenGR_support) @@ -115,10 +111,7 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(registration_with_OpenGR PRIVATE ${CGAL_libs} CGAL::OpenGR_support) else() - message( - STATUS - "NOTICE : registration_with_OpenGR requires OpenGR, and will not be compiled." - ) + message(STATUS "NOTICE: registration_with_OpenGR requires OpenGR, and will not be compiled.") endif() # Executables that require both libpointmatcher and OpenGR @@ -129,15 +122,9 @@ if(TARGET CGAL::Eigen3_support) registration_with_opengr_pointmatcher_pipeline PRIVATE ${CGAL_libs} CGAL::pointmatcher_support CGAL::OpenGR_support) else() - message( - STATUS - "NOTICE : registration_with_opengr_pointmatcher_pipeline requires libpointmatcher and OpenGR, and will not be compiled." - ) + message(STATUS "NOTICE: registration with OpenGR and pointmatcher requires both libpointmatcher and OpenGR, and will not be compiled.") endif() else() - message( - STATUS - "NOTICE: Some of the executables in this directory need Eigen 3.1 (or greater) and will not be compiled." - ) + message(STATUS "NOTICE: Some of the executables in this directory require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt index 895fae52907..52c6df32af0 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt @@ -46,10 +46,10 @@ if(NOT MSVC_VERSION OR (MSVC_VERSION GREATER_EQUAL 1919 AND MSVC_VERSION LESS 1 target_link_libraries(test_read_write_point_set PUBLIC ${CGAL_libs} CGAL::LASLIB_support) target_link_libraries(test_deprecated_io_point_set PUBLIC ${CGAL_libs} CGAL::LASLIB_support) else() - message(STATUS "NOTICE : the LAS reader test requires LASlib and will not be compiled.") + message(STATUS "NOTICE: the LAS reader test requires LASlib and will not be compiled.") endif() else() - message(STATUS "NOTICE : the LAS reader does not work with Visual Studio 2017.") + message(STATUS "NOTICE: the LAS reader does not work with Visual Studio 2017.") endif() # Use Eigen @@ -76,10 +76,7 @@ if (EIGEN3_FOUND) create_single_source_cgal_program("jet_pointer_as_property_map.cpp") target_link_libraries(jet_pointer_as_property_map PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "NOTICE: This program requires Eigen 3.1 (or greater) and will not be compiled." - ) + message(STATUS "NOTICE: Some tests require Eigen 3.1 (or greater), and will not be compiled.") endif() if(TARGET CGAL::TBB_support) @@ -92,4 +89,6 @@ if(TARGET CGAL::TBB_support) target_link_libraries(${target} PUBLIC CGAL::TBB_support) endif() endforeach() +else() + message(STATUS "NOTICE: Tests are not using TBB.") endif() diff --git a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt index 287652eae55..40694e9e5d1 100644 --- a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt +++ b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -32,7 +32,5 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("tutorial_example.cpp") target_link_libraries(tutorial_example PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "NOTICE: The examples need Eigen 3.1 (or greater) will not be compiled.") + message("NOTICE: The examples require Eigen 3.1 (or greater) will not be compiled.") endif() diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt index baa4d41677a..11be7ccef68 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt @@ -136,7 +136,7 @@ include(CGAL_METIS_support) if(TARGET CGAL::METIS_support) target_link_libraries(hausdorff_bounded_error_distance_example PUBLIC CGAL::METIS_support) else() - message(STATUS "Tests, which use the METIS library will not be compiled.") + message(STATUS "NOTICE: Examples that use the METIS library will not be compiled.") endif() find_package(TBB) @@ -152,12 +152,13 @@ if(TARGET CGAL::TBB_support) create_single_source_cgal_program("corefinement_parallel_union_meshes.cpp") target_link_libraries(corefinement_parallel_union_meshes PUBLIC CGAL::TBB_support) else() - message( - STATUS "NOTICE: Intel TBB was not found. Sequential code will be used.") + message(STATUS "NOTICE: Intel TBB was not found. Sequential code will be used.") endif() find_package(Ceres QUIET) include(CGAL_Ceres_support) if(TARGET CGAL::Ceres_support) target_link_libraries(mesh_smoothing_example PUBLIC CGAL::Ceres_support) -endif(TARGET CGAL::Ceres_support) +else() + message(STATUS "NOTICE: The example 'mesh_smoothing_example' uses the Ceres library, and will not be compiled.") +endif() diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index 9eb13d3458e..f5a2182b27f 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -117,7 +117,7 @@ include(CGAL_METIS_support) if(TARGET CGAL::METIS_support) target_link_libraries(test_hausdorff_bounded_error_distance PUBLIC CGAL::METIS_support) else() - message(STATUS "Tests, which use the METIS library will not be compiled.") + message(STATUS "NOTICE: Tests are not using METIS.") endif() if(TARGET CGAL::TBB_support) @@ -127,15 +127,14 @@ if(TARGET CGAL::TBB_support) target_link_libraries(self_intersection_surface_mesh_test PUBLIC CGAL::TBB_support) else() - message( - STATUS - "NOTICE: Intel TBB was not found. test_pmp_distance will use sequential code." - ) + message(STATUS "NOTICE: Intel TBB was not found. Tests will use sequential code.") endif() if(OpenMesh_FOUND) create_single_source_cgal_program("remeshing_test_P_SM_OM.cpp") target_link_libraries(remeshing_test_P_SM_OM PRIVATE ${OPENMESH_LIBRARIES}) +else() + message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.") endif() find_package(Ceres QUIET) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt index 9db1ae5e988..6f14f6590fb 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt @@ -28,10 +28,7 @@ endif() find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS - "NOTICE: This project requires Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() endif() @@ -41,10 +38,7 @@ if(NOT TARGET CGAL::SCIP_support) find_package(GLPK QUIET) include(CGAL_GLPK_support) if(NOT TARGET CGAL::GLPK_support) - message( - STATUS - "NOTICE: This project requires either SCIP or GLPK, and will not be compiled." - ) + message("NOTICE: This project requires either SCIP or GLPK, and will not be compiled.") return() endif() endif() diff --git a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt index 7b6a992ea95..4d3142d9b4d 100644 --- a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt @@ -28,10 +28,7 @@ endif() find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS - "NOTICE: This project requires Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() endif() @@ -41,10 +38,7 @@ if(NOT TARGET CGAL::SCIP_support) find_package(GLPK QUIET) include(CGAL_GLPK_support) if(NOT TARGET CGAL::GLPK_support) - message( - STATUS - "NOTICE: This project requires either SCIP or GLPK, and will not be compiled." - ) + message("NOTICE: This project requires either SCIP or GLPK, and will not be compiled.") return() endif() endif() diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index b3a6562f1c4..b66e739024b 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -56,9 +56,7 @@ set_package_properties( Qt5 PROPERTIES TYPE REQUIRED PURPOSE "Enables the 3D Features, for GUI and visualization." - DESCRIPTION - "To find this package, it should be sufficient to fill the Qt5_DIR variable with : ///lib/cmake/Qt5" -) + DESCRIPTION "To find this package, it should be sufficient to fill the Qt5_DIR variable with: ///lib/cmake/Qt5") if(Qt5_FOUND) add_definitions(-DQT_NO_KEYWORDS) @@ -68,18 +66,19 @@ endif(Qt5_FOUND) find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) set_package_properties( Eigen3 PROPERTIES - DESCRIPTION "A library for mathematical tools." - PURPOSE - "Requiered for the Polyhedron Edit, Parameterization, Jet fitting, Classification plugin, Surface reconstruction, Normal estimation, Smoothing, Average spacing, Feature detection, Hole Filling and Fairing plugins ." -) + DESCRIPTION "A library for linear algebra." + PURPOSE "Required for most plugins (Meshing, Mesh and Point Set Processing, etc.).") include(CGAL_Eigen3_support) +if(NOT TARGET CGAL::Eigen3_support) + message(STATUS "NOTICE: Eigen was not found.") +endif() find_package(METIS) include(CGAL_METIS_support) set_package_properties( METIS PROPERTIES - DESCRIPTION "A library for partitioning." - PURPOSE "Requiered for the partition plugin.") + DESCRIPTION "A library for graph partitioning." + PURPOSE "Required for the partition plugin.") # Activate concurrency? option(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY "Enable concurrency" ON) @@ -87,10 +86,7 @@ if(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY) find_package(TBB) include(CGAL_TBB_support) if(NOT TARGET CGAL::TBB_support) - message( - STATUS - "NOTICE: Intel TBB was not found. Bilateral smoothing and WLOP plugins are faster if TBB is linked." - ) + message(STATUS "NOTICE: Intel TBB was not found. Bilateral smoothing and WLOP plugins are faster if TBB is linked.") endif() endif() @@ -98,11 +94,10 @@ endif() find_package(LibSSH) set_package_properties( LibSSH PROPERTIES - DESCRIPTION "A library used to enable the SSH features. " - PURPOSE "Requiered for loading (saving) a scene to (from) a distant server.") - + DESCRIPTION "A library implementing the SSH protocol on client and server side. " + PURPOSE "Required for loading (saving) a scene to (from) a distant server.") if(NOT LIBSSH_FOUND) - message("NOTICE : The SSH features will be disabled.") + message(STATUS "NOTICE: The SSH features will be disabled.") endif() # Activate concurrency ? (turned OFF by default) @@ -115,15 +110,11 @@ if(CGAL_ACTIVATE_CONCURRENT_MESH_3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_MESH_3}") find_package(TBB REQUIRED) include(CGAL_TBB_support) if(NOT TARGET CGAL::TBB_support) - message( - STATUS - "NOTICE: Intel TBB was not found. Mesh_3 is faster if TBB is linked.") + message(STATUS "NOTICE: Intel TBB was not found. Mesh_3 is faster if TBB is linked.") endif() endif() - else(CGAL_ACTIVATE_CONCURRENT_MESH_3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_MESH_3}") - option(LINK_WITH_TBB - "Link with TBB anyway so we can use TBB timers for profiling" ON) + option(LINK_WITH_TBB "Link with TBB anyway so we can use TBB timers for profiling" ON) if(LINK_WITH_TBB) find_package(TBB) include(CGAL_TBB_support) @@ -132,9 +123,8 @@ endif() set_package_properties( TBB PROPERTIES - DESCRIPTION - "A library for parallelism. Mesh_3, Bilateral smoothing and WLOP plugins are faster if TBB is linked." - PURPOSE "Requiered for running some algorithms in parallel.") + DESCRIPTION "A library for parallel programming." + PURPOSE "Plugins such as Mesh_3, Bilateral smoothing, and WLOP are faster if TBB is linked.") if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_USE_FILE}) @@ -212,8 +202,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) Qt5::Script CGAL::CGAL_Qt5) if(TARGET Qt5::WebSockets) target_link_libraries(demo_framework PUBLIC Qt5::WebSockets) - message( - STATUS "Qt5WebSockets was found. Using WebSockets is therefore possible.") + message(STATUS "Qt5WebSockets was found. Using WebSockets is therefore possible.") endif() #compilation_of__demo_framework is defined in polyhedron_demo_macros.cmake @@ -383,10 +372,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) if(TARGET Qt5::ScriptTools) target_link_libraries(polyhedron_demo PUBLIC Qt5::ScriptTools) else() - message( - STATUS - "POLYHEDRON_QTSCRIPT_DEBUGGER is set to TRUE but the Qt5 ScriptTools library was not found." - ) + message(STATUS "POLYHEDRON_QTSCRIPT_DEBUGGER is set to TRUE but the Qt5 ScriptTools library was not found.") endif() endif() target_link_libraries(Polyhedron_3 PRIVATE demo_framework) @@ -433,8 +419,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) if(TARGET Qt5::WebSockets AND TARGET Qt5::Network) add_executable(WS_server Server_ws.cpp) target_link_libraries(WS_server PUBLIC Qt5::WebSockets Qt5::Widgets Qt5::Network) - message( - STATUS "Qt5WebSockets was found. Using WebSockets is therefore possible.") + message(STATUS "Qt5WebSockets was found. Using WebSockets is therefore possible.") endif() # # Exporting @@ -481,10 +466,7 @@ else(CGAL_Qt5_FOUND AND Qt5_FOUND) set(POLYHEDRON_MISSING_DEPS "Qt5, ${POLYHEDRON_MISSING_DEPS}") endif() - message( - STATUS - "NOTICE: This demo requires ${POLYHEDRON_MISSING_DEPS}and will not be compiled." - ) + message("NOTICE: This demo requires ${POLYHEDRON_MISSING_DEPS} and will not be compiled.") endif(CGAL_Qt5_FOUND AND Qt5_FOUND) @@ -495,7 +477,7 @@ feature_summary( QUIET_ON_EMPTY VAR NotFound_REQ_PACKAGES) if(NOT ${NotFound_REQ_PACKAGES} STREQUAL "") - message(STATUS "${NotFound_REQ_PACKAGES}") + message("${NotFound_REQ_PACKAGES}") endif() feature_summary( diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt index 4ed41201cf4..e2314c89202 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt @@ -6,10 +6,7 @@ if(TARGET CGAL::Eigen3_support) include(CGAL_Boost_serialization_support) include(CGAL_Boost_iostreams_support) if(NOT TARGET CGAL::Boost_serialization_support OR NOT TARGET CGAL::Boost_iostreams_support) - message( - STATUS - "NOTICE: Boost IO Streams and/or Serialization not found, reading deprecated Classification config files won't be possible." - ) + message(STATUS "NOTICE: Boost IO Streams and/or Serialization not found, reading deprecated Classification config files won't be possible.") endif() find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning @@ -20,10 +17,7 @@ if(TARGET CGAL::Eigen3_support) ) include(CGAL_OpenCV_support) if(NOT TARGET CGAL::OpenCV_support) - message( - STATUS - "NOTICE: OpenCV was not found. OpenCV random forest predicate for classification won't be available." - ) + message(STATUS "NOTICE: OpenCV was not found. OpenCV random forest predicate for classification won't be available.") endif() qt5_wrap_ui(classificationUI_FILES Classification_widget.ui @@ -69,8 +63,5 @@ if(TARGET CGAL::Eigen3_support) add_dependencies(classification_plugin point_set_selection_plugin selection_plugin) else() - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. Classification plugin will not be available." - ) + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Classification plugin will not be available.") endif() diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt index d7ed3ec6bb8..7d404d7f196 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt @@ -3,8 +3,8 @@ include(polyhedron_demo_macros) find_package(LASLIB) set_package_properties( LASLIB PROPERTIES - DESCRIPTION "A library for some I/O." - PURPOSE "Requiered for reading or writing LAS files.") + DESCRIPTION "A library for LIDAR I/O." + PURPOSE "Required for reading or writing LAS files.") include(CGAL_LASLIB_support) @@ -68,22 +68,13 @@ if(VTK_FOUND) ${VTK_LIBRARIES}) target_compile_definitions(vtk_plugin PRIVATE -DCGAL_USE_VTK) else() - message( - STATUS - "NOTICE : the vtk IO plugin needs VTK libraries and will not be compiled." - ) + message(STATUS "NOTICE: the vtk IO plugin needs VTK libraries and will not be compiled.") endif() else() - message( - STATUS - "NOTICE : the vtk IO plugin needs VTK 6.0 or greater and will not be compiled (incorrect version found)." - ) + message(STATUS "NOTICE: the vtk IO plugin needs VTK 6.0 or greater and will not be compiled (incorrect version found).") endif() else() - message( - STATUS - "NOTICE : the vtk IO plugin needs VTK 6.0 or greater and will not be compiled." - ) + message(STATUS "NOTICE: the vtk IO plugin needs VTK 6.0 or greater and will not be compiled.") endif() polyhedron_demo_plugin(xyz_plugin XYZ_io_plugin KEYWORDS Viewer PointSetProcessing Classification) target_link_libraries(xyz_plugin PUBLIC scene_points_with_normal_item) @@ -92,10 +83,7 @@ list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_rvalue_references has_cxx_rvalues) list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_variadic_templates has_cxx_variadic) if(has_cxx_rvalues LESS 0 OR has_cxx_variadic LESS 0) - message( - STATUS - "NOTICE : LAS/PLY IO examples require a C++11 compiler and will not be compiled." - ) + message(STATUS "NOTICE: LAS/PLY IO examples require a C++11 compiler and will not be compiled.") else() set(needed_cxx_features cxx_rvalue_references cxx_variadic_templates) @@ -113,10 +101,7 @@ else() PUBLIC "-D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS") endif() else() - message( - STATUS - "NOTICE : the LAS IO plugin needs LAS libraries and will not be compiled." - ) + message(STATUS "NOTICE: the LAS IO plugin needs LAS libraries and will not be compiled.") endif() endif() @@ -138,8 +123,5 @@ if(3MF_LIBRARIES target_link_libraries(io_3mf_plugin PRIVATE scene_surface_mesh_item scene_points_with_normal_item scene_polylines_item ${3MF_LIBRARIES}) target_compile_definitions(io_3mf_plugin PRIVATE -DCGAL_LINKED_WITH_3MF) else() - message( - STATUS - "NOTICE : The 3mf_io_plugin requires the lib3MF library in a version < 2.0, and will not be compiled." - ) + message(STATUS "NOTICE: The 3mf_io_plugin requires the lib3MF library in a version < 2.0, and will not be compiled.") endif() diff --git a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt index 89d05476c46..ab8d02e1d80 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Mesh_3/CMakeLists.txt @@ -44,22 +44,13 @@ if(VTK_FOUND) set(VTK_LIBRARIES VTK::IOImage VTK::ImagingGeneral) endif() if(NOT VTK_LIBRARIES) - message( - STATUS - "NOTICE : the DICOM files (.dcm) need VTK libraries to be open and will not be able to." - ) + message(STATUS "NOTICE: DICOM files (.dcm) require the VTK libraries, and will not be readable.") endif() else() - message( - STATUS - "NOTICE : the DICOM files (.dcm) need VTK libraries to be open and will not be able to." - ) + message(STATUS "NOTICE: DICOM files (.dcm) require the VTK libraries, and will not be readable.") endif() else() - message( - STATUS - "NOTICE : the DICOM files (.dcm) need VTK libraries to be open and will not be able to." - ) + message(STATUS "NOTICE: DICOM files (.dcm) require the VTK libraries, and will not be readable.") endif() find_package(Boost QUIET OPTIONAL_COMPONENTS filesystem system) @@ -82,10 +73,7 @@ if(Boost_FILESYSTEM_FOUND) target_link_libraries(io_image_plugin PUBLIC ${Boost_LIBRARIES}) endif() else() - message( - STATUS - "NOTICE : the Io_image_plugin needs boost-filesystem to work and will not be compiled" - ) + message(STATUS "NOTICE: the Io_image_plugin requires boost-filesystem, and will not be compiled") endif() polyhedron_demo_plugin( mesh_3_optimization_plugin @@ -101,17 +89,14 @@ target_link_libraries( scene_implicit_function_item) # Use Eigen -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) - if(TARGET CGAL::Eigen3_support) target_link_libraries(mesh_3_optimization_plugin PUBLIC CGAL::Eigen3_support) -else() #eigen - message( - STATUS - "The Mesh_3_optimization_plugin requires Eigen, which was not found, and will use a deprecated class to replace it. Warnings are to be expected." - ) -endif() #eigen +else() + message(STATUS "NOTICE: The Mesh_3_optimization_plugin requires Eigen, which was not found." + "A deprecated class will be used to replace it. Warnings are to be expected.") +endif() polyhedron_demo_plugin(c3t3_io_plugin C3t3_io_plugin KEYWORDS Viewer Mesh_3) target_link_libraries(c3t3_io_plugin PUBLIC scene_c3t3_item) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/CMakeLists.txt index 82d8554f6e3..628d00b72d3 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Operations_on_polyhedra/CMakeLists.txt @@ -25,7 +25,5 @@ target_link_libraries(diff_between_meshes_plugin PUBLIC scene_surface_mesh_item) polyhedron_demo_plugin(partition_plugin Partition_graph_plugin ${partitionUI_FILES}) target_link_libraries(partition_plugin PUBLIC scene_surface_mesh_item CGAL::METIS_support ) else() - message( - "NOTICE : the Partition plugin needs METIS libraries and will not be compiled." - ) + message(STATUS "NOTICE: the Partition plugin needs METIS libraries and will not be compiled.") endif() diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt index 53cfdc9b825..adcd4f7f02b 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/CMakeLists.txt @@ -1,16 +1,12 @@ include(polyhedron_demo_macros) -if(TARGET CGAL::Eigen3_support) +if(TARGET CGAL::Eigen3_support) polyhedron_demo_plugin(jet_fitting_plugin Jet_fitting_plugin) target_link_libraries( jet_fitting_plugin PUBLIC scene_surface_mesh_item scene_polylines_item CGAL::Eigen3_support) - else() - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. Jet fitting plugin will not be available." - ) + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Jet fitting plugin will not be available.") endif() polyhedron_demo_plugin(extrude_plugin Extrude_plugin KEYWORDS PMP) @@ -64,17 +60,10 @@ if(TARGET CGAL::Eigen3_support) PROPERTIES RESOURCE_LOCK Selection_test_resources) endif() else() - message( - STATUS - "NOTICE: The hole filling and fairing plugins require Eigen 3.2 (or higher) and will not be available." - ) + message(STATUS "NOTICE: The hole filling and fairing plugins require Eigen 3.2 (or higher) and will not be available.") endif() - -else(EIGEN3_FOUND) - message( - STATUS - "NOTICE: The hole filling and fairing plugins require Eigen 3.2 (or higher) and will not be available." - ) +else() + message(STATUS "NOTICE: The hole filling and fairing plugins require Eigen 3.2 (or higher) and will not be available.") endif() qt5_wrap_ui(soupUI_FILES Repair_soup.ui) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt index ef370a1fbe6..702e4a1898e 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt @@ -5,9 +5,8 @@ if(TARGET CGAL::Eigen3_support) set_package_properties( SCIP PROPERTIES - DESCRIPTION "A solver." - PURPOSE - "Can be used as a solver in the surface_reconstruction_plugin plugin.") + DESCRIPTION "A solver for mixed integer programming." + PURPOSE "Can be used as a solver in the surface_reconstruction_plugin plugin.") include(CGAL_SCIP_support) if(NOT TARGET CGAL::SCIP_support) @@ -16,17 +15,13 @@ if(TARGET CGAL::Eigen3_support) set_package_properties( GLPK PROPERTIES DESCRIPTION "An alternative for SCIP." - PURPOSE - "Can be used as a solver in the surface_reconstruction_plugin plugin.") + PURPOSE "Can be used as a solver in the surface_reconstruction_plugin plugin.") include(CGAL_GLPK_support) endif() if(NOT TARGET CGAL::SCIP_support AND NOT TARGET CGAL::GLPK_support) - message( - STATUS - "NOTICE: SCIP and GLPK were not found. Polygonal surface reconstruction will not be available." - ) + message(STATUS "NOTICE: SCIP and GLPK were not found. Polygonal surface reconstruction will not be available.") endif() qt5_wrap_ui(surface_reconstructionUI_FILES Surface_reconstruction_plugin.ui) @@ -118,33 +113,14 @@ if(TARGET CGAL::Eigen3_support) PUBLIC CGAL::pointmatcher_support) endif() else() - message( - STATUS - "NOTICE: OpenGR and libpointmatcher were not found. Registration plugin will not be available." - ) + message(STATUS "NOTICE: OpenGR and libpointmatcher were not found. Registration plugin will not be available.") endif() - -else(EIGEN3_FOUND) - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. Surface reconstruction plugin will not be available." - ) - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. Normal estimation plugins will not be available." - ) - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. Smoothing plugin will not be available." - ) - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. Average spacing plugin will not be available." - ) - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. Feature detection plugin will not be available." - ) +else() + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Surface reconstruction plugin will not be available.") + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Normal estimation plugins will not be available.") + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Smoothing plugin will not be available.") + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Average spacing plugin will not be available.") + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. Feature detection plugin will not be available.") endif() qt5_wrap_ui(point_set_bilateral_smoothingUI_FILES diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt index 682998322e0..4e553fbde16 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh/CMakeLists.txt @@ -23,10 +23,7 @@ if(NOT CGAL_DISABLE_GMP) endif() else() - message( - STATUS - "NOTICE: Eigen 3.1 (or greater) was not found. The Parameterization plugin will not be available." - ) + message(STATUS "NOTICE: Eigen 3.1 (or greater) was not found. The Parameterization plugin will not be available.") endif() qt5_wrap_ui(segmentationUI_FILES Mesh_segmentation_widget.ui) diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt index 0954a8c13c3..b7f9d81ad41 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt @@ -12,8 +12,5 @@ if(EIGEN3_FOUND AND "${EIGEN3_VERSION}" VERSION_GREATER "3.1.90") endif() else() - message( - STATUS - "NOTICE: The polyhedron edit plugin require Eigen 3.2 (or higher) and will not be available." - ) + message(STATUS "NOTICE: The polyhedron edit plugin requires Eigen 3.2 (or higher) and will not be available.") endif() diff --git a/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt b/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt index f11de800034..98faad76be3 100644 --- a/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt @@ -59,9 +59,6 @@ else(CGAL_Qt5_FOUND AND Qt5_FOUND) set(MESH_3_MISSING_DEPS "Qt5, ${MESH_3_MISSING_DEPS}") endif() - message( - STATUS - "NOTICE: This demo requires ${MESH_3_MISSING_DEPS}and will not be compiled." - ) + message("NOTICE: This demo requires ${MESH_3_MISSING_DEPS} and will not be compiled.") endif(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt index d920d36fcc7..002fd913902 100644 --- a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt +++ b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt @@ -48,7 +48,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) else() - message( - STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") + message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") endif() diff --git a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt index d1ee8325335..60b1475d431 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt @@ -20,10 +20,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS - "NOTICE: This project requires the Eigen library, and will not be compiled." - ) + message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() endif() @@ -73,9 +70,6 @@ else(CGAL_Qt5_FOUND AND Qt5_FOUND) set(PCA_MISSING_DEPS "Qt5, ${PCA_MISSING_DEPS}") endif() - message( - STATUS - "NOTICE: This demo requires ${PCA_MISSING_DEPS} and will not be compiled." - ) + message("NOTICE: This demo requires ${PCA_MISSING_DEPS} and will not be compiled.") endif(CGAL_Qt5_FOUND AND Qt5_FOUND) diff --git a/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt index 01bbb5c99af..6ba4150b812 100644 --- a/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt @@ -10,7 +10,7 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message(STATUS "NOTICE: This project requires Eigen 3.1 (or greater) and will not be compiled.") + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() endif() diff --git a/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt index a4ea754853f..9fb9d3a75db 100644 --- a/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt @@ -10,7 +10,7 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message(STATUS "NOTICE: This project requires Eigen 3.1 (or greater) and will not be compiled.") + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() endif() diff --git a/Property_map/examples/Property_map/CMakeLists.txt b/Property_map/examples/Property_map/CMakeLists.txt index b33ebc34768..e1f2e269e23 100644 --- a/Property_map/examples/Property_map/CMakeLists.txt +++ b/Property_map/examples/Property_map/CMakeLists.txt @@ -28,4 +28,6 @@ include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("custom_property_map.cpp") target_link_libraries(custom_property_map PUBLIC CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: The example 'custom_property_map' requires Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index 74b132ea916..c8e1f4d9e83 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -31,14 +31,8 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(Ridges_Umbilics_LCC PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) endif() else() - message( - STATUS - "NOTICE: This programs require Boost Program Options and will not be compiled." - ) + message("NOTICE: This project requires Boost Program Options and will not be compiled.") endif() else() - message( - STATUS - "NOTICE: This program requires Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Ridges_3/test/Ridges_3/CMakeLists.txt b/Ridges_3/test/Ridges_3/CMakeLists.txt index ae33dbe2534..73fcc4e7f89 100644 --- a/Ridges_3/test/Ridges_3/CMakeLists.txt +++ b/Ridges_3/test/Ridges_3/CMakeLists.txt @@ -13,10 +13,5 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("ridge_test.cpp") target_link_libraries(ridge_test PUBLIC CGAL::Eigen3_support) else() - - message( - STATUS - "NOTICE: This program requires Eigen 3.1 (or greater) and will not be compiled." - ) - + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/STL_Extension/test/STL_Extension/CMakeLists.txt b/STL_Extension/test/STL_Extension/CMakeLists.txt index 98018bcf782..65a100afa6d 100644 --- a/STL_Extension/test/STL_Extension/CMakeLists.txt +++ b/STL_Extension/test/STL_Extension/CMakeLists.txt @@ -62,4 +62,6 @@ endif() if(OpenMesh_FOUND) create_single_source_cgal_program("test_hash_OpenMesh.cpp") target_link_libraries(test_hash_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) +else() + message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.") endif() diff --git a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt index 2532c9defb5..ba2c593d83e 100644 --- a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt +++ b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt @@ -10,9 +10,7 @@ if(ACTIVATE_CONCURRENCY) find_package(TBB) include(CGAL_TBB_support) if(NOT TARGET CGAL::TBB_support) - message( - STATUS - "NOTICE: Intel TBB NOT found! The example is faster if TBB is linked.") + message(STATUS "NOTICE: Intel TBB not found. Examples are faster if TBB is linked.") endif() endif() @@ -35,8 +33,5 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(scale_space_advancing_front PUBLIC CGAL::TBB_support) endif() else() - message( - STATUS - "NOTICE: The example needs Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: Examples require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Shape_detection/test/Shape_detection/CMakeLists.txt b/Shape_detection/test/Shape_detection/CMakeLists.txt index 92e45de666c..149f34e57f0 100644 --- a/Shape_detection/test/Shape_detection/CMakeLists.txt +++ b/Shape_detection/test/Shape_detection/CMakeLists.txt @@ -59,4 +59,6 @@ if(EIGEN3_FOUND) target_link_libraries(test_validity_sampled_data CGAL::CGAL CGAL::Data CGAL::Eigen3_support) endif() cgal_add_test(test_validity_sampled_data) +else() + message(STATUS "NOTICE: Some tests require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt index e0c8987322e..84e8e1a509a 100644 --- a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt @@ -27,5 +27,5 @@ if(TARGET CGAL::OSQP_support) endif() endforeach() else() - message(NOTICE "OSQP was not found. OSQP benchmarks won't be available.") + message("NOTICE: OSQP was not found. OSQP benchmarks won't be available.") endif() diff --git a/Shape_regularization/examples/Shape_regularization/CMakeLists.txt b/Shape_regularization/examples/Shape_regularization/CMakeLists.txt index adfb948e463..d01c9585a16 100644 --- a/Shape_regularization/examples/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/examples/Shape_regularization/CMakeLists.txt @@ -34,10 +34,10 @@ if(TARGET CGAL::OSQP_support) create_single_source_cgal_program("regularize_real_data_2.cpp") target_link_libraries(regularize_real_data_2 PUBLIC CGAL::Eigen3_support CGAL::OSQP_support) else() - message(NOTICE "Eigen was not found. Eigen examples won't be available.") + message(STATUS "NOTICE: Eigen was not found. Eigen examples won't be available.") endif() else() - message(NOTICE "OSQP was not found. OSQP examples won't be available.") + message(STATUS "NOTICE: OSQP was not found. OSQP examples won't be available.") endif() create_single_source_cgal_program("regularize_framework.cpp") diff --git a/Shape_regularization/test/Shape_regularization/CMakeLists.txt b/Shape_regularization/test/Shape_regularization/CMakeLists.txt index 5bb7cc98ef3..96ce53eb1a5 100644 --- a/Shape_regularization/test/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/test/Shape_regularization/CMakeLists.txt @@ -31,7 +31,7 @@ if(TARGET CGAL::OSQP_support) endif() endforeach() else() - message(NOTICE "OSQP was not found. OSQP tests won't be available.") + message(STATUS "NOTICE: OSQP was not found. OSQP tests won't be available.") endif() set(targets diff --git a/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt b/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt index 3de1179c2f5..f053e7e5079 100644 --- a/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt +++ b/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt @@ -25,8 +25,5 @@ if(ESBTL_FOUND) include_directories(${ESBTL_INCLUDE_DIR}) create_single_source_cgal_program("skin_surface_pdb_reader.cpp") else(ESBTL_FOUND) - message( - STATUS - "NOTICE: skin_surface_pdb_reader.cpp requires ESBTL library, and will not be compiled." - ) + message(STATUS "NOTICE: skin_surface_pdb_reader.cpp requires ESBTL library, and will not be compiled.") endif(ESBTL_FOUND) diff --git a/Solver_interface/examples/Solver_interface/CMakeLists.txt b/Solver_interface/examples/Solver_interface/CMakeLists.txt index a8ce3e9a528..b269af2e059 100644 --- a/Solver_interface/examples/Solver_interface/CMakeLists.txt +++ b/Solver_interface/examples/Solver_interface/CMakeLists.txt @@ -16,6 +16,8 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(sparse_solvers PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("diagonalize_matrix.cpp") target_link_libraries(diagonalize_matrix PUBLIC CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: Eigen3 was not found. Some examples won't be available.") endif() find_package(OSQP QUIET) @@ -23,8 +25,7 @@ include(CGAL_OSQP_support) if(TARGET CGAL::OSQP_support) create_single_source_cgal_program("osqp_quadratic_program.cpp") target_link_libraries(osqp_quadratic_program PUBLIC CGAL::OSQP_support) - message("OSQP found and used") - + message(STATUS "OSQP found and used") else() message(STATUS "NOTICE: OSQP was not found. OSQP examples won't be available.") endif() @@ -34,23 +35,16 @@ include(CGAL_SCIP_support) if(TARGET CGAL::SCIP_support) create_single_source_cgal_program("mixed_integer_program.cpp") target_link_libraries(mixed_integer_program PUBLIC CGAL::SCIP_support) - message("SCIP found and used") - + message(STATUS "SCIP found and used") else() find_package(GLPK QUIET) include(CGAL_GLPK_support) if(TARGET CGAL::GLPK_support) create_single_source_cgal_program("mixed_integer_program.cpp") target_link_libraries(mixed_integer_program PUBLIC CGAL::GLPK_support) - message("GLPK found and used") - + message(STATUS "GLPK found and used") else() - - message( - STATUS - "NOTICE : This project requires either SCIP or GLPK, and will not be compiled. " - "Please provide either 'SCIP_DIR' or 'GLPK_INCLUDE_DIR' and 'GLPK_LIBRARIES'" - ) - + message(STATUS "NOTICE: This project requires either SCIP or GLPK, and will not be compiled. " + "Please provide either 'SCIP_DIR' or 'GLPK_INCLUDE_DIR' and 'GLPK_LIBRARIES'") endif() endif() diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index 9dd43a935e1..374ff11054d 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -44,13 +44,8 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("general_neighbor_searching.cpp") target_link_libraries(general_neighbor_searching PUBLIC CGAL::Eigen3_support) else() - - message(STATUS "fuzzy_range_query.cpp and general_neighbor_searching.cpp") - message( - STATUS - "will not be compiled as they use CGAL::Epick_d which requires the Eigen library." - ) - + message(STATUS "NOTICE: The examples 'fuzzy_range_query' and 'general_neighbor_searching'") + message(STATUS "will not be compiled as they use CGAL::Epick_d, which requires the Eigen library.") endif() find_package(TBB QUIET) @@ -59,5 +54,5 @@ if(TARGET CGAL::TBB_support) create_single_source_cgal_program("parallel_kdtree.cpp") target_link_libraries(parallel_kdtree PUBLIC CGAL::TBB_support) else() - message(STATUS "parallel_kdtree.cpp requires TBB and will not be compiled") + message(STATUS "NOTICE: The example 'parallel_kdtree' requires TBB, and will not be compiled") endif() diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/CMakeLists.txt b/Straight_skeleton_2/examples/Straight_skeleton_2/CMakeLists.txt index 56b2fffadd5..c6e8c6c0d51 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/CMakeLists.txt +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/CMakeLists.txt @@ -17,5 +17,5 @@ if(CGAL_Qt5_FOUND) target_link_libraries(draw_straight_skeleton_2 PUBLIC CGAL::CGAL_Basic_viewer) target_link_libraries(exterior_offset_of_multiple_polygons_with_holes PUBLIC CGAL::CGAL_Basic_viewer) else() - message(STATUS "NOTICE: The example draw_straight_skeleton_2 requires Qt and will not be compiled.") + message(STATUS "NOTICE: The example 'draw_straight_skeleton_2' requires Qt and will not be compiled.") endif() diff --git a/Stream_support/test/Stream_support/CMakeLists.txt b/Stream_support/test/Stream_support/CMakeLists.txt index ade4d2c88f8..15c115bd3fa 100644 --- a/Stream_support/test/Stream_support/CMakeLists.txt +++ b/Stream_support/test/Stream_support/CMakeLists.txt @@ -27,10 +27,7 @@ foreach(cppfile ${cppfiles}) create_single_source_cgal_program("${cppfile}") target_link_libraries(test_3mf_to_sm PRIVATE ${3MF_LIBRARIES}) else() - message( - STATUS - "NOTICE : This program requires the lib3MF library, and will not be compiled." - ) + message(STATUS "NOTICE: Some tests require the lib3MF library, and will not be compiled.") endif() else() create_single_source_cgal_program("${cppfile}") diff --git a/Surface_mesh/test/Surface_mesh/CMakeLists.txt b/Surface_mesh/test/Surface_mesh/CMakeLists.txt index 0796515d99d..ce006010e98 100644 --- a/Surface_mesh/test/Surface_mesh/CMakeLists.txt +++ b/Surface_mesh/test/Surface_mesh/CMakeLists.txt @@ -25,5 +25,5 @@ if(3MF_LIBRARIES AND 3MF_INCLUDE_DIR AND EXISTS "${3MF_INCLUDE_DIR}/Model/COM/N target_link_libraries(test_deprecated_io_sm PRIVATE ${3MF_LIBRARIES}) target_compile_definitions(test_deprecated_io_sm PRIVATE -DCGAL_LINKED_WITH_3MF) else() - message(STATUS "NOTICE : read_3mf requires the lib3MF library, and will not be tested.") + message(STATUS "NOTICE: read_3mf requires the lib3MF library, and will not be tested.") endif() diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt index 49b649baf99..a76d0e049f7 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt @@ -19,8 +19,7 @@ endif() find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() endif() diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt index 64fb53467a0..cb8582389d6 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt @@ -19,8 +19,7 @@ endif() find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() endif() diff --git a/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt b/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt index 625c8fbcbcd..ca4ca2ffd1e 100644 --- a/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt +++ b/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt @@ -11,8 +11,5 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("benchmark_for_concept_models.cpp") target_link_libraries(benchmark_for_concept_models PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "This program requires the Eigen library, version 3.1 or later and will not be compiled." - ) + message("NOTICE: This program requires requires Eigen 3.1 (or greater) or later and will not be compiled.") endif() diff --git a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt index 778b63e37ec..40354505e1b 100644 --- a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt @@ -20,8 +20,5 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(deform_mesh_for_botsch08_format PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "NOTICE: This program requires the Eigen library, version 3.2 or later and will not be compiled." - ) + message("NOTICE: This program requires requires Eigen 3.1.91 (or greater) or later and will not be compiled.") endif() diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt index 80137f8569b..168b336edff 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt @@ -38,12 +38,9 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(all_roi_assign_example_with_OpenMesh PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) else() - message(STATUS "Example that use OpenMesh will not be compiled.") + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() else() - message( - STATUS - "NOTICE: These examples require the Eigen library, version 3.2 or later and will not be compiled." - ) + message("NOTICE: These examples require Eigen 3.1.91 (or greater) or later and will not be compiled.") endif() diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt index 001902d0187..5046d551a55 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt @@ -23,11 +23,8 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(Cactus_deformation_session_OpenMesh PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) else() - message(STATUS "Example that use OpenMesh will not be compiled.") + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() else() - message( - STATUS - "NOTICE: These tests require the Eigen library, version 3.2 or later and will not be compiled." - ) + message("NOTICE: These tests require the Eigen library, version 3.1.91 or later and will not be compiled.") endif() diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt index 0c373f160c6..d4c54e35640 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt @@ -37,16 +37,10 @@ if(TARGET CGAL::Eigen3_support) add_definitions(-DEIGEN_DONT_ALIGN_STATICALLY) add_definitions(-DCGAL_SMP_USE_SPARSESUITE_SOLVERS) else() - message( - STATUS - "NOTICE: The example `orbifold.cpp` will be compiled without the Sparsesuite library and UmfPack. Try setting SuiteSparse_UMF_INCLUDE_DIR and at least one of SuiteSparse_UMFPACK_LIBRARY_RELEASE and SuiteSparse_UMFPACK_LIBRARY_DEBUG to you UMFPACK installation." - ) + message(STATUS "NOTICE: The example `orbifold.cpp` will be compiled without the Sparsesuite library and UmfPack. Try setting SuiteSparse_UMF_INCLUDE_DIR and at least one of SuiteSparse_UMFPACK_LIBRARY_RELEASE and SuiteSparse_UMFPACK_LIBRARY_DEBUG to you UMFPACK installation.") endif() else(SuiteSparse_FOUND) - message( - STATUS - "NOTICE: The example `orbifold.cpp` will be compiled without the Sparsesuite library." - ) + message(STATUS "NOTICE: The example `orbifold.cpp` will be compiled without the Sparsesuite library.") endif(SuiteSparse_FOUND) # ------------------------------------------------------------------ @@ -72,8 +66,5 @@ if(TARGET CGAL::Eigen3_support) endif() else() - message( - STATUS - "NOTICE: The examples require Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: The examples require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt index b8567b47ad3..81d75a3ce49 100644 --- a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt @@ -13,8 +13,5 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(extensive_parameterization_test PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "NOTICE: The tests require Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: The tests require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt b/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt index 86cfaeb0351..67c248833c6 100644 --- a/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt @@ -19,5 +19,5 @@ if(OpenMesh_FOUND) create_single_source_cgal_program("shortest_paths_OpenMesh.cpp") target_link_libraries(shortest_paths_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) else() - message(STATUS "Examples that use OpenMesh will not be compiled.") + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() 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 index 973af0b75e3..95099585460 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt @@ -26,14 +26,8 @@ if(Boost_PROGRAM_OPTIONS_FOUND) target_link_libraries(TestMesh PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) endif() else() - message( - STATUS - "NOTICE: Example TestMesh.cpp requires the CGAL_Core library (or LEDA) and will not be compiled." - ) + message(STATUS "NOTICE: The example TestMesh.cpp requires the CGAL_Core library (or LEDA) and will not be compiled.") endif() else() - message( - STATUS - "NOTICE: Example TestMesh.cpp requires boost program_option and will not be compiled." - ) + message(STATUS "NOTICE: The example TestMesh.cpp requires boost program_option and will not be compiled.") endif() diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt index 2af41a74f0a..68f1f271083 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -50,6 +50,8 @@ endif() if(OpenMesh_FOUND) create_single_source_cgal_program("edge_collapse_OpenMesh.cpp") target_link_libraries(edge_collapse_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) +else() + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() find_package(METIS) @@ -57,10 +59,9 @@ include(CGAL_METIS_support) find_package(TBB) include(CGAL_TBB_support) - if(TARGET CGAL::TBB_support AND TARGET CGAL::METIS_support) create_single_source_cgal_program("collapse_small_edges_in_parallel.cpp") target_link_libraries(collapse_small_edges_in_parallel PUBLIC CGAL::TBB_support CGAL::METIS_support) else() - message(STATUS "collapse_small_edges_in_parallel, which use the METIS and TBB libraries will not be compiled.") + message(STATUS "NOTICE: The example 'collapse_small_edges_in_parallel' uses the METIS and TBB libraries, and will not be compiled.") endif() diff --git a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt index e66903608e9..e809e5b742d 100644 --- a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt @@ -42,8 +42,5 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries( MCF_Skeleton_om_example PUBLIC CGAL::Eigen3_support PRIVATE ${OPENMESH_LIBRARIES}) endif() else() - message( - STATUS - "These programs require the Eigen library (3.2 or greater), and will not be compiled." - ) + message("NOTICE: These programs require the Eigen library (3.2 or greater), and will not be compiled.") endif() diff --git a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt index 91a2c82d39a..0c39993aed8 100644 --- a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt @@ -8,15 +8,11 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) - if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("MCF_Skeleton_test.cpp") target_link_libraries(MCF_Skeleton_test PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("skeleton_connectivity_test.cpp") target_link_libraries(skeleton_connectivity_test PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "These tests require the Eigen library (3.2 or greater), and will not be compiled." - ) + message("NOTICE: These tests require the Eigen library (3.2 or greater), and will not be compiled.") endif() diff --git a/Surface_mesher/examples/Surface_mesher/CMakeLists.txt b/Surface_mesher/examples/Surface_mesher/CMakeLists.txt index aab8a082853..f5eb723ef7f 100644 --- a/Surface_mesher/examples/Surface_mesher/CMakeLists.txt +++ b/Surface_mesher/examples/Surface_mesher/CMakeLists.txt @@ -11,13 +11,11 @@ if(CGAL_ImageIO_FOUND) create_single_source_cgal_program("mesh_an_implicit_function.cpp") else() + if(RUNNING_CGAL_AUTO_TEST) # Just to avoid a warning from CMake if that variable is set on the command line... endif() - message( - STATUS - "NOTICE: This program requires the CGAL and CGAL ImageIO libraries, and will not be compiled." - ) + message("NOTICE: This project requires the CGAL and CGAL ImageIO libraries, and will not be compiled.") endif() diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt index 380b7ff60d7..c74b11a60ad 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt @@ -44,6 +44,6 @@ create_single_source_cgal_program( "mesh_and_remesh_polyhedral_domain_with_featu target_link_libraries(mesh_and_remesh_polyhedral_domain_with_features PRIVATE CGAL::TBB_support) endif() else() - message(STATUS "Some examples need the Eigen3 library, and will not be compiled.") + message(STATUS "NOTICE: Some examples require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Triangulation/applications/Triangulation/CMakeLists.txt b/Triangulation/applications/Triangulation/CMakeLists.txt index d0928bb79ce..8febe2625c7 100644 --- a/Triangulation/applications/Triangulation/CMakeLists.txt +++ b/Triangulation/applications/Triangulation/CMakeLists.txt @@ -21,6 +21,10 @@ endif() find_package(Eigen3 3.1.0) include(CGAL_Eigen3_support) +if(NOT TARGET CGAL::Eigen3_support) + message("NOTICE: Applications require Eigen 3.1 (or greater), and will not be compiled") + return() +endif() # include for local directory include_directories(BEFORE include) diff --git a/Triangulation/benchmark/Triangulation/CMakeLists.txt b/Triangulation/benchmark/Triangulation/CMakeLists.txt index 47e4945c25b..a1c4160d2fb 100644 --- a/Triangulation/benchmark/Triangulation/CMakeLists.txt +++ b/Triangulation/benchmark/Triangulation/CMakeLists.txt @@ -18,8 +18,5 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(Td_vs_T2_and_T3 PUBLIC CGAL::Eigen3_support) else() - message( - STATUS - "NOTICE: Some of the executables in this directory need Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: Executables in this directory require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Triangulation/examples/Triangulation/CMakeLists.txt b/Triangulation/examples/Triangulation/CMakeLists.txt index 4a8d458026a..0574b70126e 100644 --- a/Triangulation/examples/Triangulation/CMakeLists.txt +++ b/Triangulation/examples/Triangulation/CMakeLists.txt @@ -5,10 +5,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Triangulation_Examples) if(CMAKE_COMPILER_IS_GNUCCX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4) - message( - STATUS - "NOTICE: this directory requires a version of gcc >= 4.4, and will not be compiled." - ) + message("NOTICE: Examples in this directory require a version of gcc >= 4.4, and will not be compiled.") return() endif() @@ -37,8 +34,5 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() else() - message( - STATUS - "NOTICE: Some of the executables in this directory need Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: Examples in this directory require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Triangulation/test/Triangulation/CMakeLists.txt b/Triangulation/test/Triangulation/CMakeLists.txt index 9f04381d282..292869eee6c 100644 --- a/Triangulation/test/Triangulation/CMakeLists.txt +++ b/Triangulation/test/Triangulation/CMakeLists.txt @@ -5,10 +5,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Triangulation_Tests) if(CMAKE_COMPILER_IS_GNUCCX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.4) - message( - STATUS - "NOTICE: this directory requires a version of gcc >= 4.4, and will not be compiled." - ) + message("NOTICE: Examples in this directory require a version of gcc >= 4.4, and will not be compiled.") return() endif() @@ -31,8 +28,5 @@ if(TARGET CGAL::Eigen3_support) endforeach() else() - message( - STATUS - "NOTICE: Some of the executables in this directory need Eigen 3.1 (or greater) and will not be compiled." - ) + message("NOTICE: Tests in this directory require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Triangulation_2/examples/Triangulation_2/CMakeLists.txt b/Triangulation_2/examples/Triangulation_2/CMakeLists.txt index 179ea91a3e7..e4f5e7392ee 100644 --- a/Triangulation_2/examples/Triangulation_2/CMakeLists.txt +++ b/Triangulation_2/examples/Triangulation_2/CMakeLists.txt @@ -20,8 +20,5 @@ if(CGAL_Qt5_FOUND) target_link_libraries(draw_triangulation_2 PUBLIC CGAL::CGAL_Basic_viewer) target_link_libraries(star_conflict_zone PUBLIC CGAL::CGAL_Basic_viewer) else() - message( - STATUS - "NOTICE: Several examples require Qt and will not be compiled." - ) + message(STATUS "NOTICE: Several examples require Qt5 and will not be compiled.") endif() diff --git a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt index 512c39d52fa..15fc236f473 100644 --- a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt @@ -94,10 +94,7 @@ else(Qt5_FOUND) set(TRIANGULATION_3_MISSING_DEPS "Qt5, ${TRIANGULATION_3_MISSING_DEPS}") endif() - message( - STATUS - "NOTICE: This demo requires ${TRIANGULATION_3_MISSING_DEPS}and will not be compiled." - ) + message("NOTICE: This demo requires ${TRIANGULATION_3_MISSING_DEPS}, and will not be compiled.") endif( CGAL_Qt5_FOUND diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index 3bc81426b94..f69ece8b238 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -25,6 +25,8 @@ create_single_source_cgal_program("simplex.cpp") create_single_source_cgal_program("draw_triangulation_3.cpp") if(CGAL_Qt5_FOUND) target_link_libraries(draw_triangulation_3 PUBLIC CGAL::CGAL_Basic_viewer) +else() + message(STATUS "NOTICE: The example 'draw_triangulation_3' requires Qt5, and will not be compiled.") endif() find_package(TBB QUIET) @@ -46,5 +48,5 @@ if(TARGET CGAL::TBB_support) PROPERTY RUN_SERIAL 1) endif() else() - message(STATUS "NOTICE: a few examples require TBB and will not be compiled.") + message(STATUS "NOTICE: A few examples require TBB, and will not be compiled.") endif() diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index 20960afe639..19983c752f3 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -41,6 +41,8 @@ if(TARGET CGAL::TBB_support) execution___of__test_regular_insert_range_with_info PROPERTY RUN_SERIAL 1) endif() +else() + message(STATUS "NOTICE: The TBB library was not found. Some tests will not be available.") endif() if(BUILD_TESTING) diff --git a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt index 865b4681f0c..4312001ac0a 100644 --- a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt @@ -48,5 +48,5 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND TARGET CGAL::Eigen3_support) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test( Triangulation_on_sphere_2_Demo ) else() - message(STATUS "NOTICE: This demo requires CGAL, Qt5 and OpenGL, and will not be compiled.") + message("NOTICE: This demo requires CGAL, Qt5, and Eigen, and will not be compiled.") endif() diff --git a/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt index a9b9fba423d..36405ad2cb7 100644 --- a/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt @@ -22,7 +22,5 @@ if ( CGAL_FOUND ) endif() else() - - message(STATUS "This program requires the CGAL library, and will not be compiled.") - + message(STATUS "NOTICE: The Eigen library was not found. The test 'test_dtos_dual' will not be compiled.") endif() diff --git a/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt b/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt index 7d6f692ba0d..3408ad984cb 100644 --- a/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt +++ b/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt @@ -17,4 +17,6 @@ endforeach() if(CGAL_Qt5_FOUND) target_link_libraries(draw_voronoi_diagram_2 PUBLIC CGAL::CGAL_Basic_viewer) +else() + message(STATUS "NOTICE: The Qt5 library was not found. The example 'draw_voronoi_diagram_2' will not be compiled.") endif() diff --git a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt index c6a29500bef..052f1966487 100644 --- a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt +++ b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt @@ -16,8 +16,9 @@ create_single_source_cgal_program("vda_sdg.cpp") find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) - if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("vda_tos2.cpp") target_link_libraries(vda_tos2 PUBLIC CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: The Eigen library was not found. The test 'vda_tos2' will not be available.") endif() diff --git a/Weights/examples/Weights/CMakeLists.txt b/Weights/examples/Weights/CMakeLists.txt index 4521e9cc475..1ab1057ae14 100644 --- a/Weights/examples/Weights/CMakeLists.txt +++ b/Weights/examples/Weights/CMakeLists.txt @@ -20,5 +20,5 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("weighted_laplacian.cpp") target_link_libraries(weighted_laplacian PUBLIC CGAL::Eigen3_support) else() - message(NOTICE "Several examples require the Eigen library, and will not be compiled.") + message(STATUS "NOTICE: The Eigen library was not found. The example 'weighted_laplacian' will not be compiled.") endif() From 4fc486b19586f0b7f5fe5c94a65afb64dfc31373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 6 Sep 2022 16:19:11 +0200 Subject: [PATCH 03/60] Purge CMakeLists.txts from obsolete code / noise --- .../Algebraic_kernel_d/CMakeLists.txt | 1 - .../test/Algebraic_kernel_d/CMakeLists.txt | 15 ---------- .../Arrangement_on_surface_2/CMakeLists.txt | 3 -- BGL/examples/BGL_LCC/CMakeLists.txt | 17 ----------- BGL/examples/BGL_OpenMesh/CMakeLists.txt | 29 ------------------- BGL/examples/BGL_graphcut/CMakeLists.txt | 19 ------------ BGL/examples/BGL_polyhedron_3/CMakeLists.txt | 19 ------------ BGL/examples/BGL_surface_mesh/CMakeLists.txt | 2 -- BGL/test/BGL/CMakeLists.txt | 16 ---------- .../Barycentric_coordinates_2/CMakeLists.txt | 2 -- CGAL_Core/examples/Core/CMakeLists.txt | 21 +------------- .../examples/CGALimageIO/CMakeLists.txt | 16 +++------- .../examples/Classification/CMakeLists.txt | 9 ------ .../test/Classification/CMakeLists.txt | 9 ------ .../examples/Convex_hull_3/CMakeLists.txt | 20 ------------- .../test/Convex_hull_3/CMakeLists.txt | 8 ----- .../benchmark/Filtered_kernel/CMakeLists.txt | 2 -- .../test/Generalized_map/CMakeLists.txt | 11 ------- .../demo/Alpha_shapes_2/CMakeLists.txt | 4 +-- .../demo/Bounding_volumes/CMakeLists.txt | 3 -- .../demo/Circular_kernel_2/CMakeLists.txt | 3 -- GraphicsView/demo/Generator/CMakeLists.txt | 3 -- .../demo/L1_Voronoi_diagram_2/CMakeLists.txt | 3 -- .../demo/Largest_empty_rect_2/CMakeLists.txt | 3 -- .../Periodic_2_triangulation_2/CMakeLists.txt | 3 -- GraphicsView/demo/Polygon/CMakeLists.txt | 3 -- .../Segment_Delaunay_graph_2/CMakeLists.txt | 3 -- .../CMakeLists.txt | 3 -- .../demo/Snap_rounding_2/CMakeLists.txt | 1 - .../demo/Spatial_searching_2/CMakeLists.txt | 3 -- .../demo/Stream_lines_2/CMakeLists.txt | 1 - Hash_map/benchmark/Hash_map/CMakeLists.txt | 19 ------------ .../examples/Heat_method_3/CMakeLists.txt | 15 ---------- .../test/Heat_method_3/CMakeLists.txt | 15 ---------- .../Hyperbolic_triangulation_2/CMakeLists.txt | 4 --- .../Linear_cell_complex_3/CMakeLists.txt | 7 ----- Mesh_3/examples/Mesh_3/CMakeLists.txt | 1 - .../test/Minkowski_sum_2/CMakeLists.txt | 7 ----- Number_types/test/Number_types/CMakeLists.txt | 7 +---- .../Optimal_bounding_box/CMakeLists.txt | 2 -- .../examples/Periodic_3_mesh_3/CMakeLists.txt | 16 +--------- .../CMakeLists.txt | 4 --- .../examples/Point_set_3/CMakeLists.txt | 15 ---------- Point_set_3/test/Point_set_3/CMakeLists.txt | 19 ------------ .../Point_set_processing_3/CMakeLists.txt | 3 -- .../Polygon_mesh_processing/CMakeLists.txt | 21 +++----------- .../CMakeLists.txt | 17 ----------- .../CMakeLists.txt | 17 ----------- Polyhedron/demo/Polyhedron/CMakeLists.txt | 8 ----- .../Polyline_simplification_2/CMakeLists.txt | 20 ------------- .../examples/Property_map/CMakeLists.txt | 17 ----------- Property_map/test/Property_map/CMakeLists.txt | 23 --------------- Ridges_3/examples/Ridges_3/CMakeLists.txt | 1 - Ridges_3/test/Ridges_3/CMakeLists.txt | 1 - .../benchmark/copy_n_benchmark/CMakeLists.txt | 3 -- .../Segment_Delaunay_graph_2/CMakeLists.txt | 2 -- .../CMakeLists.txt | 2 -- .../Set_movable_separability_2/CMakeLists.txt | 10 ------- .../Set_movable_separability_2/CMakeLists.txt | 10 ------- .../Shape_regularization/CMakeLists.txt | 3 -- .../Spatial_searching/tools/CMakeLists.txt | 3 -- .../examples/Spatial_searching/CMakeLists.txt | 10 ------- .../benchmark/Spatial_sorting/CMakeLists.txt | 1 - .../benchmark/Stream_support/CMakeLists.txt | 19 ------------ Surface_mesh/benchmark/CMakeLists.txt | 2 -- .../Surface_mesh_approximation/CMakeLists.txt | 26 ----------------- .../Surface_mesh_approximation/CMakeLists.txt | 11 ------- .../Surface_mesh_approximation/CMakeLists.txt | 11 ------- .../optimal_rotation/CMakeLists.txt | 2 -- .../CMakeLists.txt | 1 - .../Surface_mesh_segmentation/CMakeLists.txt | 18 ------------ .../CMakeLists.txt | 12 -------- .../CMakeLists.txt | 19 ------------ .../examples/Surface_sweep_2/CMakeLists.txt | 19 ------------ .../Tetrahedral_remeshing/CMakeLists.txt | 8 ----- .../applications/Triangulation/CMakeLists.txt | 17 ----------- .../benchmark/Triangulation/CMakeLists.txt | 3 -- .../benchmark/Triangulation_3/CMakeLists.txt | 22 -------------- .../Triangulation_on_sphere_2/CMakeLists.txt | 1 - .../Triangulation_on_sphere_2/CMakeLists.txt | 18 ++++-------- .../test/Voronoi_diagram_2/CMakeLists.txt | 4 +-- Weights/examples/Weights/CMakeLists.txt | 5 +--- Weights/test/Weights/CMakeLists.txt | 5 +--- 83 files changed, 20 insertions(+), 761 deletions(-) diff --git a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt index 841c0b28d95..fca83423fa4 100644 --- a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt @@ -7,7 +7,6 @@ find_package(MPFI QUIET) if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP) include(${MPFI_USE_FILE}) - include(CGAL_VersionUtils) create_single_source_cgal_program("Compare_1.cpp") create_single_source_cgal_program("Construct_algebraic_real_1.cpp") create_single_source_cgal_program("Isolate_1.cpp") diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt index 1a16e619149..aafb87f5217 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt @@ -14,24 +14,9 @@ if(RS3_FOUND) include(${RS3_USE_FILE}) endif() -# Boost and its components -find_package(Boost) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - # include for local directory include_directories(BEFORE include) -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("cyclic.cpp") create_single_source_cgal_program("Descartes.cpp") diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt index 35940772325..8574cef2a18 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt @@ -124,9 +124,6 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND) else() set(MISSING_DEPS "") - if(NOT CGAL_FOUND) - set(MISSING_DEPS "CGAL, ${MISSING_DEPS}") - endif() if(NOT CGAL_Qt5_FOUND) set(MISSING_DEPS "the CGAL Qt5 library, ${MISSING_DEPS}") endif() diff --git a/BGL/examples/BGL_LCC/CMakeLists.txt b/BGL/examples/BGL_LCC/CMakeLists.txt index 9264e681521..f9230373e23 100644 --- a/BGL/examples/BGL_LCC/CMakeLists.txt +++ b/BGL/examples/BGL_LCC/CMakeLists.txt @@ -7,23 +7,6 @@ project(BGL_LCC_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# 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 - -# Creating entries for all C++ files with "main" routine -# ########################################################## - # create a target per cppfile file( GLOB_RECURSE cppfiles diff --git a/BGL/examples/BGL_OpenMesh/CMakeLists.txt b/BGL/examples/BGL_OpenMesh/CMakeLists.txt index 19ade1e416b..45babdf9fed 100644 --- a/BGL/examples/BGL_OpenMesh/CMakeLists.txt +++ b/BGL/examples/BGL_OpenMesh/CMakeLists.txt @@ -7,38 +7,9 @@ project(BGL_OpenMesh_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# 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() - find_package(OpenMesh QUIET) - if(OpenMesh_FOUND) include(UseOpenMesh) -else() - - message( - STATUS "NOTICE: These examples require OpenMesh and will not be compiled.") - return() - -endif() - -# include for local directory - -# include for local package - -# Creating entries for all C++ files with "main" routine -# ########################################################## - -if(OpenMesh_FOUND) create_single_source_cgal_program("TriMesh.cpp") target_link_libraries(TriMesh PRIVATE ${OPENMESH_LIBRARIES}) else() diff --git a/BGL/examples/BGL_graphcut/CMakeLists.txt b/BGL/examples/BGL_graphcut/CMakeLists.txt index c9385bee6d9..dc8be80ed63 100644 --- a/BGL/examples/BGL_graphcut/CMakeLists.txt +++ b/BGL/examples/BGL_graphcut/CMakeLists.txt @@ -8,25 +8,6 @@ project(BGL_graphcut_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# 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 - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("alpha_expansion_example.cpp") create_single_source_cgal_program( "face_selection_borders_regularization_example.cpp") diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index f898cb277fa..5a541371584 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -7,25 +7,6 @@ project(BGL_polyhedron_3_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# 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 - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("distance.cpp") create_single_source_cgal_program("incident_vertices.cpp") create_single_source_cgal_program("kruskal.cpp") diff --git a/BGL/examples/BGL_surface_mesh/CMakeLists.txt b/BGL/examples/BGL_surface_mesh/CMakeLists.txt index e53938277bb..1056de28413 100644 --- a/BGL/examples/BGL_surface_mesh/CMakeLists.txt +++ b/BGL/examples/BGL_surface_mesh/CMakeLists.txt @@ -3,8 +3,6 @@ project(BGL_surface_mesh_Examples) find_package(CGAL REQUIRED) -# include for local package - create_single_source_cgal_program("prim.cpp") create_single_source_cgal_program("gwdwg.cpp") create_single_source_cgal_program("seam_mesh.cpp") diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index f695c456d7d..30b6aaf28d0 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -7,15 +7,6 @@ project(BGL_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost) - -if(NOT Boost_FOUND) - message( - STATUS "This project requires the Boost library, and will not be compiled.") - return() -endif() - find_package(OpenMesh QUIET) if(OpenMesh_FOUND) @@ -24,17 +15,10 @@ if(OpenMesh_FOUND) else() message(STATUS "Tests that use OpenMesh will not be compiled.") endif() - -# include for local package - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - if(OpenMesh_FOUND) create_single_source_cgal_program("graph_concept_OpenMesh.cpp") target_link_libraries(graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) endif() - create_single_source_cgal_program("test_split.cpp") create_single_source_cgal_program("next.cpp") create_single_source_cgal_program("test_circulator.cpp") diff --git a/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt b/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt index 9aa881ce12f..c7341df3d11 100644 --- a/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt +++ b/Barycentric_coordinates_2/benchmark/Barycentric_coordinates_2/CMakeLists.txt @@ -6,8 +6,6 @@ project(Barycentric_coordinates_2_Benchmarks) cmake_minimum_required(VERSION 3.1...3.23) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) -include(CGAL_CreateSingleSourceCGALProgram) create_single_source_cgal_program("benchmark_segment_coordinates.cpp") create_single_source_cgal_program("benchmark_triangle_coordinates.cpp") diff --git a/CGAL_Core/examples/Core/CMakeLists.txt b/CGAL_Core/examples/Core/CMakeLists.txt index 77eaec4e81c..d4513e22dea 100644 --- a/CGAL_Core/examples/Core/CMakeLists.txt +++ b/CGAL_Core/examples/Core/CMakeLists.txt @@ -5,27 +5,8 @@ project(Core_Examples) find_package(CGAL REQUIRED COMPONENTS Core) if(NOT CGAL_Core_FOUND) - - message( - STATUS - "This project requires the CGAL_Core library, and will not be compiled.") + message("NOTICE: This project requires the CGAL_Core library, and will not be compiled.") return() - endif() -# Boost and its components -find_package(Boost) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("delaunay.cpp") diff --git a/CGAL_ImageIO/examples/CGALimageIO/CMakeLists.txt b/CGAL_ImageIO/examples/CGALimageIO/CMakeLists.txt index a5d95b3fd05..a9e95aef718 100644 --- a/CGAL_ImageIO/examples/CGALimageIO/CMakeLists.txt +++ b/CGAL_ImageIO/examples/CGALimageIO/CMakeLists.txt @@ -6,15 +6,7 @@ project(CGALimageIO_Examples) find_package(CGAL REQUIRED COMPONENTS ImageIO) -if(CGAL_ImageIO_FOUND) - - create_single_source_cgal_program("convert_raw_image_to_inr.cpp") - create_single_source_cgal_program("test_imageio.cpp") - create_single_source_cgal_program("extract_a_sub_image.cpp") - create_single_source_cgal_program("slice_image.cpp") -else() - message( - STATUS - "NOTICE: This demo needs the CGAL ImageIO library, and will not be compiled." - ) -endif() +create_single_source_cgal_program("convert_raw_image_to_inr.cpp") +create_single_source_cgal_program("test_imageio.cpp") +create_single_source_cgal_program("extract_a_sub_image.cpp") +create_single_source_cgal_program("slice_image.cpp") diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index 2af17775b7c..83cc5c6149d 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -7,15 +7,6 @@ project(Classification_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# 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() - set(Classification_dependencies_met TRUE) find_package(Boost OPTIONAL_COMPONENTS serialization iostreams) diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index 63ba324644c..d785190f8cb 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -7,15 +7,6 @@ project(Classification_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# 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() - set(Classification_dependencies_met TRUE) find_package(Boost OPTIONAL_COMPONENTS serialization iostreams) diff --git a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt index 097eb885bd6..55bc102f967 100644 --- a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt @@ -7,18 +7,6 @@ project(Convex_hull_3_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# 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() - find_package(OpenMesh QUIET) if(OpenMesh_FOUND) @@ -26,14 +14,6 @@ if(OpenMesh_FOUND) else() message(STATUS "Examples that use OpenMesh will not be compiled.") endif() - -# include for local directory - -# include for local package - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("quickhull_indexed_triangle_set_3.cpp") create_single_source_cgal_program("dynamic_hull_3.cpp") create_single_source_cgal_program("dynamic_hull_LCC_3.cpp") diff --git a/Convex_hull_3/test/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/test/Convex_hull_3/CMakeLists.txt index 27325c0a8c7..3a728d3500a 100644 --- a/Convex_hull_3/test/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/test/Convex_hull_3/CMakeLists.txt @@ -6,14 +6,6 @@ project(Convex_hull_3_Tests) find_package(CGAL REQUIRED) -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() - include_directories(BEFORE "include") # create a target per cppfile diff --git a/Filtered_kernel/benchmark/Filtered_kernel/CMakeLists.txt b/Filtered_kernel/benchmark/Filtered_kernel/CMakeLists.txt index 50d11049a6b..b894f739229 100644 --- a/Filtered_kernel/benchmark/Filtered_kernel/CMakeLists.txt +++ b/Filtered_kernel/benchmark/Filtered_kernel/CMakeLists.txt @@ -8,8 +8,6 @@ add_executable(bench_simple_comparisons bench_simple_comparisons.cpp) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - add_executable(bench_orientation_3 "orientation_3.cpp") target_link_libraries(bench_orientation_3 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) diff --git a/Generalized_map/test/Generalized_map/CMakeLists.txt b/Generalized_map/test/Generalized_map/CMakeLists.txt index d712bb061dc..4cebd95827c 100644 --- a/Generalized_map/test/Generalized_map/CMakeLists.txt +++ b/Generalized_map/test/Generalized_map/CMakeLists.txt @@ -7,17 +7,6 @@ project(Generalized_map_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# 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() set(hfiles Generalized_map_2_test.h Generalized_map_3_test.h Generalized_map_4_test.h GMap_test_insertions.h) diff --git a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt index 0b8741ef5d2..ca4a58c5958 100644 --- a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt +++ b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt @@ -22,9 +22,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) add_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- - # The "Delaunay" demo: Alpha_shapes_2 - #-------------------------------- + # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Alpha_shapes_2.ui) diff --git a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt index 8eba3017587..69a30838cea 100644 --- a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt +++ b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt @@ -24,9 +24,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) add_definitions(-DQT_NO_KEYWORDS) set(CMAKE_AUTOMOC ON) - #---------------------------------------------- - # The "Bounding volumes" demo: Bounding_volumes - #---------------------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Bounding_volumes.ui) diff --git a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt index 9b0fbd66a4a..eb2e2b79011 100644 --- a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt +++ b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt @@ -22,9 +22,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- - # The demo: Circular_kernel_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Circular_kernel_2.ui) diff --git a/GraphicsView/demo/Generator/CMakeLists.txt b/GraphicsView/demo/Generator/CMakeLists.txt index b9644157f9e..3be28ec735d 100644 --- a/GraphicsView/demo/Generator/CMakeLists.txt +++ b/GraphicsView/demo/Generator/CMakeLists.txt @@ -22,9 +22,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- - # Demo: Generator_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Generator_2.ui) diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt index 3345c6df337..432cb655369 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt @@ -24,9 +24,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- - # The "L1 Voronoi diagram" demo: L1_voronoi_diagram_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES L1_voronoi_diagram_2.ui) diff --git a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt index ff7f9dc4b71..a6de2468c40 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt +++ b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt @@ -23,9 +23,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- - # Demo: Largest_empty_rectangle_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Largest_empty_rectangle_2.ui) diff --git a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt index 993391e843a..2f964941bb0 100644 --- a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt @@ -21,9 +21,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- - # The "2D Periodic triangulation" demo: Periodic_2_triangulation_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Periodic_2_triangulation_2.ui) diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index fc0a5e8cda2..5aa21d3880b 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -33,9 +33,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) add_definitions(-DCGAL_USE_CORE) endif() - #-------------------------------- - # Demo: Polygon_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Polygon_2.ui) diff --git a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt index 2615db48f37..745fbb09ed0 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt @@ -29,9 +29,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_USE_FILE}) add_definitions(-DQT_NO_KEYWORDS) - #-------------------------------- - # The "Segment Voronoi" demo: Segment_voronoi_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(CDT_UI_FILES Segment_voronoi_2.ui) diff --git a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt index 5f80bc0a62e..f1d5e4fbbd4 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt @@ -28,9 +28,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_USE_FILE}) add_definitions(-DQT_NO_KEYWORDS) - #-------------------------------- - # The "Segment Voronoi Linf" demo: Segment_voronoi_linf_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(CDT_UI_FILES Segment_voronoi_2.ui) diff --git a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt index 34af3f712aa..0b7ebdeb6d8 100644 --- a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt +++ b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt @@ -22,7 +22,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) add_definitions(-DQT_NO_KEYWORDS) set(CMAKE_INCLUDE_CURRENT_DIR ON) - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Snap_rounding_2.ui) diff --git a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt index a67f0aa90d8..f5d5aad6d14 100644 --- a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt +++ b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt @@ -23,9 +23,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- - # Demo: Spatial_searching_2 - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Spatial_searching_2.ui) diff --git a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt index e45c19bc07a..0067351b4e1 100644 --- a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt +++ b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt @@ -23,7 +23,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) - #-------------------------------- # UI files (Qt Designer files) qt5_wrap_ui(DT_UI_FILES Stream_lines_2.ui) diff --git a/Hash_map/benchmark/Hash_map/CMakeLists.txt b/Hash_map/benchmark/Hash_map/CMakeLists.txt index 0d2e366b101..6aaaab62124 100644 --- a/Hash_map/benchmark/Hash_map/CMakeLists.txt +++ b/Hash_map/benchmark/Hash_map/CMakeLists.txt @@ -7,25 +7,6 @@ project(Hash_map) # CGAL and its components find_package(CGAL REQUIRED) -# 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 - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("hm.cpp") create_single_source_cgal_program("foreach.cpp") create_single_source_cgal_program("triangulation.cpp") diff --git a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt index 5d52ae0861b..fc6be4f65ec 100644 --- a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt @@ -7,18 +7,6 @@ project(Heat_method_3_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# 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() - find_package(Eigen3 3.3.0) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) @@ -29,9 +17,6 @@ endif() # include for local directory include_directories(BEFORE include) -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("heat_method.cpp") target_link_libraries(heat_method PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_polyhedron.cpp") diff --git a/Heat_method_3/test/Heat_method_3/CMakeLists.txt b/Heat_method_3/test/Heat_method_3/CMakeLists.txt index b248cc08734..f57897dc07b 100644 --- a/Heat_method_3/test/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/test/Heat_method_3/CMakeLists.txt @@ -7,18 +7,6 @@ project(Heat_method_3_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# 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() - find_package(Eigen3 3.3.0) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) @@ -29,9 +17,6 @@ endif() # include for local directory include_directories(BEFORE include) -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("heat_method_concept.cpp") target_link_libraries(heat_method_concept PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh_test.cpp") diff --git a/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/CMakeLists.txt index 8c5ab3d473f..bb1b77b196f 100644 --- a/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/benchmark/Hyperbolic_triangulation_2/CMakeLists.txt @@ -6,8 +6,4 @@ project(Hyperbolic_triangulation_2_benchmark) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - -include(CGAL_CreateSingleSourceCGALProgram) - create_single_source_cgal_program("bench_insertion_with_different_kernels.cpp") diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt b/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt index bc7fb931661..4b65e2ee3c5 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt @@ -8,13 +8,6 @@ endif() find_package(CGAL REQUIRED) -find_package(Boost 1.43.0) -if(Boost_FOUND) - include_directories(${Boost_INCLUDE_DIRS}) -else() - set(USE_IN_SOURCE_TREE_BOOST true) -endif() - add_subdirectory(openvolumemesh) include_directories(BEFORE openvolumemesh/src) diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index 1044f4486a7..335e98aa0de 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -9,7 +9,6 @@ if(CGAL_MESH_3_VERBOSE) endif() find_package(CGAL REQUIRED COMPONENTS ImageIO) -find_package(Boost) option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF) diff --git a/Minkowski_sum_2/test/Minkowski_sum_2/CMakeLists.txt b/Minkowski_sum_2/test/Minkowski_sum_2/CMakeLists.txt index 723acfc1282..be75477e286 100644 --- a/Minkowski_sum_2/test/Minkowski_sum_2/CMakeLists.txt +++ b/Minkowski_sum_2/test/Minkowski_sum_2/CMakeLists.txt @@ -4,13 +4,6 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Minkowski_sum_2_Tests) -# Commented out C++11 for now -# list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_generalized_initializers has_cpp11) -# if (has_cpp11 LESS 0) -# message(STATUS "NOTICE: These examples requires a C++11 compiler and will not be compiled.") -# return() -# endif() - find_package(CGAL REQUIRED COMPONENTS Core) # create a target per cppfile diff --git a/Number_types/test/Number_types/CMakeLists.txt b/Number_types/test/Number_types/CMakeLists.txt index b26ca0fe97a..a637db06486 100644 --- a/Number_types/test/Number_types/CMakeLists.txt +++ b/Number_types/test/Number_types/CMakeLists.txt @@ -8,8 +8,6 @@ project(Number_types_Tests) find_package(CGAL REQUIRED COMPONENTS Core) -include(CGAL_VersionUtils) - include_directories(BEFORE include) create_single_source_cgal_program("bench_interval.cpp") @@ -86,11 +84,8 @@ if(NOT CGAL_DISABLE_GMP) else()#NOT CGAL_DISABLE_GMP message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.") endif()#NOT CGAL_DISABLE_GMP + # all the programs below will be linked against MPFI in case it is present create_single_source_cgal_program("Quotient_new.cpp") create_single_source_cgal_program("test_nt_Coercion_traits.cpp") - -find_package(Boost) -if(Boost_FOUND) create_single_source_cgal_program("to_interval_test_boost.cpp") -endif() diff --git a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt index cb165f79427..8ad70c5f829 100644 --- a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt @@ -7,8 +7,6 @@ project(Optimal_bounding_box_Benchmark) # CGAL and its components find_package(CGAL REQUIRED) -# include helper file -include(${CGAL_USE_FILE}) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt index 61362c53923..05c83888820 100644 --- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt @@ -7,29 +7,15 @@ project(Periodic_3_mesh_3_Examples) # CGAL and its components find_package(CGAL REQUIRED COMPONENTS ImageIO) -# include for local package # Use Eigen find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") + message("NOTICE: This project requires the Eigen library, and will not be compiled.") return() endif() -# Boost and its components -find_package(Boost) - -if(NOT Boost_FOUND) - message( - STATUS "This project requires the Boost library, and will not be compiled.") - return() -endif() - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("mesh_implicit_shape.cpp") create_single_source_cgal_program("mesh_implicit_multi_domain.cpp") create_single_source_cgal_program("mesh_implicit_shape_with_subdomains.cpp") diff --git a/Periodic_4_hyperbolic_triangulation_2/benchmark/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt b/Periodic_4_hyperbolic_triangulation_2/benchmark/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt index 02ee6e0849a..e83a7c4a836 100644 --- a/Periodic_4_hyperbolic_triangulation_2/benchmark/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt +++ b/Periodic_4_hyperbolic_triangulation_2/benchmark/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt @@ -6,10 +6,6 @@ project(Periodic_4_hyperbolic_triangulation_2_Benchmarks) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - -include(CGAL_CreateSingleSourceCGALProgram) - create_single_source_cgal_program("bench_p4ht2_hyperbolic_vs_euclidean.cpp") create_single_source_cgal_program("bench_p4ht2_insertion.cpp") create_single_source_cgal_program("bench_p4ht2_remove_dummy_points.cpp") diff --git a/Point_set_3/examples/Point_set_3/CMakeLists.txt b/Point_set_3/examples/Point_set_3/CMakeLists.txt index f7600b60857..1ba5c604bab 100644 --- a/Point_set_3/examples/Point_set_3/CMakeLists.txt +++ b/Point_set_3/examples/Point_set_3/CMakeLists.txt @@ -7,21 +7,6 @@ project(Point_set_3_Examples) # CGAL and its components find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -# 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() - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("point_set.cpp") create_single_source_cgal_program("point_set_property.cpp") create_single_source_cgal_program("point_set_read_xyz.cpp") diff --git a/Point_set_3/test/Point_set_3/CMakeLists.txt b/Point_set_3/test/Point_set_3/CMakeLists.txt index b7496eb6d5e..970ffd456f5 100644 --- a/Point_set_3/test/Point_set_3/CMakeLists.txt +++ b/Point_set_3/test/Point_set_3/CMakeLists.txt @@ -7,25 +7,6 @@ project(Point_set_3_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# 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 - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("point_set_test.cpp") create_single_source_cgal_program("point_set_test_join.cpp") create_single_source_cgal_program("test_deprecated_io_ps.cpp") diff --git a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt index 52c6df32af0..b96bd07f0d9 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt @@ -19,9 +19,6 @@ if (MSVC) message( STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" ) endif() -# Temporary debugging stuff -ADD_DEFINITIONS( "-DDEBUG_TRACE" ) - find_package( TBB QUIET ) include(CGAL_TBB_support) diff --git a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt index ccd26052b98..22a07946a15 100644 --- a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt @@ -7,26 +7,13 @@ project(Polygon_mesh_processing) # CGAL and its components find_package(CGAL REQUIRED) -# 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.") - +find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) +include(CGAL_Eigen3_support) +if(NOT TARGET CGAL::Eigen3_support) + message("NOTICE: Benchmarks require Eigen 3.2 (or greater), and will not be compiled") return() endif() -# include for local directory - -# include for local package -find_package(Eigen3 REQUIRED 3.2.0) #(requires 3.2.0 or greater) -include(CGAL_Eigen3_support) - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - set(FAST_ENVELOPE_BUILD_DIR "" CACHE PATH "Path to fast-evelope build directory") if (FAST_ENVELOPE_BUILD_DIR) message(STATUS "Using ${FAST_ENVELOPE_BUILD_DIR} as build directory of fast-evelope") diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt index 6f14f6590fb..e3b460139a0 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt @@ -8,23 +8,6 @@ cmake_minimum_required(VERSION 3.1...3.23) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS - "NOTICE: This project requires the Boost library, and will not be compiled." - ) - - return() - -endif() - -# Creating entries for all C++ files with "main" routine -# ########################################################## - find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) diff --git a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt index 4d3142d9b4d..b4984c15043 100644 --- a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt @@ -8,23 +8,6 @@ cmake_minimum_required(VERSION 3.1...3.23) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -if(NOT Boost_FOUND) - - message( - STATUS - "NOTICE: This project requires the Boost library, and will not be compiled." - ) - - return() - -endif() - -# Creating entries for all C++ files with "main" routine -# ########################################################## - find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index b66e739024b..e560e6b44f0 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -8,14 +8,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) -list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_generalized_initializers has_cpp11) -if(has_cpp11 LESS 0) - message( - STATUS - "NOTICE: This demo requires a C++11 compiler and will not be compiled.") - return() -endif() - #Defines flags to emulate windows behavior for linking error generation if(CMAKE_CXX_COMPILER_ID EQUAL Clang OR CMAKE_COMPILER_IS_GNUCC diff --git a/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt b/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt index 4be14be6b2a..954afd626ab 100644 --- a/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt +++ b/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt @@ -7,26 +7,6 @@ project(Polyline_simplification_2_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost) - -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 - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program( "issue-5774.cpp" ) create_single_source_cgal_program( "simplify_polygon_test.cpp" ) - create_single_source_cgal_program( "simplify_polyline_with_duplicate_points.cpp" ) diff --git a/Property_map/examples/Property_map/CMakeLists.txt b/Property_map/examples/Property_map/CMakeLists.txt index e1f2e269e23..771f98f63ed 100644 --- a/Property_map/examples/Property_map/CMakeLists.txt +++ b/Property_map/examples/Property_map/CMakeLists.txt @@ -4,23 +4,6 @@ project(Property_map_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# 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 - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("dynamic_properties.cpp") find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) diff --git a/Property_map/test/Property_map/CMakeLists.txt b/Property_map/test/Property_map/CMakeLists.txt index fe00b2bf83a..cc6b86f23d7 100644 --- a/Property_map/test/Property_map/CMakeLists.txt +++ b/Property_map/test/Property_map/CMakeLists.txt @@ -4,18 +4,6 @@ project(Property_map_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# 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() - find_package(OpenMesh QUIET) if(OpenMesh_FOUND) @@ -24,20 +12,9 @@ if(OpenMesh_FOUND) else() message(STATUS "Examples that use OpenMesh will not be compiled.") endif() - -# include for local directory - -# include for local package - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("test_property_map.cpp") - create_single_source_cgal_program("dynamic_property_map.cpp") - create_single_source_cgal_program("dynamic_properties_test.cpp") - create_single_source_cgal_program("kernel_converter_properties_test.cpp") if(OpenMesh_FOUND) diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index c8e1f4d9e83..2c8200b2bed 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -4,7 +4,6 @@ project(Ridges_3_Examples) find_package(CGAL REQUIRED) -# use either Eigen find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) diff --git a/Ridges_3/test/Ridges_3/CMakeLists.txt b/Ridges_3/test/Ridges_3/CMakeLists.txt index 73fcc4e7f89..4ec3de72518 100644 --- a/Ridges_3/test/Ridges_3/CMakeLists.txt +++ b/Ridges_3/test/Ridges_3/CMakeLists.txt @@ -6,7 +6,6 @@ project(Ridges_3_Tests) find_package(CGAL REQUIRED) -# use either Eigen find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) diff --git a/STL_Extension/benchmark/copy_n_benchmark/CMakeLists.txt b/STL_Extension/benchmark/copy_n_benchmark/CMakeLists.txt index 34e2b2e9691..f84da4862f9 100644 --- a/STL_Extension/benchmark/copy_n_benchmark/CMakeLists.txt +++ b/STL_Extension/benchmark/copy_n_benchmark/CMakeLists.txt @@ -6,8 +6,5 @@ project(copy_n_benchmark_example) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - create_single_source_cgal_program("copy_n_benchmark.cpp") - create_single_source_cgal_program("copy_n_use_case_benchmark.cpp") diff --git a/Segment_Delaunay_graph_2/benchmark/Segment_Delaunay_graph_2/CMakeLists.txt b/Segment_Delaunay_graph_2/benchmark/Segment_Delaunay_graph_2/CMakeLists.txt index 016a4545fc0..c46aa5c84de 100644 --- a/Segment_Delaunay_graph_2/benchmark/Segment_Delaunay_graph_2/CMakeLists.txt +++ b/Segment_Delaunay_graph_2/benchmark/Segment_Delaunay_graph_2/CMakeLists.txt @@ -6,8 +6,6 @@ project(Segment_Delaunay_graph_2_example) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - create_single_source_cgal_program("benchmark.cpp") create_single_source_cgal_program("benchmark_nox.cpp") create_single_source_cgal_program("double.cpp") diff --git a/Segment_Delaunay_graph_Linf_2/benchmark/Segment_Delaunay_graph_Linf_2/CMakeLists.txt b/Segment_Delaunay_graph_Linf_2/benchmark/Segment_Delaunay_graph_Linf_2/CMakeLists.txt index 4d6aa5dae0a..806bec1f95d 100644 --- a/Segment_Delaunay_graph_Linf_2/benchmark/Segment_Delaunay_graph_Linf_2/CMakeLists.txt +++ b/Segment_Delaunay_graph_Linf_2/benchmark/Segment_Delaunay_graph_Linf_2/CMakeLists.txt @@ -6,8 +6,6 @@ project(Segment_Delaunay_graph_2_example) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - create_single_source_cgal_program("sdg-creation-time.cpp") create_single_source_cgal_program("benchmark-gen.cpp") create_single_source_cgal_program("incirc.cpp") diff --git a/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt b/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt index a679f950cba..7ee0eaa3b49 100644 --- a/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt +++ b/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt @@ -4,16 +4,6 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Set_movable_separability_2_Examples) -list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_generalized_initializers has_cpp11) -if(has_cpp11 LESS 0) - message( - STATUS - "NOTICE: These examples requires a C++11 compiler and will not be compiled." - ) - return() -endif() - - find_package(CGAL REQUIRED) create_single_source_cgal_program("top_edges_single_mold_trans_cast.cpp") diff --git a/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt b/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt index 3a9a7471fa9..ce108acd83c 100644 --- a/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt +++ b/Set_movable_separability_2/test/Set_movable_separability_2/CMakeLists.txt @@ -11,16 +11,6 @@ if(CGAL_DIR) # Just to avoid a warning from CMake when that variable is set on the command line... endif() -list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_generalized_initializers has_cpp11) -if(has_cpp11 LESS 0) - message( - STATUS - "NOTICE: These examples requires a C++11 compiler and will not be compiled." - ) - return() -endif() - - find_package(CGAL REQUIRED) create_single_source_cgal_program("test_top_edges_single_mold_trans_cast.cpp") diff --git a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt index 84e8e1a509a..9de592b8f8a 100644 --- a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt @@ -7,9 +7,6 @@ cmake_minimum_required(VERSION 3.1...3.23) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) -include(CGAL_CreateSingleSourceCGALProgram) - # Find OSQP library and headers. find_package(OSQP QUIET) include(CGAL_OSQP_support) diff --git a/Spatial_searching/benchmark/Spatial_searching/tools/CMakeLists.txt b/Spatial_searching/benchmark/Spatial_searching/tools/CMakeLists.txt index 3d751e686bd..20d5ad1bb2d 100644 --- a/Spatial_searching/benchmark/Spatial_searching/tools/CMakeLists.txt +++ b/Spatial_searching/benchmark/Spatial_searching/tools/CMakeLists.txt @@ -6,7 +6,4 @@ project(tools_) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) -include_directories(BEFORE "../include") - create_single_source_cgal_program("points_in_bbox.cpp") diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index 374ff11054d..5dc1eab0dcd 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -7,21 +7,11 @@ project(Spatial_searching_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater) -include(CGAL_Eigen3_support) - if(MSVC) # Turn off VC++ warning set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244") endif() -# include for local directory - -# include for local package - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("circular_query.cpp") create_single_source_cgal_program("distance_browsing.cpp") create_single_source_cgal_program("iso_rectangle_2_query.cpp") diff --git a/Spatial_sorting/benchmark/Spatial_sorting/CMakeLists.txt b/Spatial_sorting/benchmark/Spatial_sorting/CMakeLists.txt index 69fb787285b..9cd0fbfc6ba 100644 --- a/Spatial_sorting/benchmark/Spatial_sorting/CMakeLists.txt +++ b/Spatial_sorting/benchmark/Spatial_sorting/CMakeLists.txt @@ -6,5 +6,4 @@ project(Spatial_sorting_) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) create_single_source_cgal_program("simple.cpp") diff --git a/Stream_support/benchmark/Stream_support/CMakeLists.txt b/Stream_support/benchmark/Stream_support/CMakeLists.txt index 1a060090fb6..8d03f6b673a 100644 --- a/Stream_support/benchmark/Stream_support/CMakeLists.txt +++ b/Stream_support/benchmark/Stream_support/CMakeLists.txt @@ -7,24 +7,5 @@ project(Stream_support) # CGAL and its components find_package(CGAL REQUIRED) -# 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 - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("read_doubles.cpp") create_single_source_cgal_program("read_points.cpp") diff --git a/Surface_mesh/benchmark/CMakeLists.txt b/Surface_mesh/benchmark/CMakeLists.txt index 31f48865d7f..841e9b4bea9 100644 --- a/Surface_mesh/benchmark/CMakeLists.txt +++ b/Surface_mesh/benchmark/CMakeLists.txt @@ -3,8 +3,6 @@ project(Surface_mesh_performance) find_package(CGAL REQUIRED) -include_directories(BEFORE "../include") - # For profilling with gprof #add_definitions("-pg") #SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg") diff --git a/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/CMakeLists.txt index 70482a41b01..a4eea6abf69 100644 --- a/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/benchmark/Surface_mesh_approximation/CMakeLists.txt @@ -7,31 +7,5 @@ project(Surface_mesh_approximation_Benchmarks) # CGAL and its components find_package(CGAL REQUIRED) -# include helper file -include(${CGAL_USE_FILE}) - -# 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 C++ files with "main" routine -# ########################################################## - -include(CGAL_CreateSingleSourceCGALProgram) - create_single_source_cgal_program("vsa_autoinit_timing_benchmark.cpp") - create_single_source_cgal_program("vsa_timing_benchmark.cpp") diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt index a76d0e049f7..1d5b7047fd7 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt @@ -7,14 +7,6 @@ project(Surface_mesh_approximation_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost -find_package(Boost) -if(NOT Boost_FOUND) - message( - STATUS "This project requires the Boost library, and will not be compiled.") - return() -endif() - # Use Eigen (for PCA) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) @@ -23,9 +15,6 @@ if(NOT TARGET CGAL::Eigen3_support) return() endif() -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("vsa_approximation_2_example.cpp") target_link_libraries(vsa_approximation_2_example PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt index cb8582389d6..ab1ca32384a 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt @@ -7,14 +7,6 @@ project(Surface_mesh_approximation_Tests) # CGAL and its components find_package(CGAL REQUIRED) -# Boost -find_package(Boost) -if(NOT Boost_FOUND) - message( - STATUS "This project requires the Boost library, and will not be compiled.") - return() -endif() - # Use Eigen (for PCA) find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) @@ -23,9 +15,6 @@ if(NOT TARGET CGAL::Eigen3_support) return() endif() -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("vsa_class_interface_test.cpp") target_link_libraries(vsa_class_interface_test PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt b/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt index ca4ca2ffd1e..6e3106ff9f4 100644 --- a/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt +++ b/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt @@ -3,8 +3,6 @@ project(benchmark_for_closest_rotation) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt index d4c54e35640..b09f63d1cd8 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt @@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Surface_mesh_parameterization_Examples) -# Find CGAL find_package(CGAL REQUIRED) find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) diff --git a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt index b0802132a2e..17af23300b8 100644 --- a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt +++ b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt @@ -7,18 +7,6 @@ project(Surface_mesh_segmentation_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost) - -if(NOT Boost_FOUND) - - message( - STATUS "This project requires the Boost library, and will not be compiled.") - - return() - -endif() - find_package(OpenMesh QUIET) if(OpenMesh_FOUND) @@ -26,12 +14,6 @@ if(OpenMesh_FOUND) else() message(STATUS "Examples that use OpenMesh will not be compiled.") endif() - -# include for local package - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("sdf_values_example.cpp") create_single_source_cgal_program("segmentation_from_sdf_values_example.cpp") create_single_source_cgal_program("segmentation_via_sdf_values_example.cpp") diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt index 68f1f271083..df746cdc92c 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -7,14 +7,6 @@ project(Surface_mesh_simplification_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost) -if(NOT Boost_FOUND) - message( - STATUS "This project requires the Boost library, and will not be compiled.") - return() -endif() - find_package(OpenMesh QUIET) if(OpenMesh_FOUND) @@ -22,10 +14,6 @@ if(OpenMesh_FOUND) else() message(STATUS "Examples that use OpenMesh will not be compiled.") endif() - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("edge_collapse_envelope.cpp") create_single_source_cgal_program("edge_collapse_constrain_sharp_edges.cpp") create_single_source_cgal_program("edge_collapse_constrained_border_polyhedron.cpp") diff --git a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt index 0eb517e341d..061db68f7e1 100644 --- a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt @@ -4,28 +4,9 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Mean_curvature_skeleton) -#SET(CMAKE_BUILD_TYPE "Debug") -#SET(GCC_COVERAGE_COMPILE_FLAGS "-fprofile-arcs -ftest-coverage") -#SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}" ) - # CGAL and its components find_package(CGAL REQUIRED) -# 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 find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) diff --git a/Surface_sweep_2/examples/Surface_sweep_2/CMakeLists.txt b/Surface_sweep_2/examples/Surface_sweep_2/CMakeLists.txt index c7cba6d622b..37472e6b921 100644 --- a/Surface_sweep_2/examples/Surface_sweep_2/CMakeLists.txt +++ b/Surface_sweep_2/examples/Surface_sweep_2/CMakeLists.txt @@ -7,23 +7,4 @@ project(Surface_sweep_2_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# 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 - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("plane_sweep.cpp") diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt index c74b11a60ad..b94703841f1 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt @@ -8,14 +8,6 @@ project(Tetrahedral_remeshing_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# 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() - # Use Eigen for Mesh_3 find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) include(CGAL_Eigen3_support) diff --git a/Triangulation/applications/Triangulation/CMakeLists.txt b/Triangulation/applications/Triangulation/CMakeLists.txt index 8febe2625c7..2b0d8c131ed 100644 --- a/Triangulation/applications/Triangulation/CMakeLists.txt +++ b/Triangulation/applications/Triangulation/CMakeLists.txt @@ -7,18 +7,6 @@ project(Triangulation_apps) # CGAL and its components find_package(CGAL REQUIRED) -# 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() - find_package(Eigen3 3.1.0) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) @@ -29,11 +17,6 @@ endif() # include for local directory include_directories(BEFORE include) -# include for local package - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - create_single_source_cgal_program("points_to_RT_to_off.cpp") target_link_libraries(points_to_RT_to_off PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("points_to_DT_to_off.cpp") diff --git a/Triangulation/benchmark/Triangulation/CMakeLists.txt b/Triangulation/benchmark/Triangulation/CMakeLists.txt index a1c4160d2fb..b47bea021e1 100644 --- a/Triangulation/benchmark/Triangulation/CMakeLists.txt +++ b/Triangulation/benchmark/Triangulation/CMakeLists.txt @@ -6,8 +6,6 @@ project(Triangulation_benchmark) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - find_package(Eigen3 3.1.0) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) @@ -16,7 +14,6 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(delaunay PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("Td_vs_T2_and_T3.cpp") target_link_libraries(Td_vs_T2_and_T3 PUBLIC CGAL::Eigen3_support) - else() message("NOTICE: Executables in this directory require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt b/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt index 6d9dd5907d5..8a207c2b79f 100644 --- a/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt @@ -8,31 +8,9 @@ project(Triangulation_3) # CGAL and its components find_package(CGAL REQUIRED) -# 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 - -# Creating entries for all C++ files with "main" routine -# ########################################################## - create_single_source_cgal_program("incident_edges.cpp") - create_single_source_cgal_program("simple_2.cpp") - create_single_source_cgal_program("simple.cpp") - create_single_source_cgal_program("Triangulation_benchmark_3.cpp") create_single_source_cgal_program( "segment_traverser_benchmark.cpp" ) diff --git a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt index 4312001ac0a..f99b2a133d0 100644 --- a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt @@ -20,7 +20,6 @@ if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() - # Find CGAL and CGAL Qt5 find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) diff --git a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/CMakeLists.txt index a1c1d31478d..3d3d7367f53 100644 --- a/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/examples/Triangulation_on_sphere_2/CMakeLists.txt @@ -4,16 +4,8 @@ project( Triangulation_on_sphere_2_Examples ) find_package(CGAL REQUIRED COMPONENTS Core) -if ( CGAL_FOUND ) - - create_single_source_cgal_program( "triang_on_sphere.cpp" ) - create_single_source_cgal_program( "triang_on_sphere_range.cpp" ) - create_single_source_cgal_program( "triang_on_sphere_exact.cpp" ) - create_single_source_cgal_program( "triang_on_sphere_proj.cpp" ) - create_single_source_cgal_program( "triang_on_sphere_geo.cpp" ) - -else() - - message(STATUS "This program requires the CGAL library, and will not be compiled.") - -endif() +create_single_source_cgal_program( "triang_on_sphere.cpp" ) +create_single_source_cgal_program( "triang_on_sphere_range.cpp" ) +create_single_source_cgal_program( "triang_on_sphere_exact.cpp" ) +create_single_source_cgal_program( "triang_on_sphere_proj.cpp" ) +create_single_source_cgal_program( "triang_on_sphere_geo.cpp" ) diff --git a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt index 052f1966487..9172b01d64d 100644 --- a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt +++ b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt @@ -1,7 +1,5 @@ -# Created by the script cgal_create_cmake_script -# This is the CMake script for compiling a CGAL application. - cmake_minimum_required(VERSION 3.1...3.23) + project(Voronoi_diagram_2_Tests) find_package(CGAL REQUIRED) diff --git a/Weights/examples/Weights/CMakeLists.txt b/Weights/examples/Weights/CMakeLists.txt index 1ab1057ae14..1ccd0cf4364 100644 --- a/Weights/examples/Weights/CMakeLists.txt +++ b/Weights/examples/Weights/CMakeLists.txt @@ -1,10 +1,7 @@ -# Created by the script cgal_create_cmake_script. -# This is the CMake script for compiling a CGAL application. +cmake_minimum_required(VERSION 3.1...3.23) project(Weights_Examples) -cmake_minimum_required(VERSION 3.1...3.23) - find_package(CGAL REQUIRED COMPONENTS Core) create_single_source_cgal_program("weights.cpp") diff --git a/Weights/test/Weights/CMakeLists.txt b/Weights/test/Weights/CMakeLists.txt index 81a9c9eb367..38fb9e881a3 100644 --- a/Weights/test/Weights/CMakeLists.txt +++ b/Weights/test/Weights/CMakeLists.txt @@ -1,10 +1,7 @@ -# Created by the script cgal_create_cmake_script. -# This is the CMake script for compiling a CGAL application. +cmake_minimum_required(VERSION 3.1...3.23) project(Weights_Tests) -cmake_minimum_required(VERSION 3.1...3.23) - find_package(CGAL REQUIRED COMPONENTS Core) create_single_source_cgal_program("test_uniform_weights.cpp") From 9b265fddf83a7ff4f714935aed6f2e9c36e584c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 6 Sep 2022 16:24:27 +0200 Subject: [PATCH 04/60] Uniformize REQUIRED / QUIET usage: Following this: - CGAL: always REQUIRED - CGAL component: COMPONENT / OPTIONAL_COMPONENT (never QUIET) - required 3rd party: (not QUIET) + message(NOTICE "") on NOT_FOUND - optional 3rd party: QUIET + message(STATUS "") except for Polyhedron/demo - 3rd party components: COMPONENT / OPTIONAL_COMPONENT (QUIET depending on required or optional 3rd party) --- AABB_tree/benchmark/AABB_tree/CMakeLists.txt | 10 +- .../Algebraic_kernel_d/CMakeLists.txt | 3 +- .../test/Arithmetic_kernel/CMakeLists.txt | 4 +- .../Arrangement_on_surface_2/CMakeLists.txt | 10 +- BGL/examples/BGL_OpenMesh/CMakeLists.txt | 2 +- BGL/examples/BGL_polyhedron_3/CMakeLists.txt | 17 +- BGL/examples/BGL_surface_mesh/CMakeLists.txt | 8 +- BGL/test/BGL/CMakeLists.txt | 21 +- .../test/Box_intersection_d/CMakeLists.txt | 5 +- .../examples/Classification/CMakeLists.txt | 32 +-- .../test/Classification/CMakeLists.txt | 8 +- .../test/Combinatorial_map/CMakeLists.txt | 4 + .../examples/Cone_spanners_2/CMakeLists.txt | 2 +- .../test/Cone_spanners_2/CMakeLists.txt | 28 +-- .../examples/Convex_hull_3/CMakeLists.txt | 13 +- .../create_and_use_a_cmakelist.txt | 2 +- Generator/benchmark/Generator/CMakeLists.txt | 23 +- Generator/examples/Generator/CMakeLists.txt | 47 ++-- Generator/test/Generator/CMakeLists.txt | 32 ++- .../Hyperbolic_triangulation_2/CMakeLists.txt | 2 +- Kernel_23/benchmark/Kernel_23/CMakeLists.txt | 7 +- Mesh_3/benchmark/Mesh_3/CMakeLists.txt | 33 +-- Mesh_3/test/Mesh_3/CMakeLists.txt | 235 +++++++++--------- .../Optimal_bounding_box/CMakeLists.txt | 3 +- .../Optimal_bounding_box/CMakeLists.txt | 2 +- .../test/Optimal_bounding_box/CMakeLists.txt | 2 +- .../CMakeLists.txt | 2 +- Orthtree/benchmark/Orthtree/CMakeLists.txt | 2 +- Orthtree/examples/Orthtree/CMakeLists.txt | 38 ++- Orthtree/test/Orthtree/CMakeLists.txt | 2 +- .../examples/Periodic_3_mesh_3/CMakeLists.txt | 5 +- .../test/Periodic_3_mesh_3/CMakeLists.txt | 2 +- .../CMakeLists.txt | 7 +- .../CMakeLists.txt | 7 +- .../examples/Point_set_3/CMakeLists.txt | 4 +- Point_set_3/test/Point_set_3/CMakeLists.txt | 2 +- .../Point_set_processing_3/CMakeLists.txt | 6 +- .../Point_set_processing_3/CMakeLists.txt | 11 +- .../CMakeLists.txt | 33 +-- .../Polygon_mesh_processing/CMakeLists.txt | 10 +- .../Polygon_mesh_processing/CMakeLists.txt | 154 +++++------- .../Polygon_mesh_processing/CMakeLists.txt | 79 +++--- .../CMakeLists.txt | 4 +- Polyhedron/demo/Polyhedron/CMakeLists.txt | 6 +- .../Plugins/Classification/CMakeLists.txt | 2 +- .../demo/Polyhedron/Plugins/IO/CMakeLists.txt | 2 +- .../Plugins/Point_set/CMakeLists.txt | 2 +- .../Surface_mesh_deformation/CMakeLists.txt | 3 +- Property_map/test/Property_map/CMakeLists.txt | 14 +- Ridges_3/examples/Ridges_3/CMakeLists.txt | 3 +- SMDS_3/examples/SMDS_3/CMakeLists.txt | 9 +- SMDS_3/test/SMDS_3/CMakeLists.txt | 46 ++-- .../test/STL_Extension/CMakeLists.txt | 15 +- .../CMakeLists.txt | 2 +- .../benchmark/Shape_detection/CMakeLists.txt | 20 +- .../test/Shape_detection/CMakeLists.txt | 2 +- .../examples/Skin_surface_3/CMakeLists.txt | 4 +- .../Spatial_searching/CMakeLists.txt | 12 +- .../examples/Spatial_searching/CMakeLists.txt | 2 + .../Surface_mesh_approximation/CMakeLists.txt | 2 +- .../Surface_mesh_approximation/CMakeLists.txt | 2 +- .../Surface_mesh_deformation/CMakeLists.txt | 2 +- .../Surface_mesh_deformation/CMakeLists.txt | 2 +- .../Surface_mesh_deformation/CMakeLists.txt | 2 +- .../Surface_mesh_segmentation/CMakeLists.txt | 17 +- .../Surface_mesh_shortest_path/CMakeLists.txt | 4 +- .../CMakeLists.txt | 13 +- .../CMakeLists.txt | 18 +- .../CMakeLists.txt | 15 +- .../CMakeLists.txt | 2 +- .../Surface_mesh_topology/CMakeLists.txt | 2 +- .../Tetrahedral_remeshing/CMakeLists.txt | 24 +- .../test/Tetrahedral_remeshing/CMakeLists.txt | 45 ++-- .../benchmark/Triangulation_3/CMakeLists.txt | 40 +-- .../Triangulation_on_sphere_2/CMakeLists.txt | 16 +- .../Triangulation_on_sphere_2/CMakeLists.txt | 2 +- .../Triangulation_on_sphere_2/CMakeLists.txt | 27 +- .../examples/Voronoi_diagram_2/CMakeLists.txt | 2 +- .../test/Voronoi_diagram_2/CMakeLists.txt | 2 +- Weights/examples/Weights/CMakeLists.txt | 2 +- 80 files changed, 577 insertions(+), 731 deletions(-) diff --git a/AABB_tree/benchmark/AABB_tree/CMakeLists.txt b/AABB_tree/benchmark/AABB_tree/CMakeLists.txt index 3a314302b01..b6ae8fdc0e2 100644 --- a/AABB_tree/benchmark/AABB_tree/CMakeLists.txt +++ b/AABB_tree/benchmark/AABB_tree/CMakeLists.txt @@ -6,14 +6,14 @@ project(AABB_traits_benchmark) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) -# google benchmark -find_package(benchmark) +create_single_source_cgal_program("test.cpp") +create_single_source_cgal_program("tree_construction.cpp") -if (benchmark_FOUND) +# google benchmark +find_package(benchmark QUIET) +if(benchmark_FOUND) create_single_source_cgal_program("tree_creation.cpp") target_link_libraries(tree_creation benchmark::benchmark) else() message(STATUS "NOTICE: The benchmark 'tree_creation.cpp' requires the Google benchmark library, and will not be compiled.") endif() -create_single_source_cgal_program("test.cpp") -create_single_source_cgal_program("tree_construction.cpp") diff --git a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt index fca83423fa4..c1fd8d009f6 100644 --- a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt @@ -3,8 +3,7 @@ project(Algebraic_kernel_d_Examples) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(MPFI QUIET) - +find_package(MPFI) if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP) include(${MPFI_USE_FILE}) create_single_source_cgal_program("Compare_1.cpp") diff --git a/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt b/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt index cb56ac2bc55..08d054ea54c 100644 --- a/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt +++ b/Arithmetic_kernel/test/Arithmetic_kernel/CMakeLists.txt @@ -6,7 +6,7 @@ project(Arithmetic_kernel_Tests) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(GMP QUIET) +find_package(GMP) if(GMP_FOUND) @@ -18,7 +18,7 @@ if(GMP_FOUND) include_directories(include) - find_package(MPFI) + find_package(MPFI QUIET) if(MPFI_FOUND) include(${MPFI_USE_FILE}) diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt index 8574cef2a18..82e33197dae 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CMakeLists.txt @@ -12,10 +12,10 @@ if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() -find_package(CGAL QUIET COMPONENTS Qt5 OPTIONAL_COMPONENTS Core) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core Qt5) find_package(Qt5 QUIET COMPONENTS Gui Widgets) -if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND) +if (CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_USE_FILE}) add_compile_definitions(QT_NO_KEYWORDS) include_directories( BEFORE ./ ) @@ -110,10 +110,10 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND) ${CGAL_Qt5_RESOURCE_FILES} ${CGAL_Qt5_MOC_FILES}) - target_link_libraries(arrangement_2 Qt5::Core Qt5::Gui Qt5::Widgets) - target_link_libraries(arrangement_2 CGAL::CGAL CGAL::CGAL_Qt5) + target_link_libraries(arrangement_2 PRIVATE Qt5::Core Qt5::Gui Qt5::Widgets) + target_link_libraries(arrangement_2 PRIVATE CGAL::CGAL CGAL::CGAL_Qt5) if(CGAL_Core_FOUND) - target_link_libraries(arrangement_2 CGAL::CGAL_Core) + target_link_libraries(arrangement_2 PRIVATE CGAL::CGAL_Core) endif() add_to_cached_list(CGAL_EXECUTABLE_TARGETS arrangement_2) diff --git a/BGL/examples/BGL_OpenMesh/CMakeLists.txt b/BGL/examples/BGL_OpenMesh/CMakeLists.txt index 45babdf9fed..aa4e0e208f2 100644 --- a/BGL/examples/BGL_OpenMesh/CMakeLists.txt +++ b/BGL/examples/BGL_OpenMesh/CMakeLists.txt @@ -7,7 +7,7 @@ project(BGL_OpenMesh_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(OpenMesh QUIET) +find_package(OpenMesh) if(OpenMesh_FOUND) include(UseOpenMesh) create_single_source_cgal_program("TriMesh.cpp") diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index 5a541371584..31f3a4f2d51 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -15,21 +15,20 @@ create_single_source_cgal_program("normals.cpp") create_single_source_cgal_program("range.cpp") create_single_source_cgal_program("transform_iterator.cpp") -create_single_source_cgal_program("copy_polyhedron.cpp") - -find_package( OpenMesh QUIET ) +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - target_link_libraries( copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES} ) - target_compile_definitions( copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH ) + create_single_source_cgal_program("copy_polyhedron.cpp") + target_link_libraries(copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES}) + target_compile_definitions(copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH) else() message(STATUS "NOTICE: The example 'copy_polyhedron' requires OpenMesh, and will not be compiled.") endif() -find_package( METIS ) +find_package(METIS QUIET) include(CGAL_METIS_support) -if( TARGET CGAL::METIS_support ) - create_single_source_cgal_program( "polyhedron_partition.cpp" ) - target_link_libraries( polyhedron_partition PUBLIC CGAL::METIS_support) +if(TARGET CGAL::METIS_support) + create_single_source_cgal_program("polyhedron_partition.cpp") + target_link_libraries(polyhedron_partition PUBLIC CGAL::METIS_support) else() message(STATUS "NOTICE: The example 'polyhedron_partition' requires the METIS library, and will not be compiled.") endif() diff --git a/BGL/examples/BGL_surface_mesh/CMakeLists.txt b/BGL/examples/BGL_surface_mesh/CMakeLists.txt index 1056de28413..551484979a1 100644 --- a/BGL/examples/BGL_surface_mesh/CMakeLists.txt +++ b/BGL/examples/BGL_surface_mesh/CMakeLists.txt @@ -10,11 +10,11 @@ create_single_source_cgal_program("write_inp.cpp") create_single_source_cgal_program("surface_mesh_dual.cpp") create_single_source_cgal_program("connected_components.cpp") -find_package(METIS) +find_package(METIS QUIET) include(CGAL_METIS_support) -if( TARGET CGAL::METIS_support ) - create_single_source_cgal_program( "surface_mesh_partition.cpp" ) - target_link_libraries( surface_mesh_partition PUBLIC CGAL::METIS_support ) +if(TARGET CGAL::METIS_support) + create_single_source_cgal_program("surface_mesh_partition.cpp") + target_link_libraries(surface_mesh_partition PUBLIC CGAL::METIS_support) else() message(STATUS "NOTICE: Examples that use the METIS library will not be compiled.") endif() diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index 30b6aaf28d0..3f81213dd21 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -7,18 +7,6 @@ project(BGL_Tests) # CGAL and its components find_package(CGAL REQUIRED) -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) - add_definitions(-DCGAL_USE_OPENMESH) -else() - message(STATUS "Tests that use OpenMesh will not be compiled.") -endif() -if(OpenMesh_FOUND) - create_single_source_cgal_program("graph_concept_OpenMesh.cpp") - target_link_libraries(graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) -endif() create_single_source_cgal_program("test_split.cpp") create_single_source_cgal_program("next.cpp") create_single_source_cgal_program("test_circulator.cpp") @@ -52,7 +40,11 @@ create_single_source_cgal_program("bench_read_from_stream_vs_add_face_and_add_fa create_single_source_cgal_program("graph_traits_inheritance.cpp" ) create_single_source_cgal_program("test_deprecated_io.cpp") +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + include(UseOpenMesh) + add_definitions(-DCGAL_USE_OPENMESH) + target_link_libraries(test_clear PRIVATE ${OPENMESH_LIBRARIES}) target_compile_definitions(test_clear PRIVATE -DCGAL_USE_OPENMESH) target_link_libraries(test_Euler_operations PRIVATE ${OPENMESH_LIBRARIES}) @@ -67,6 +59,11 @@ if(OpenMesh_FOUND) target_compile_definitions(test_Properties PRIVATE -DCGAL_USE_OPENMESH) target_link_libraries(test_bgl_read_write PRIVATE ${OPENMESH_LIBRARIES}) target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_OPENMESH) + + create_single_source_cgal_program("graph_concept_OpenMesh.cpp") + target_link_libraries(graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) +else() + message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.") endif() find_package(VTK QUIET COMPONENTS vtkCommonCore vtkIOCore vtkIOLegacy vtkIOXML vtkFiltersCore vtkFiltersSources) diff --git a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt index 81d14bb28d7..0a032673863 100644 --- a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt +++ b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt @@ -6,15 +6,14 @@ project(Box_intersection_d_Tests) find_package(CGAL REQUIRED) -find_package(TBB) -include(CGAL_TBB_support) - create_single_source_cgal_program("automated_test.cpp") create_single_source_cgal_program("benchmark_box_intersection.cpp") create_single_source_cgal_program("random_set_test.cpp") create_single_source_cgal_program("test_box_grid.cpp") create_single_source_cgal_program("test_Has_member_report.cpp") +find_package(TBB QUIET) +include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) target_link_libraries(test_box_grid PUBLIC CGAL::TBB_support) else() diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index 83cc5c6149d..3901b756407 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -23,29 +23,20 @@ if(NOT TARGET CGAL::Boost_iostreams_support) set(Classification_dependencies_met FALSE) endif() -find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning -include(CGAL_OpenCV_support) -if(NOT TARGET CGAL::OpenCV_support) - message( - STATUS - "NOTICE: OpenCV was not found. OpenCV random forest predicate for classification won't be available." - ) -endif() - -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() -find_package(TBB QUIET) -include(CGAL_TBB_support) - if(NOT Classification_dependencies_met) return() endif() +find_package(TBB QUIET) +include(CGAL_TBB_support) + create_single_source_cgal_program( "example_classification.cpp" ) create_single_source_cgal_program( "example_ethz_random_forest.cpp" ) create_single_source_cgal_program( "example_feature.cpp" ) @@ -55,10 +46,13 @@ create_single_source_cgal_program( "example_cluster_classification.cpp" ) create_single_source_cgal_program( "gis_tutorial_example.cpp" ) create_single_source_cgal_program( "example_deprecated_conversion.cpp" ) -if (TARGET CGAL::OpenCV_support) +find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning +include(CGAL_OpenCV_support) +if(TARGET CGAL::OpenCV_support) create_single_source_cgal_program( "example_opencv_random_forest.cpp" ) - target_link_libraries(example_opencv_random_forest - PUBLIC CGAL::OpenCV_support) + target_link_libraries(example_opencv_random_forest PUBLIC CGAL::OpenCV_support) +else() + message("NOTICE: OpenCV was not found. OpenCV random forest predicate for classification won't be available.") endif() foreach(target @@ -72,9 +66,9 @@ foreach(target gis_tutorial_example example_deprecated_conversion) if(TARGET ${target}) - target_link_libraries( - ${target} PUBLIC CGAL::Eigen3_support CGAL::Boost_iostreams_support - CGAL::Boost_serialization_support) + target_link_libraries(${target} PUBLIC CGAL::Eigen3_support + CGAL::Boost_iostreams_support + CGAL::Boost_serialization_support) if(TARGET CGAL::TBB_support) target_link_libraries(${target} PUBLIC CGAL::TBB_support) endif() diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index d785190f8cb..c2a8f3211dc 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -23,20 +23,20 @@ if(NOT TARGET CGAL::Boost_iostreams_support) set(Classification_dependencies_met FALSE) endif() -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") set(Classification_dependencies_met FALSE) endif() -find_package(TBB QUIET) -include(CGAL_TBB_support) - if(NOT Classification_dependencies_met) return() endif() +find_package(TBB QUIET) +include(CGAL_TBB_support) + create_single_source_cgal_program("test_classification_point_set.cpp") create_single_source_cgal_program("test_classification_io.cpp") diff --git a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt index 94b110c4ac7..898951705f9 100644 --- a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt +++ b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt @@ -28,5 +28,9 @@ cgal_add_compilation_test(Combinatorial_map_copy_test_index) find_package(OpenMesh QUIET) if(TARGET OpenMesh::OpenMesh) target_link_libraries(Combinatorial_map_copy_test PRIVATE OpenMesh::OpenMesh) + target_compile_definitions(Combinatorial_map_copy_test PRIVATE -DCGAL_USE_OPENMESH) target_link_libraries(Combinatorial_map_copy_test_index PRIVATE OpenMesh::OpenMesh) + target_compile_definitions(Combinatorial_map_copy_test_index PRIVATE -DCGAL_USE_OPENMESH) +else() + message(STATUS "NOTICE: Tests will not use OpenMesh.") endif() diff --git a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt index 06592fa2548..ded37dfad08 100644 --- a/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt +++ b/Cone_spanners_2/examples/Cone_spanners_2/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Cone_spanners_2_Examples) -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) find_package(LEDA QUIET) if(CGAL_Core_FOUND OR LEDA_FOUND) diff --git a/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt b/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt index ac3d47b8f6d..462edfc7819 100644 --- a/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt +++ b/Cone_spanners_2/test/Cone_spanners_2/CMakeLists.txt @@ -6,23 +6,11 @@ project(Cone_spanners_2_Tests) find_package(CGAL REQUIRED COMPONENTS Core) -if(CGAL_Core_FOUND) - include_directories(BEFORE "include") - - # create a target per cppfile - file( - GLOB cppfiles - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) - foreach(cppfile ${cppfiles}) - create_single_source_cgal_program("${cppfile}") - endforeach() - -else() - - message( - STATUS - "This program requires the CGAL and CGAL_Core libraries, and will not be compiled." - ) - -endif() +# create a target per cppfile +file( + GLOB cppfiles + RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) +foreach(cppfile ${cppfiles}) + create_single_source_cgal_program("${cppfile}") +endforeach() diff --git a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt index 55bc102f967..bfb1068c315 100644 --- a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt @@ -7,13 +7,6 @@ project(Convex_hull_3_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() create_single_source_cgal_program("quickhull_indexed_triangle_set_3.cpp") create_single_source_cgal_program("dynamic_hull_3.cpp") create_single_source_cgal_program("dynamic_hull_LCC_3.cpp") @@ -26,11 +19,13 @@ create_single_source_cgal_program("quickhull_any_dim_3.cpp") create_single_source_cgal_program("extreme_points_3_sm.cpp") create_single_source_cgal_program("extreme_indices_3.cpp") +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - create_single_source_cgal_program("quickhull_OM_3.cpp") - create_single_source_cgal_program("dynamic_hull_OM_3.cpp") + include(UseOpenMesh) + create_single_source_cgal_program("quickhull_OM_3.cpp") target_link_libraries(quickhull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) + create_single_source_cgal_program("dynamic_hull_OM_3.cpp") target_link_libraries(dynamic_hull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") diff --git a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt index 44baf0d84aa..68318652bdc 100644 --- a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt +++ b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt @@ -14,7 +14,7 @@ target_link_libraries(my_executable CGAL::CGAL) Other \cgal libraries are linked similarly. For example, with `CGAL_Core`: \code -find_package(CGAL REQUIRED COMPONENTS Core) +find_package(CGAL COMPONENTS Core) target_link_libraries(my_executable CGAL::CGAL CGAL::CGAL_Core) \endcode diff --git a/Generator/benchmark/Generator/CMakeLists.txt b/Generator/benchmark/Generator/CMakeLists.txt index 37b35229acf..7cc0116c64b 100644 --- a/Generator/benchmark/Generator/CMakeLists.txt +++ b/Generator/benchmark/Generator/CMakeLists.txt @@ -6,12 +6,17 @@ project(Generator_example) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - -find_package(Boost REQUIRED program_options) -include_directories(${Boost_PROGRAM_OPTIONS_INCLUDE_DIR}) -add_definitions("-DCGAL_USE_BOOST_PROGRAM_OPTIONS") -list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY}) - -create_single_source_cgal_program("random_grid.cpp") -create_single_source_cgal_program("random_disc_2.cpp") +find_package(Boost COMPONENTS program_options) +if(Boost_PROGRAM_OPTIONS_FOUND) + create_single_source_cgal_program("random_grid.cpp") + create_single_source_cgal_program("random_disc_2.cpp") + if(TARGET Boost::program_options) + target_link_libraries(random_grid PRIVATE Boost::program_options) + target_link_libraries(random_disc_2 PRIVATE Boost::program_options) + else() + target_link_libraries(random_grid PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) + target_link_libraries(random_disc_2 PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) + endif() +else() + message("NOTICE: The benchmarks requires Boost Program Options, and will not be compiled.") +endif() diff --git a/Generator/examples/Generator/CMakeLists.txt b/Generator/examples/Generator/CMakeLists.txt index f9239ce0dbb..0e9f4189a2e 100644 --- a/Generator/examples/Generator/CMakeLists.txt +++ b/Generator/examples/Generator/CMakeLists.txt @@ -6,23 +6,34 @@ project(Generator_Examples) find_package(CGAL REQUIRED) -# Use Eigen +create_single_source_cgal_program("ball_d.cpp") +create_single_source_cgal_program("combination_enumerator.cpp") +create_single_source_cgal_program("cube_d.cpp") +create_single_source_cgal_program("grid_d.cpp") +create_single_source_cgal_program("name_pairs.cpp") +create_single_source_cgal_program("random_convex_hull_2.cpp") +create_single_source_cgal_program("random_convex_set.cpp") +create_single_source_cgal_program("random_degenerate_point_set.cpp") +create_single_source_cgal_program("random_grid.cpp") +create_single_source_cgal_program("random_points_in_triangles_2.cpp") +create_single_source_cgal_program("random_points_in_triangles_3.cpp") +create_single_source_cgal_program("random_points_on_triangle_mesh_2.cpp") +create_single_source_cgal_program("random_points_on_triangle_mesh_3.cpp") +create_single_source_cgal_program("random_points_tetrahedron_and_triangle_3.cpp") +create_single_source_cgal_program("random_points_triangle_2.cpp") +create_single_source_cgal_program("random_polygon2.cpp") +create_single_source_cgal_program("random_polygon.cpp") +create_single_source_cgal_program("random_segments1.cpp") +create_single_source_cgal_program("random_segments2.cpp") +create_single_source_cgal_program("sphere_d.cpp") + find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) - -# create a target per cppfile -file( - GLOB cppfiles - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) -foreach(cppfile ${cppfiles}) - if(NOT (${cppfile} STREQUAL "random_points_in_tetrahedral_mesh_3.cpp") - OR NOT (${cppfile} STREQUAL "random_points_on_tetrahedral_mesh_3.cpp") - OR TARGET CGAL::Eigen3_support) - create_single_source_cgal_program("${cppfile}") - if(TARGET CGAL::Eigen3_support) - get_filename_component(target ${cppfile} NAME_WE) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) - endif() - endif() -endforeach() +if(TARGET CGAL::Eigen3_support) + create_single_source_cgal_program("random_points_in_tetrahedral_mesh_3.cpp") + target_link_libraries(random_points_in_tetrahedral_mesh_3 PRIVATE CGAL::Eigen3_support) + create_single_source_cgal_program("random_points_on_tetrahedral_mesh_3.cpp") + target_link_libraries(random_points_on_tetrahedral_mesh_3 PRIVATE CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: Some examples use Eigen, and will not be compiled.") +endif() diff --git a/Generator/test/Generator/CMakeLists.txt b/Generator/test/Generator/CMakeLists.txt index 50edd9f6e5c..5bd1befed5e 100644 --- a/Generator/test/Generator/CMakeLists.txt +++ b/Generator/test/Generator/CMakeLists.txt @@ -6,22 +6,20 @@ project(Generator_Tests) find_package(CGAL REQUIRED) -# Use Eigen +create_single_source_cgal_program("random_hull_test.cpp") +create_single_source_cgal_program("random_poly_test.cpp") +create_single_source_cgal_program("rcs_test.cpp") +create_single_source_cgal_program("test_combination_enumerator.cpp") +create_single_source_cgal_program("test_generators.cpp") +create_single_source_cgal_program("test_tetrahedron_3.cpp") +create_single_source_cgal_program("test_triangle_2.cpp") +create_single_source_cgal_program("test_triangle_3.cpp") + find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) - -# create a target per cppfile -file( - GLOB cppfiles - RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) -foreach(cppfile ${cppfiles}) - if(NOT (${cppfile} STREQUAL "generic_random_test.cpp") OR TARGET - CGAL::Eigen3_support) - create_single_source_cgal_program("${cppfile}") - if(TARGET CGAL::Eigen3_support) - get_filename_component(target ${cppfile} NAME_WE) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) - endif() - endif() -endforeach() +if(TARGET CGAL::Eigen3_support) + create_single_source_cgal_program("generic_random_test.cpp") + target_link_libraries(generic_random_test PRIVATE CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: The test 'generic_random_test' uses Eigen, and will not be compiled.") +endif() diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt index b61e95c544a..fbdf3791ccb 100644 --- a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt @@ -11,7 +11,7 @@ if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core Qt5) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core Qt5) find_package(LEDA QUIET) # Find Qt5 itself diff --git a/Kernel_23/benchmark/Kernel_23/CMakeLists.txt b/Kernel_23/benchmark/Kernel_23/CMakeLists.txt index 409561c1b6e..862b98b2152 100644 --- a/Kernel_23/benchmark/Kernel_23/CMakeLists.txt +++ b/Kernel_23/benchmark/Kernel_23/CMakeLists.txt @@ -2,11 +2,8 @@ # This is the CMake script for compiling a CGAL application. cmake_minimum_required(VERSION 3.1...3.23) -project( benchmark ) +project(Kernel_23_benchmark) -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core ) - - include_directories (BEFORE "../include") +find_package(CGAL QUIET OPTIONAL_COMPONENTS Core) create_single_source_cgal_program( "cmp_epeck_points.cpp" ) - diff --git a/Mesh_3/benchmark/Mesh_3/CMakeLists.txt b/Mesh_3/benchmark/Mesh_3/CMakeLists.txt index 26d56becb15..50b7730178e 100644 --- a/Mesh_3/benchmark/Mesh_3/CMakeLists.txt +++ b/Mesh_3/benchmark/Mesh_3/CMakeLists.txt @@ -66,31 +66,20 @@ else() endif(LINK_WITH_TBB) endif() +# Compilable benchmark +set(BENCHMARK_SOURCE_FILES "concurrency.cpp") +add_msvc_precompiled_header("StdAfx.h" "StdAfx.cpp" BENCHMARK_SOURCE_FILES) +create_single_source_cgal_program(${BENCHMARK_SOURCE_FILES}) +if(TARGET CGAL::TBB_support) + target_link_libraries(concurrency PUBLIC CGAL::TBB_support) +endif() + # 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") + if(TARGET Boost::program_options) + target_link_libraries(concurrency PRIVATE Boost::program_options) else() - message( - STATUS "Boost.ProgramOptions library: ${Boost_PROGRAM_OPTIONS_LIBRARY}") + target_link_libraries(concurrency PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) endif() - add_definitions("-DCGAL_USE_BOOST_PROGRAM_OPTIONS") - list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_LIBRARIES}) -endif() - -if(Boost_FOUND ) - # Compilable benchmark - set(BENCHMARK_SOURCE_FILES "concurrency.cpp") - add_msvc_precompiled_header("StdAfx.h" "StdAfx.cpp" BENCHMARK_SOURCE_FILES) - create_single_source_cgal_program(${BENCHMARK_SOURCE_FILES}) - if(TARGET CGAL::TBB_support) - target_link_libraries(concurrency PUBLIC CGAL::TBB_support) - endif() - -else() - message( - STATUS - "NOTICE: This program requires Boost >= 1.34.1, and will not be compiled." - ) endif() diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index 3f91ea357bd..58fb91a6bb9 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -1,147 +1,142 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. - cmake_minimum_required(VERSION 3.1...3.23) project( Mesh_3_Tests ) -find_package(CGAL QUIET COMPONENTS ImageIO) +find_package(CGAL REQUIRED COMPONENTS ImageIO) -if ( CGAL_FOUND ) +# Use Eigen +find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +include(CGAL_Eigen3_support) +if (NOT TARGET CGAL::Eigen3_support) + message("NOTICE: This project requires the Eigen library, and will not be compiled.") + return() +endif() - find_package( TBB QUIET ) - include(CGAL_TBB_support) +find_package(TBB QUIET) +include(CGAL_TBB_support) - find_package( ITT QUIET ) +find_package(ITT QUIET) - # Use Eigen - find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) - include(CGAL_Eigen3_support) - if (NOT TARGET CGAL::Eigen3_support) - message(STATUS "This project requires the Eigen library, and will not be compiled.") - return() +create_single_source_cgal_program( "test_boost_has_xxx.cpp" ) +create_single_source_cgal_program( "test_mesh_capsule_var_distance_bound.cpp" ) +create_single_source_cgal_program( "test_implicit_multi_domain_to_labeling_function_wrapper.cpp" ) +create_single_source_cgal_program( "test_criteria.cpp" ) +create_single_source_cgal_program( "test_domain_with_polyline_features.cpp" ) +create_single_source_cgal_program( "test_labeled_mesh_domain_3.cpp" ) +create_single_source_cgal_program( "test_mesh_criteria_creation.cpp" ) +create_single_source_cgal_program( "test_without_detect_features.cpp" ) + +if(CGAL_ImageIO_USE_ZLIB) + create_single_source_cgal_program( "test_meshing_3D_image.cpp" ) + create_single_source_cgal_program( "test_meshing_3D_image_deprecated.cpp" ) + create_single_source_cgal_program( "test_meshing_3D_gray_image.cpp" ) + create_single_source_cgal_program( "test_meshing_3D_gray_image_deprecated.cpp" ) +else() + message(STATUS "NOTICE: The test 'test_meshing_3D_image' requires the ZLIB library, and will not be compiled.") +endif() + +create_single_source_cgal_program( "test_meshing_implicit_function.cpp" ) +create_single_source_cgal_program( "test_meshing_implicit_function_deprecated.cpp" ) +create_single_source_cgal_program( "test_meshing_polyhedral_complex.cpp" ) +create_single_source_cgal_program( "test_meshing_polyhedron.cpp" ) +create_single_source_cgal_program( "test_meshing_polylines_only.cpp" ) +create_single_source_cgal_program( "test_meshing_polyhedron_with_features.cpp" ) +create_single_source_cgal_program( "test_meshing_verbose.cpp" ) +create_single_source_cgal_program( "test_meshing_unit_tetrahedron.cpp" ) +create_single_source_cgal_program( "test_meshing_with_default_edge_size.cpp" ) +create_single_source_cgal_program( "test_meshing_determinism.cpp" ) +create_single_source_cgal_program( "test_mesh_3_issue_1554.cpp" ) +create_single_source_cgal_program( "test_mesh_polyhedral_domain_with_features_deprecated.cpp" ) +create_single_source_cgal_program( "test_meshing_with_one_step.cpp" ) +create_single_source_cgal_program( "test_mesh_cell_base_3.cpp") + +foreach(target + test_boost_has_xxx + test_mesh_capsule_var_distance_bound + test_implicit_multi_domain_to_labeling_function_wrapper + test_criteria + test_domain_with_polyline_features + test_labeled_mesh_domain_3 + test_mesh_criteria_creation + test_without_detect_features + test_meshing_3D_image + test_meshing_3D_image_deprecated + test_meshing_3D_gray_image + test_meshing_3D_gray_image_deprecated + test_meshing_implicit_function + test_meshing_implicit_function_deprecated + test_meshing_polyhedral_complex + test_meshing_polyhedron + test_meshing_polylines_only + test_meshing_polyhedron_with_features + test_meshing_verbose + test_meshing_unit_tetrahedron + test_meshing_with_default_edge_size + test_meshing_determinism + test_mesh_3_issue_1554 + test_mesh_polyhedral_domain_with_features_deprecated + test_mesh_cell_base_3 + test_meshing_with_one_step.cpp) + if(TARGET ${target}) + target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endif() +endforeach() - create_single_source_cgal_program( "test_boost_has_xxx.cpp" ) - create_single_source_cgal_program( "test_mesh_capsule_var_distance_bound.cpp" ) - create_single_source_cgal_program( "test_implicit_multi_domain_to_labeling_function_wrapper.cpp" ) - create_single_source_cgal_program( "test_criteria.cpp" ) - create_single_source_cgal_program( "test_domain_with_polyline_features.cpp" ) - create_single_source_cgal_program( "test_labeled_mesh_domain_3.cpp" ) - create_single_source_cgal_program( "test_mesh_criteria_creation.cpp" ) - create_single_source_cgal_program( "test_without_detect_features.cpp" ) - if(CGAL_ImageIO_USE_ZLIB) - create_single_source_cgal_program( "test_meshing_3D_image.cpp" ) - create_single_source_cgal_program( "test_meshing_3D_image_deprecated.cpp" ) - create_single_source_cgal_program( "test_meshing_3D_gray_image.cpp" ) - create_single_source_cgal_program( "test_meshing_3D_gray_image_deprecated.cpp" ) - else() - message(STATUS "test_meshing_3D_image requires the ZLIB library, and will not be compiled.") - endif() - create_single_source_cgal_program( "test_meshing_implicit_function.cpp" ) - create_single_source_cgal_program( "test_meshing_implicit_function_deprecated.cpp" ) - create_single_source_cgal_program( "test_meshing_polyhedral_complex.cpp" ) - create_single_source_cgal_program( "test_meshing_polyhedron.cpp" ) - create_single_source_cgal_program( "test_meshing_polylines_only.cpp" ) - create_single_source_cgal_program( "test_meshing_polyhedron_with_features.cpp" ) - create_single_source_cgal_program( "test_meshing_verbose.cpp" ) - create_single_source_cgal_program( "test_meshing_unit_tetrahedron.cpp" ) - create_single_source_cgal_program( "test_meshing_with_default_edge_size.cpp" ) - create_single_source_cgal_program( "test_meshing_determinism.cpp" ) - create_single_source_cgal_program( "test_mesh_3_issue_1554.cpp" ) - create_single_source_cgal_program( "test_mesh_polyhedral_domain_with_features_deprecated.cpp" ) - create_single_source_cgal_program( "test_meshing_with_one_step.cpp" ) - create_single_source_cgal_program( "test_mesh_cell_base_3.cpp") - +if(TARGET CGAL::TBB_support) foreach(target - test_boost_has_xxx - test_mesh_capsule_var_distance_bound - test_implicit_multi_domain_to_labeling_function_wrapper - test_criteria - test_domain_with_polyline_features - test_labeled_mesh_domain_3 - test_mesh_criteria_creation - test_without_detect_features - test_meshing_3D_image - test_meshing_3D_image_deprecated - test_meshing_3D_gray_image - test_meshing_3D_gray_image_deprecated - test_meshing_implicit_function - test_meshing_implicit_function_deprecated - test_meshing_polyhedral_complex - test_meshing_polyhedron - test_meshing_polylines_only - test_meshing_polyhedron_with_features test_meshing_verbose + test_meshing_polyhedron_with_features + test_meshing_utilities.h + test_meshing_implicit_function + test_meshing_3D_image + test_meshing_3D_gray_image test_meshing_unit_tetrahedron - test_meshing_with_default_edge_size - test_meshing_determinism + test_meshing_polyhedron + test_meshing_polyhedral_complex + test_mesh_capsule_var_distance_bound test_mesh_3_issue_1554 test_mesh_polyhedral_domain_with_features_deprecated test_mesh_cell_base_3 - test_meshing_with_one_step.cpp) + ) if(TARGET ${target}) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + target_link_libraries(${target} PUBLIC CGAL::TBB_support) endif() endforeach() - if(TARGET CGAL::TBB_support) - foreach(target - test_meshing_verbose - test_meshing_polyhedron_with_features - test_meshing_utilities.h - test_meshing_implicit_function - test_meshing_3D_image - test_meshing_3D_gray_image - test_meshing_unit_tetrahedron - test_meshing_polyhedron - test_meshing_polyhedral_complex - test_mesh_capsule_var_distance_bound - test_mesh_3_issue_1554 - test_mesh_polyhedral_domain_with_features_deprecated - test_mesh_cell_base_3 - ) - if(TARGET ${target}) - target_link_libraries(${target} PUBLIC CGAL::TBB_support) - endif() - endforeach() - - if(BUILD_TESTING) + if(BUILD_TESTING) + set_property(TEST + execution___of__test_meshing_verbose + execution___of__test_meshing_polyhedron_with_features + execution___of__test_meshing_implicit_function + execution___of__test_meshing_unit_tetrahedron + execution___of__test_meshing_polyhedron + execution___of__test_meshing_polyhedral_complex + execution___of__test_mesh_capsule_var_distance_bound + execution___of__test_mesh_3_issue_1554 + execution___of__test_mesh_polyhedral_domain_with_features_deprecated + execution___of__test_mesh_cell_base_3 + PROPERTY RUN_SERIAL 1) + if(TARGET test_meshing_3D_image) set_property(TEST - execution___of__test_meshing_verbose - execution___of__test_meshing_polyhedron_with_features - execution___of__test_meshing_implicit_function - execution___of__test_meshing_unit_tetrahedron - execution___of__test_meshing_polyhedron - execution___of__test_meshing_polyhedral_complex - execution___of__test_mesh_capsule_var_distance_bound - execution___of__test_mesh_3_issue_1554 - execution___of__test_mesh_polyhedral_domain_with_features_deprecated - execution___of__test_mesh_cell_base_3 + execution___of__test_meshing_3D_image + execution___of__test_meshing_3D_gray_image PROPERTY RUN_SERIAL 1) - if(TARGET test_meshing_3D_image) - set_property(TEST - execution___of__test_meshing_3D_image - execution___of__test_meshing_3D_gray_image - PROPERTY RUN_SERIAL 1) - endif() endif() endif() - if(TARGET ITT::ITT) - target_link_libraries(test_meshing_polyhedron_with_features PRIVATE ITT::ITT) - target_compile_definitions(test_meshing_polyhedron_with_features PRIVATE CGAL_MESH_3_USE_INTEL_ITT) - target_link_libraries(test_meshing_verbose PRIVATE ITT::ITT) - target_compile_definitions(test_meshing_verbose PRIVATE CGAL_MESH_3_USE_INTEL_ITT) - endif() - - if(BUILD_TESTING) - set_tests_properties( - execution___of__test_meshing_polyhedron_with_features - execution___of__test_meshing_verbose - PROPERTIES RESOURCE_LOCK Mesh_3_Tests_IO) - endif() -else() - - message(STATUS "This program requires the CGAL library, and will not be compiled.") - +endif() + +if(TARGET ITT::ITT) + target_link_libraries(test_meshing_polyhedron_with_features PRIVATE ITT::ITT) + target_compile_definitions(test_meshing_polyhedron_with_features PRIVATE CGAL_MESH_3_USE_INTEL_ITT) + target_link_libraries(test_meshing_verbose PRIVATE ITT::ITT) + target_compile_definitions(test_meshing_verbose PRIVATE CGAL_MESH_3_USE_INTEL_ITT) +endif() + +if(BUILD_TESTING) + set_tests_properties( + execution___of__test_meshing_polyhedron_with_features + execution___of__test_meshing_verbose + PROPERTIES RESOURCE_LOCK Mesh_3_Tests_IO) endif() diff --git a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt index 8ad70c5f829..31b92ab56e6 100644 --- a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt @@ -7,8 +7,7 @@ project(Optimal_bounding_box_Benchmark) # CGAL and its components find_package(CGAL REQUIRED) - -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt index e35a681812b..97f9a323685 100644 --- a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt @@ -6,7 +6,7 @@ project(Optimal_bounding_box_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt index bd6f6a443b3..db5e5b0a874 100644 --- a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt @@ -6,7 +6,7 @@ project(Optimal_bounding_box_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt b/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt index 81e68f53bd3..96eb570c9c9 100644 --- a/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt +++ b/Optimal_transportation_reconstruction_2/demo/Optimal_transportation_reconstruction_2/CMakeLists.txt @@ -77,7 +77,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) target_include_directories(Otr2_demo PRIVATE ${CIMG_INCLUDE_DIR}) # Is pthread around? If yes, we need to link against it set(CMAKE_THREAD_PREFER_PTHREAD TRUE) - find_package(Threads) + find_package(Threads QUIET) if(CMAKE_USE_PTHREADS_INIT) target_link_libraries(Otr2_demo PRIVATE ${CMAKE_THREAD_LIBS_INIT}) endif() diff --git a/Orthtree/benchmark/Orthtree/CMakeLists.txt b/Orthtree/benchmark/Orthtree/CMakeLists.txt index 06cea796719..24274ae62b8 100644 --- a/Orthtree/benchmark/Orthtree/CMakeLists.txt +++ b/Orthtree/benchmark/Orthtree/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Orthtree_benchmarks) -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) create_single_source_cgal_program("construction.cpp") create_single_source_cgal_program("nearest_neighbor.cpp") diff --git a/Orthtree/examples/Orthtree/CMakeLists.txt b/Orthtree/examples/Orthtree/CMakeLists.txt index 09026783dab..b4e92f36ee9 100644 --- a/Orthtree/examples/Orthtree/CMakeLists.txt +++ b/Orthtree/examples/Orthtree/CMakeLists.txt @@ -4,27 +4,21 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Orthtree_Examples) -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core) -if (CGAL_FOUND) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) - create_single_source_cgal_program("octree_build_from_point_set.cpp") - create_single_source_cgal_program("octree_build_from_point_vector.cpp") - create_single_source_cgal_program("octree_build_with_custom_split.cpp") - create_single_source_cgal_program("octree_find_nearest_neighbor.cpp") - create_single_source_cgal_program("octree_traversal_custom.cpp") - create_single_source_cgal_program("octree_traversal_manual.cpp") - create_single_source_cgal_program("octree_traversal_preorder.cpp") - create_single_source_cgal_program("octree_grade.cpp") - create_single_source_cgal_program("quadtree_build_from_point_vector.cpp") +create_single_source_cgal_program("octree_build_from_point_set.cpp") +create_single_source_cgal_program("octree_build_from_point_vector.cpp") +create_single_source_cgal_program("octree_build_with_custom_split.cpp") +create_single_source_cgal_program("octree_find_nearest_neighbor.cpp") +create_single_source_cgal_program("octree_traversal_custom.cpp") +create_single_source_cgal_program("octree_traversal_manual.cpp") +create_single_source_cgal_program("octree_traversal_preorder.cpp") +create_single_source_cgal_program("octree_grade.cpp") +create_single_source_cgal_program("quadtree_build_from_point_vector.cpp") - find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater) - include(CGAL_Eigen_support) - if (TARGET CGAL::Eigen_support) - create_single_source_cgal_program("orthtree_build.cpp") - target_link_libraries(orthtree_build PUBLIC CGAL::Eigen_support) - endif() - -else () - message(WARNING - "This program requires the CGAL library, and will not be compiled.") -endif () +find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) +include(CGAL_Eigen_support) +if (TARGET CGAL::Eigen_support) + create_single_source_cgal_program("orthtree_build.cpp") + target_link_libraries(orthtree_build PUBLIC CGAL::Eigen_support) +endif() diff --git a/Orthtree/test/Orthtree/CMakeLists.txt b/Orthtree/test/Orthtree/CMakeLists.txt index 6ffe9220aaf..6776af02157 100644 --- a/Orthtree/test/Orthtree/CMakeLists.txt +++ b/Orthtree/test/Orthtree/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Orthtree_Tests) -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) create_single_source_cgal_program("test_octree_equality.cpp") create_single_source_cgal_program("test_octree_refine.cpp") diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt index 05c83888820..70027d80b08 100644 --- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt @@ -5,11 +5,10 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Periodic_3_mesh_3_Examples) # CGAL and its components -find_package(CGAL REQUIRED COMPONENTS ImageIO) - +find_package(CGAL REQUIRED) # Use Eigen -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt index 22faeaf1c29..b962e56be41 100644 --- a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt @@ -7,7 +7,7 @@ project(Periodic_3_mesh_3_Tests) find_package(CGAL REQUIRED COMPONENTS ImageIO) # Use Eigen -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt b/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt index 1a7e63715ec..a4ee8805749 100644 --- a/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt +++ b/Periodic_4_hyperbolic_triangulation_2/examples/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt @@ -1,11 +1,10 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Periodic_4_hyperbolic_triangulation_2_Examples) -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) + find_package(LEDA QUIET) - -if((CGAL_Core_FOUND OR LEDA_FOUND)) - +if(CGAL_Core_FOUND OR LEDA_FOUND) create_single_source_cgal_program("p4ht2_example_insertion.cpp") else() message("NOTICE: This program requires the CGAL library, and will not be compiled.") diff --git a/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt b/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt index 812dc8b307d..ef5923f844c 100644 --- a/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt +++ b/Periodic_4_hyperbolic_triangulation_2/test/Periodic_4_hyperbolic_triangulation_2/CMakeLists.txt @@ -1,11 +1,10 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Periodic_4_hyperbolic_triangulation_2_Tests) -find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core) +find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) + find_package(LEDA QUIET) - -if((CGAL_Core_FOUND OR LEDA_FOUND)) - +if(CGAL_Core_FOUND OR LEDA_FOUND) create_single_source_cgal_program("test_p4ht2_construct_point_2.cpp") create_single_source_cgal_program("test_p4ht2_exact_complex_numbers.cpp") create_single_source_cgal_program("test_p4ht2_intersections.cpp") diff --git a/Point_set_3/examples/Point_set_3/CMakeLists.txt b/Point_set_3/examples/Point_set_3/CMakeLists.txt index 1ba5c604bab..1699f75d099 100644 --- a/Point_set_3/examples/Point_set_3/CMakeLists.txt +++ b/Point_set_3/examples/Point_set_3/CMakeLists.txt @@ -16,9 +16,9 @@ set(needed_cxx_features cxx_rvalue_references cxx_variadic_templates) create_single_source_cgal_program("point_set_read_ply.cpp" CXX_FEATURES ${needed_cxx_features}) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) -if(EIGEN3_FOUND) +if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("point_set_algo.cpp") target_link_libraries(point_set_algo PUBLIC CGAL::Eigen3_support) else() diff --git a/Point_set_3/test/Point_set_3/CMakeLists.txt b/Point_set_3/test/Point_set_3/CMakeLists.txt index 970ffd456f5..4daea00a56b 100644 --- a/Point_set_3/test/Point_set_3/CMakeLists.txt +++ b/Point_set_3/test/Point_set_3/CMakeLists.txt @@ -14,7 +14,7 @@ create_single_source_cgal_program("test_deprecated_io_ps.cpp") #Use LAS #disable if MSVC 2017 if(NOT MSVC_VERSION OR (MSVC_VERSION GREATER_EQUAL 1919 AND MSVC_VERSION LESS 1910)) - find_package(LASLIB) + find_package(LASLIB QUIET) include(CGAL_LASLIB_support) if (TARGET CGAL::LASLIB_support) target_link_libraries(test_deprecated_io_ps PUBLIC CGAL::LASLIB_support) 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 39655c8b217..ac5e71b1aa1 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 @@ -6,8 +6,6 @@ project(Point_set_processing_3_Examples) # Find CGAL find_package(CGAL REQUIRED) -find_package(Boost QUIET) - # VisualC++ optimization for applications dealing with large data if(MSVC) # Quit warning in the lasreader @@ -56,7 +54,7 @@ foreach( target_link_libraries(${target} PRIVATE ${CGAL_libs}) endforeach() -find_package(LASLIB) +find_package(LASLIB QUIET) include(CGAL_LASLIB_support) if(TARGET CGAL::LASLIB_support) create_single_source_cgal_program("read_las_example.cpp") @@ -66,7 +64,7 @@ else() endif() # Use Eigen -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) set(CGAL_libs ${CGAL_libs} CGAL::Eigen3_support) diff --git a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt index b96bd07f0d9..8766b4c40ca 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt @@ -19,9 +19,6 @@ if (MSVC) message( STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'" ) endif() -find_package( TBB QUIET ) -include(CGAL_TBB_support) - # Executables that do *not* require Eigen create_single_source_cgal_program( "read_test.cpp" ) create_single_source_cgal_program( "test_read_write_point_set.cpp" ) @@ -37,7 +34,7 @@ create_single_source_cgal_program( "structuring_test.cpp" ) #Use LAS #disable if MSVC 2017 if(NOT MSVC_VERSION OR (MSVC_VERSION GREATER_EQUAL 1919 AND MSVC_VERSION LESS 1910)) - find_package(LASLIB) + find_package(LASLIB QUIET) include(CGAL_LASLIB_support) if (TARGET CGAL::LASLIB_support) target_link_libraries(test_read_write_point_set PUBLIC ${CGAL_libs} CGAL::LASLIB_support) @@ -50,9 +47,9 @@ else() endif() # Use Eigen -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) -if (EIGEN3_FOUND) +if(TARGET CGAL::Eigen3_support) # Executables that require Eigen create_single_source_cgal_program( "normal_estimation_test.cpp" ) target_link_libraries(normal_estimation_test PUBLIC CGAL::Eigen3_support) @@ -76,6 +73,8 @@ else() message(STATUS "NOTICE: Some tests require Eigen 3.1 (or greater), and will not be compiled.") endif() +find_package(TBB QUIET) +include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) foreach( target diff --git a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt index 978908627f2..347a37eeab9 100644 --- a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt +++ b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -17,21 +17,22 @@ if(MSVC) message(STATUS "USING RELEASE CXXFLAGS = '${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}'") message(STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'") endif() - # Temporary debugging stuff - find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) - include(CGAL_Eigen3_support) - if(TARGET CGAL::Eigen3_support) - # Executables that require Eigen 3.1 - create_single_source_cgal_program("poisson_reconstruction_test.cpp") - target_link_libraries(poisson_reconstruction_test PUBLIC CGAL::Eigen3_support) - find_package(TBB) - include(CGAL_TBB_support) - if (TBB_FOUND) - create_single_source_cgal_program( "poisson_and_parallel_mesh_3.cpp" ) - target_link_libraries(poisson_and_parallel_mesh_3 PUBLIC CGAL::Eigen3_support CGAL::TBB_support) - else() - message(STATUS "NOTICE: test with parallel Mesh_3 needs TBB and will not be compiled.") - endif() + +find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +include(CGAL_Eigen3_support) +if(TARGET CGAL::Eigen3_support) + # Executables that require Eigen 3.1 + create_single_source_cgal_program("poisson_reconstruction_test.cpp") + target_link_libraries(poisson_reconstruction_test PUBLIC CGAL::Eigen3_support) + + find_package(TBB QUIET) + include(CGAL_TBB_support) + if (TBB_FOUND) + create_single_source_cgal_program( "poisson_and_parallel_mesh_3.cpp" ) + target_link_libraries(poisson_and_parallel_mesh_3 PUBLIC CGAL::Eigen3_support CGAL::TBB_support) else() - message(STATUS "NOTICE: Some of the executables in this directory need Eigen 3.1 (or greater) and will not be compiled.") + message(STATUS "NOTICE: The test 'poisson_and_parallel_mesh_3' requires TBB, and will not be compiled.") + endif() +else() + message("NOTICE: Tests in this directory require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt index 22a07946a15..fd77f8a046d 100644 --- a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt @@ -33,13 +33,11 @@ if (FAST_ENVELOPE_BUILD_DIR) target_link_libraries( fastE PUBLIC FastEnvelope IndirectPredicates geogram) else() - message(STATUS "Cmake variable FAST_ENVELOPE_BUILD_DIR is not defined fastE will not be built") + message(STATUS "CMake variable FAST_ENVELOPE_BUILD_DIR is not defined; benchmark 'fastE' will not be built") endif() -create_single_source_cgal_program( "fast.cpp" ) +create_single_source_cgal_program("fast.cpp") + create_single_source_cgal_program("polygon_mesh_slicer.cpp") +target_link_libraries(polygon_mesh_slicer PUBLIC CGAL::Eigen3_support) - -if(TARGET CGAL::Eigen3_support) - target_link_libraries(polygon_mesh_slicer PUBLIC CGAL::Eigen3_support) -endif() diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt index 11be7ccef68..192e7d29b74 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt @@ -7,38 +7,52 @@ project(Polygon_mesh_processing_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# 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() - -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() - -# include for local directory - -# include for local package -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) -include(CGAL_Eigen3_support) - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - +create_single_source_cgal_program("extrude.cpp" ) +create_single_source_cgal_program("polyhedral_envelope.cpp" ) +create_single_source_cgal_program("polyhedral_envelope_of_triangle_soup.cpp" ) +create_single_source_cgal_program("polyhedral_envelope_mesh_containment.cpp" ) +create_single_source_cgal_program("self_intersections_example.cpp" ) +create_single_source_cgal_program("stitch_borders_example.cpp" ) +create_single_source_cgal_program("compute_normals_example_Polyhedron.cpp" CXX_FEATURES cxx_range_for ) +create_single_source_cgal_program("compute_normals_example.cpp" CXX_FEATURES cxx_range_for cxx_auto_type ) +create_single_source_cgal_program("point_inside_example.cpp") +create_single_source_cgal_program("triangulate_faces_example.cpp") +create_single_source_cgal_program("triangulate_faces_split_visitor_example.cpp") +create_single_source_cgal_program("connected_components_example.cpp") +create_single_source_cgal_program( "face_filtered_graph_example.cpp") +create_single_source_cgal_program("orient_polygon_soup_example.cpp") +create_single_source_cgal_program("triangulate_polyline_example.cpp") +create_single_source_cgal_program("mesh_slicer_example.cpp") +#create_single_source_cgal_program( "remove_degeneracies_example.cpp") +create_single_source_cgal_program("isotropic_remeshing_example.cpp") +create_single_source_cgal_program("isotropic_remeshing_of_patch_example.cpp") +create_single_source_cgal_program("tangential_relaxation_example.cpp") +create_single_source_cgal_program("surface_mesh_intersection.cpp") +create_single_source_cgal_program("corefinement_SM.cpp") +create_single_source_cgal_program("corefinement_consecutive_bool_op.cpp") +create_single_source_cgal_program("corefinement_difference_remeshed.cpp") +create_single_source_cgal_program("corefinement_mesh_union.cpp") +create_single_source_cgal_program("corefinement_mesh_union_progress.cpp") +create_single_source_cgal_program("corefinement_mesh_union_and_intersection.cpp") +create_single_source_cgal_program("corefinement_mesh_union_with_attributes.cpp") +create_single_source_cgal_program("corefinement_polyhedron_union.cpp") +create_single_source_cgal_program("random_perturbation_SM_example.cpp") +create_single_source_cgal_program("corefinement_LCC.cpp") +create_single_source_cgal_program("detect_features_example.cpp") +create_single_source_cgal_program("volume_connected_components.cpp") +create_single_source_cgal_program("manifoldness_repair_example.cpp") +create_single_source_cgal_program("repair_polygon_soup_example.cpp") +create_single_source_cgal_program("locate_example.cpp") +create_single_source_cgal_program("orientation_pipeline_example.cpp") +#create_single_source_cgal_program("self_snapping_example.cpp") +#create_single_source_cgal_program("snapping_example.cpp") +create_single_source_cgal_program("match_faces.cpp") +create_single_source_cgal_program("cc_compatible_orientations.cpp") create_single_source_cgal_program("hausdorff_distance_remeshing_example.cpp") -create_single_source_cgal_program( "hausdorff_bounded_error_distance_example.cpp") +create_single_source_cgal_program("hausdorff_bounded_error_distance_example.cpp") +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) +include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("hole_filling_example.cpp") target_link_libraries(hole_filling_example PUBLIC CGAL::Eigen3_support) @@ -56,65 +70,22 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(mesh_smoothing_example PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("delaunay_remeshing_example.cpp") target_link_libraries(delaunay_remeshing_example PUBLIC CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: Examples that use Eigen will not be compiled.") endif() -create_single_source_cgal_program( "extrude.cpp" ) -create_single_source_cgal_program( "polyhedral_envelope.cpp" ) -create_single_source_cgal_program( "polyhedral_envelope_of_triangle_soup.cpp" ) -create_single_source_cgal_program( "polyhedral_envelope_mesh_containment.cpp" ) -create_single_source_cgal_program( "self_intersections_example.cpp" ) -create_single_source_cgal_program( "stitch_borders_example.cpp" ) -create_single_source_cgal_program( "compute_normals_example_Polyhedron.cpp" CXX_FEATURES cxx_range_for ) -create_single_source_cgal_program( "compute_normals_example.cpp" CXX_FEATURES cxx_range_for cxx_auto_type ) -create_single_source_cgal_program( "point_inside_example.cpp") -create_single_source_cgal_program( "triangulate_faces_example.cpp") -create_single_source_cgal_program( "triangulate_faces_split_visitor_example.cpp") -create_single_source_cgal_program( "connected_components_example.cpp") -create_single_source_cgal_program( "face_filtered_graph_example.cpp") -create_single_source_cgal_program( "orient_polygon_soup_example.cpp") -create_single_source_cgal_program( "triangulate_polyline_example.cpp") -create_single_source_cgal_program( "mesh_slicer_example.cpp") -#create_single_source_cgal_program( "remove_degeneracies_example.cpp") -create_single_source_cgal_program("isotropic_remeshing_example.cpp") -create_single_source_cgal_program("isotropic_remeshing_of_patch_example.cpp") -create_single_source_cgal_program("tangential_relaxation_example.cpp") -create_single_source_cgal_program("surface_mesh_intersection.cpp") -create_single_source_cgal_program("corefinement_SM.cpp") -create_single_source_cgal_program("corefinement_consecutive_bool_op.cpp") -create_single_source_cgal_program("corefinement_difference_remeshed.cpp") -create_single_source_cgal_program("corefinement_mesh_union.cpp") -create_single_source_cgal_program("corefinement_mesh_union_progress.cpp") -create_single_source_cgal_program( - "corefinement_mesh_union_and_intersection.cpp") -create_single_source_cgal_program("corefinement_mesh_union_with_attributes.cpp") -create_single_source_cgal_program("corefinement_polyhedron_union.cpp") -create_single_source_cgal_program("random_perturbation_SM_example.cpp") -create_single_source_cgal_program("corefinement_LCC.cpp") -create_single_source_cgal_program("detect_features_example.cpp") -create_single_source_cgal_program("volume_connected_components.cpp") -create_single_source_cgal_program("manifoldness_repair_example.cpp") -create_single_source_cgal_program("repair_polygon_soup_example.cpp") -create_single_source_cgal_program("locate_example.cpp") -create_single_source_cgal_program("orientation_pipeline_example.cpp") -#create_single_source_cgal_program( "self_snapping_example.cpp") -#create_single_source_cgal_program( "snapping_example.cpp") -create_single_source_cgal_program("match_faces.cpp") -create_single_source_cgal_program("cc_compatible_orientations.cpp") - +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + include(UseOpenMesh) create_single_source_cgal_program("compute_normals_example_OM.cpp") - target_link_libraries(compute_normals_example_OM - PRIVATE ${OPENMESH_LIBRARIES}) - + target_link_libraries(compute_normals_example_OM PRIVATE ${OPENMESH_LIBRARIES}) create_single_source_cgal_program("corefinement_OM_union.cpp") - target_link_libraries(corefinement_OM_union - PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(corefinement_OM_union PRIVATE ${OPENMESH_LIBRARIES}) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("hole_filling_example_OM.cpp") - target_link_libraries(hole_filling_example_OM PRIVATE CGAL::Eigen3_support - ${OPENMESH_LIBRARIES}) + target_link_libraries(hole_filling_example_OM PRIVATE CGAL::Eigen3_support ${OPENMESH_LIBRARIES}) endif() create_single_source_cgal_program("point_inside_example_OM.cpp") @@ -123,15 +94,17 @@ if(OpenMesh_FOUND) create_single_source_cgal_program("stitch_borders_example_OM.cpp") target_link_libraries(stitch_borders_example_OM PRIVATE ${OPENMESH_LIBRARIES}) - #create_single_source_cgal_program( "remove_degeneracies_example.cpp") - #target_link_libraries( remove_degeneracies_example PRIVATE ${OPENMESH_LIBRARIES} ) + #create_single_source_cgal_program("remove_degeneracies_example.cpp") + #target_link_libraries(remove_degeneracies_example PRIVATE ${OPENMESH_LIBRARIES}) + #target_compile_definitions(remove_degeneracies_example PRIVATE -DCGAL_USE_OPENMESH) create_single_source_cgal_program("triangulate_faces_example_OM.cpp") - target_link_libraries(triangulate_faces_example_OM - PRIVATE ${OPENMESH_LIBRARIES}) -endif(OpenMesh_FOUND) + target_link_libraries(triangulate_faces_example_OM PRIVATE ${OPENMESH_LIBRARIES}) +else() + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") +endif() -find_package(METIS) +find_package(METIS QUIET) include(CGAL_METIS_support) if(TARGET CGAL::METIS_support) target_link_libraries(hausdorff_bounded_error_distance_example PUBLIC CGAL::METIS_support) @@ -139,15 +112,12 @@ else() message(STATUS "NOTICE: Examples that use the METIS library will not be compiled.") endif() -find_package(TBB) +find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) target_link_libraries(self_intersections_example PUBLIC CGAL::TBB_support) - target_link_libraries(hausdorff_distance_remeshing_example - PUBLIC CGAL::TBB_support) - target_link_libraries(hausdorff_bounded_error_distance_example - PUBLIC CGAL::TBB_support) - + target_link_libraries(hausdorff_distance_remeshing_example PUBLIC CGAL::TBB_support) + target_link_libraries(hausdorff_bounded_error_distance_example PUBLIC CGAL::TBB_support) create_single_source_cgal_program("corefinement_parallel_union_meshes.cpp") target_link_libraries(corefinement_parallel_union_meshes PUBLIC CGAL::TBB_support) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index f5a2182b27f..b7328227479 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -7,52 +7,6 @@ project(Polygon_mesh_processing_Tests) # CGAL and its components find_package(CGAL REQUIRED COMPONENTS Core) -# 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 -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) -include(CGAL_Eigen3_support) - -find_package(TBB) -include(CGAL_TBB_support) - -if(TARGET CGAL::Eigen3_support) - # Creating entries for all .cpp/.C files with "main" routine - # ########################################################## - create_single_source_cgal_program("fairing_test.cpp") - target_link_libraries(fairing_test PUBLIC CGAL::Eigen3_support) - create_single_source_cgal_program( - "triangulate_hole_Polyhedron_3_no_delaunay_test.cpp") - target_link_libraries(triangulate_hole_Polyhedron_3_no_delaunay_test - PUBLIC CGAL::Eigen3_support) - create_single_source_cgal_program("triangulate_hole_Polyhedron_3_test.cpp") - target_link_libraries(triangulate_hole_Polyhedron_3_test - PUBLIC CGAL::Eigen3_support) - create_single_source_cgal_program("test_shape_smoothing.cpp") - target_link_libraries(test_shape_smoothing PUBLIC CGAL::Eigen3_support) - create_single_source_cgal_program("delaunay_remeshing_test.cpp") - target_link_libraries(delaunay_remeshing_test PUBLIC CGAL::Eigen3_support) -endif() - -find_package(OpenMesh QUIET) -if(OpenMesh_FOUND) - include(UseOpenMesh) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() - create_single_source_cgal_program("test_pmp_triangle.cpp") create_single_source_cgal_program("test_hausdorff_bounded_error_distance.cpp") create_single_source_cgal_program("test_pmp_read_polygon_mesh.cpp") @@ -112,7 +66,24 @@ create_single_source_cgal_program("test_pmp_np_function.cpp") create_single_source_cgal_program("test_degenerate_pmp_clip_split_corefine.cpp") # create_single_source_cgal_program("test_pmp_repair_self_intersections.cpp") -find_package(METIS) +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) +include(CGAL_Eigen3_support) +if(TARGET CGAL::Eigen3_support) + create_single_source_cgal_program("fairing_test.cpp") + target_link_libraries(fairing_test PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("triangulate_hole_Polyhedron_3_no_delaunay_test.cpp") + target_link_libraries(triangulate_hole_Polyhedron_3_no_delaunay_test PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("triangulate_hole_Polyhedron_3_test.cpp") + target_link_libraries(triangulate_hole_Polyhedron_3_test PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("test_shape_smoothing.cpp") + target_link_libraries(test_shape_smoothing PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("delaunay_remeshing_test.cpp") + target_link_libraries(delaunay_remeshing_test PUBLIC CGAL::Eigen3_support) +else() + message(STATUS "NOTICE: Tests that use the Eigen library will not be compiled.") +endif() + +find_package(METIS QUIET) include(CGAL_METIS_support) if(TARGET CGAL::METIS_support) target_link_libraries(test_hausdorff_bounded_error_distance PUBLIC CGAL::METIS_support) @@ -120,6 +91,8 @@ else() message(STATUS "NOTICE: Tests are not using METIS.") endif() +find_package(TBB QUIET) +include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) target_link_libraries(test_hausdorff_bounded_error_distance PUBLIC CGAL::TBB_support) target_link_libraries(test_pmp_distance PUBLIC CGAL::TBB_support) @@ -130,7 +103,9 @@ else() message(STATUS "NOTICE: Intel TBB was not found. Tests will use sequential code.") endif() +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + include(UseOpenMesh) create_single_source_cgal_program("remeshing_test_P_SM_OM.cpp") target_link_libraries(remeshing_test_P_SM_OM PRIVATE ${OPENMESH_LIBRARIES}) else() @@ -140,11 +115,13 @@ endif() find_package(Ceres QUIET) include(CGAL_Ceres_support) if(TARGET CGAL::Ceres_support AND TARGET CGAL::Eigen3_support) - target_link_libraries( test_mesh_smoothing PUBLIC CGAL::Eigen3_support CGAL::Ceres_support) + target_link_libraries(test_mesh_smoothing PUBLIC CGAL::Eigen3_support CGAL::Ceres_support) -# target_compile_definitions( test_pmp_repair_self_intersections PRIVATE CGAL_PMP_USE_CERES_SOLVER ) -# target_link_libraries( test_pmp_repair_self_intersections PRIVATE ceres ) -endif(TARGET CGAL::Ceres_support AND TARGET CGAL::Eigen3_support) +# target_compile_definitions(test_pmp_repair_self_intersections PUBLIC CGAL_PMP_USE_CERES_SOLVER) +# target_link_libraries(test_pmp_repair_self_intersections PUBLIC CGAL::Eigen3_support CGAL::Ceres_support) +else() + message(STATUS "NOTICE: Tests are not using Ceres.") +endif() if(BUILD_TESTING) set_tests_properties( diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt index e3b460139a0..a5bd6e2c6a4 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt @@ -15,10 +15,10 @@ if(NOT TARGET CGAL::Eigen3_support) return() endif() -find_package(SCIP QUIET) +find_package(SCIP) include(CGAL_SCIP_support) if(NOT TARGET CGAL::SCIP_support) - find_package(GLPK QUIET) + find_package(GLPK) include(CGAL_GLPK_support) if(NOT TARGET CGAL::GLPK_support) message("NOTICE: This project requires either SCIP or GLPK, and will not be compiled.") diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index e560e6b44f0..a15bb212d96 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -55,7 +55,7 @@ if(Qt5_FOUND) add_definitions(-DSCENE_IMAGE_GL_BUFFERS_AVAILABLE) endif(Qt5_FOUND) -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) set_package_properties( Eigen3 PROPERTIES DESCRIPTION "A library for linear algebra." @@ -75,7 +75,7 @@ set_package_properties( # Activate concurrency? option(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY "Enable concurrency" ON) if(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY) - find_package(TBB) + find_package(TBB QUIET) include(CGAL_TBB_support) if(NOT TARGET CGAL::TBB_support) message(STATUS "NOTICE: Intel TBB was not found. Bilateral smoothing and WLOP plugins are faster if TBB is linked.") @@ -83,7 +83,7 @@ if(POLYHEDRON_DEMO_ACTIVATE_CONCURRENCY) endif() #find libssh for scene sharing -find_package(LibSSH) +find_package(LibSSH QUIET) set_package_properties( LibSSH PROPERTIES DESCRIPTION "A library implementing the SSH protocol on client and server side. " diff --git a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt index e2314c89202..86d60a56319 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Classification/CMakeLists.txt @@ -2,7 +2,7 @@ include(polyhedron_demo_macros) if(TARGET CGAL::Eigen3_support) - find_package(Boost OPTIONAL_COMPONENTS serialization iostreams) + find_package(Boost QUIET OPTIONAL_COMPONENTS serialization iostreams) include(CGAL_Boost_serialization_support) include(CGAL_Boost_iostreams_support) if(NOT TARGET CGAL::Boost_serialization_support OR NOT TARGET CGAL::Boost_iostreams_support) diff --git a/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt index 7d404d7f196..fefcc2706b4 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/IO/CMakeLists.txt @@ -1,6 +1,6 @@ include(polyhedron_demo_macros) -find_package(LASLIB) +find_package(LASLIB QUIET) set_package_properties( LASLIB PROPERTIES DESCRIPTION "A library for LIDAR I/O." diff --git a/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt index 702e4a1898e..1955755b2db 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Point_set/CMakeLists.txt @@ -1,6 +1,6 @@ include(polyhedron_demo_macros) -if(TARGET CGAL::Eigen3_support) +if(TARGET CGAL::Eigen3_support) find_package(SCIP QUIET) set_package_properties( diff --git a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt index b7f9d81ad41..876ccbd0f36 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/Plugins/Surface_mesh_deformation/CMakeLists.txt @@ -1,5 +1,6 @@ include(polyhedron_demo_macros) -if(EIGEN3_FOUND AND "${EIGEN3_VERSION}" VERSION_GREATER "3.1.90") + +if(TARGET CGAL::Eigen3_support AND "${EIGEN3_VERSION}" VERSION_GREATER "3.1.90") polyhedron_demo_plugin(edit_plugin Edit_polyhedron_plugin Deform_mesh.ui) target_link_libraries(edit_plugin PUBLIC scene_surface_mesh_item diff --git a/Property_map/test/Property_map/CMakeLists.txt b/Property_map/test/Property_map/CMakeLists.txt index cc6b86f23d7..ab38886b812 100644 --- a/Property_map/test/Property_map/CMakeLists.txt +++ b/Property_map/test/Property_map/CMakeLists.txt @@ -4,19 +4,17 @@ project(Property_map_Tests) # CGAL and its components find_package(CGAL REQUIRED) -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) - add_definitions(-DCGAL_USE_OPENMESH) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() create_single_source_cgal_program("test_property_map.cpp") create_single_source_cgal_program("dynamic_property_map.cpp") create_single_source_cgal_program("dynamic_properties_test.cpp") create_single_source_cgal_program("kernel_converter_properties_test.cpp") +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + include(UseOpenMesh) + target_link_libraries(dynamic_properties_test PRIVATE ${OPENMESH_LIBRARIES}) + target_compile_definitions(dynamic_properties_test PRIVATE -DCGAL_USE_OPENMESH) +else() + message(STATUS "NOTICE: Tests will not use OpenMesh.") endif() diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index 2c8200b2bed..f310a7f98f0 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -9,8 +9,7 @@ include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) # Link with Boost.ProgramOptions (optional) - find_package(Boost QUIET COMPONENTS program_options) - + find_package(Boost COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) create_single_source_cgal_program(Compute_Ridges_Umbilics.cpp) target_link_libraries(Compute_Ridges_Umbilics PUBLIC CGAL::Eigen3_support) diff --git a/SMDS_3/examples/SMDS_3/CMakeLists.txt b/SMDS_3/examples/SMDS_3/CMakeLists.txt index 54bb8f0ecf1..a1d23ab87ab 100644 --- a/SMDS_3/examples/SMDS_3/CMakeLists.txt +++ b/SMDS_3/examples/SMDS_3/CMakeLists.txt @@ -8,10 +8,5 @@ project(SMDS_3_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Boost and its components -find_package(Boost REQUIRED) - -# Creating entries for all C++ files with "main" routine -# ########################################################## -create_single_source_cgal_program( "c3t3_example.cpp" ) -create_single_source_cgal_program( "tetrahedron_soup_to_c3t3_example.cpp" ) +create_single_source_cgal_program("c3t3_example.cpp") +create_single_source_cgal_program("tetrahedron_soup_to_c3t3_example.cpp") diff --git a/SMDS_3/test/SMDS_3/CMakeLists.txt b/SMDS_3/test/SMDS_3/CMakeLists.txt index 43cea5fc098..2baa66ee018 100644 --- a/SMDS_3/test/SMDS_3/CMakeLists.txt +++ b/SMDS_3/test/SMDS_3/CMakeLists.txt @@ -2,29 +2,33 @@ # This is the CMake script for compiling a CGAL application. cmake_minimum_required(VERSION 3.1...3.20) -project( SMDS_3_Tests ) +project(SMDS_3_Tests) find_package(CGAL REQUIRED) -# Use Eigen -find_package(Eigen3 3.1.0 REQUIRED) #(requires 3.1.0 or greater) -include(CGAL_Eigen3_support) - -create_single_source_cgal_program( "test_c3t3.cpp" ) -create_single_source_cgal_program( "test_c3t3_io.cpp" ) -create_single_source_cgal_program( "test_c3t3_with_features.cpp" ) -create_single_source_cgal_program( "test_c3t3_into_facegraph.cpp" ) -create_single_source_cgal_program( "test_c3t3_extract_subdomains_boundaries.cpp" ) -create_single_source_cgal_program( "test_c3t3_io_MEDIT.cpp" ) create_single_source_cgal_program( "test_simplicial_cb_vb.cpp") -foreach(target - test_c3t3 - test_c3t3_io - test_c3t3_with_features - test_c3t3_into_facegraph - test_c3t3_extract_subdomains_boundaries) - if(TARGET ${target}) - target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) - endif() -endforeach() +find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +include(CGAL_Eigen3_support) +if(TARGET CGAL::Eigen3_support) + create_single_source_cgal_program( "test_c3t3.cpp" ) + create_single_source_cgal_program( "test_c3t3_io.cpp" ) + create_single_source_cgal_program( "test_c3t3_with_features.cpp" ) + create_single_source_cgal_program( "test_c3t3_into_facegraph.cpp" ) + create_single_source_cgal_program( "test_c3t3_extract_subdomains_boundaries.cpp" ) + create_single_source_cgal_program( "test_c3t3_io_MEDIT.cpp" ) + + foreach(target + test_c3t3 + test_c3t3_io + test_c3t3_with_features + test_c3t3_into_facegraph + test_c3t3_extract_subdomains_boundaries + test_c3t3_io_MEDIT) + if(TARGET ${target}) + target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) + endif() + endforeach() +else() + message(STATUS "NOTICE: Some tests require Eigen 3.1 (or greater), and will not be compiled.") +endif() diff --git a/STL_Extension/test/STL_Extension/CMakeLists.txt b/STL_Extension/test/STL_Extension/CMakeLists.txt index 65a100afa6d..a295d487ca3 100644 --- a/STL_Extension/test/STL_Extension/CMakeLists.txt +++ b/STL_Extension/test/STL_Extension/CMakeLists.txt @@ -5,16 +5,11 @@ cmake_minimum_required(VERSION 3.1...3.23) project(STL_Extension_Tests) find_package(CGAL REQUIRED) -find_package( TBB QUIET ) + +find_package(TBB QUIET) include(CGAL_TBB_support) - -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) - add_definitions(-DCGAL_USE_OPENMESH) -else() - message(STATUS "Tests that use OpenMesh will not be compiled.") +if(NOT TARGET CGAL::TBB_support) + message(STATUS "NOTICE: Tests are not using TBB.") endif() create_single_source_cgal_program("test_Boolean_tag.cpp") @@ -59,7 +54,9 @@ if(TARGET CGAL::TBB_support) target_link_libraries(test_for_each PUBLIC CGAL::TBB_support) endif() +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + include(UseOpenMesh) create_single_source_cgal_program("test_hash_OpenMesh.cpp") target_link_libraries(test_hash_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) else() diff --git a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt index ba2c593d83e..8aec35e8e15 100644 --- a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt +++ b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt @@ -7,7 +7,7 @@ find_package(CGAL REQUIRED) option(ACTIVATE_CONCURRENCY "Enable concurrency" ON) if(ACTIVATE_CONCURRENCY) - find_package(TBB) + find_package(TBB QUIET) include(CGAL_TBB_support) if(NOT TARGET CGAL::TBB_support) message(STATUS "NOTICE: Intel TBB not found. Examples are faster if TBB is linked.") diff --git a/Shape_detection/benchmark/Shape_detection/CMakeLists.txt b/Shape_detection/benchmark/Shape_detection/CMakeLists.txt index 3baee301825..8b7bd020dd3 100644 --- a/Shape_detection/benchmark/Shape_detection/CMakeLists.txt +++ b/Shape_detection/benchmark/Shape_detection/CMakeLists.txt @@ -6,19 +6,13 @@ project(Shape_detection_Benchmarks) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) -include(CGAL_CreateSingleSourceCGALProgram) - -# Use Eigen. -find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) +find_package(Eigen3 3.1.0) # (3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) - create_single_source_cgal_program( - "benchmark_region_growing_on_point_set_2.cpp") - target_link_libraries(benchmark_region_growing_on_point_set_2 - PUBLIC CGAL::Eigen3_support) - create_single_source_cgal_program( - "benchmark_region_growing_on_point_set_3.cpp") - target_link_libraries(benchmark_region_growing_on_point_set_3 - PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("benchmark_region_growing_on_point_set_2.cpp") + target_link_libraries(benchmark_region_growing_on_point_set_2 PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("benchmark_region_growing_on_point_set_3.cpp") + target_link_libraries(benchmark_region_growing_on_point_set_3 PUBLIC CGAL::Eigen3_support) +else() + message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Shape_detection/test/Shape_detection/CMakeLists.txt b/Shape_detection/test/Shape_detection/CMakeLists.txt index 149f34e57f0..5250b7a6a4b 100644 --- a/Shape_detection/test/Shape_detection/CMakeLists.txt +++ b/Shape_detection/test/Shape_detection/CMakeLists.txt @@ -20,7 +20,7 @@ create_single_source_cgal_program("test_efficient_RANSAC_scene.cpp") find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) include(CGAL_Eigen3_support) -if(EIGEN3_FOUND) +if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("test_region_growing_basic.cpp") create_single_source_cgal_program("test_region_growing_on_cube.cpp") create_single_source_cgal_program("test_region_growing_on_point_set_2.cpp") diff --git a/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt b/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt index f053e7e5079..24e5253b5ea 100644 --- a/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt +++ b/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Skin_surface_3_Examples) -find_package(CGAL) +find_package(CGAL REQUIRED) include_directories(BEFORE include) @@ -20,7 +20,7 @@ create_single_source_cgal_program("skin_surface_subdiv_with_normals.cpp") create_single_source_cgal_program("union_of_balls_simple.cpp") create_single_source_cgal_program("union_of_balls_subdiv.cpp") -find_package(ESBTL) +find_package(ESBTL QUIET) if(ESBTL_FOUND) include_directories(${ESBTL_INCLUDE_DIR}) create_single_source_cgal_program("skin_surface_pdb_reader.cpp") diff --git a/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt b/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt index 0585028eec8..239b7f03600 100644 --- a/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt @@ -6,13 +6,15 @@ project(Spatial_searching_) find_package(CGAL REQUIRED COMPONENTS Core) -include(${CGAL_USE_FILE}) - -find_package(Eigen3 3.1.91) # (requires 3.2.0 or greater) -include(CGAL_Eigen3_support) - include_directories(BEFORE "include") +find_package(Eigen3 3.1.91) # (requires 3.1.91 or greater) +include(CGAL_Eigen3_support) +if(NOT TARGET CGAL::Eigen3_support) + message("NOTICE: These benchmarks require Eigen 3.1.91 (or greater), and will not be compiled.") + return() +endif() + # create_single_source_cgal_program("Compare_ANN_STANN_CGAL.cpp") # does not compile, missing dependency create_single_source_cgal_program("nanoflan.cpp") create_single_source_cgal_program("binary.cpp") diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index 5dc1eab0dcd..53661afd8bb 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -27,6 +27,8 @@ 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") +find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) +include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("fuzzy_range_query.cpp") target_link_libraries(fuzzy_range_query PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt index 1d5b7047fd7..7748468d634 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt @@ -8,7 +8,7 @@ project(Surface_mesh_approximation_Examples) find_package(CGAL REQUIRED) # Use Eigen (for PCA) -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt index ab1ca32384a..d1acae25bf2 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt @@ -8,7 +8,7 @@ project(Surface_mesh_approximation_Tests) find_package(CGAL REQUIRED) # Use Eigen (for PCA) -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt index 40354505e1b..d0e7ddae9bb 100644 --- a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt @@ -13,7 +13,7 @@ set_property(DIRECTORY PROPERTY CGAL_NO_TESTING TRUE) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater) +find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("deform_mesh_for_botsch08_format.cpp") diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt index 168b336edff..19989c9654d 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_deformation_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater) +find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("all_roi_assign_example.cpp") diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt index 5046d551a55..cc33b2b8f22 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_deformation_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91) #(requires 3.2.0 or greater) +find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("Cactus_deformation_session.cpp") diff --git a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt index 17af23300b8..6f8460fec27 100644 --- a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt +++ b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt @@ -7,13 +7,6 @@ project(Surface_mesh_segmentation_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() create_single_source_cgal_program("sdf_values_example.cpp") create_single_source_cgal_program("segmentation_from_sdf_values_example.cpp") create_single_source_cgal_program("segmentation_via_sdf_values_example.cpp") @@ -22,9 +15,11 @@ create_single_source_cgal_program("segmentation_from_sdf_values_SM_example.cpp") create_single_source_cgal_program("segmentation_from_sdf_values_LCC_example.cpp") create_single_source_cgal_program("extract_segmentation_into_mesh_example.cpp") +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - create_single_source_cgal_program( - "segmentation_from_sdf_values_OpenMesh_example.cpp") - target_link_libraries(segmentation_from_sdf_values_OpenMesh_example - PRIVATE ${OPENMESH_LIBRARIES}) + include(UseOpenMesh) + create_single_source_cgal_program("segmentation_from_sdf_values_OpenMesh_example.cpp") + target_link_libraries(segmentation_from_sdf_values_OpenMesh_example PRIVATE ${OPENMESH_LIBRARIES}) +else() + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() 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 index 95099585460..f086d72d46a 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt @@ -3,8 +3,6 @@ project(Surface_mesh_shortest_path_Tests) find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core) -find_package(LEDA QUIET) - include_directories(BEFORE "include") create_single_source_cgal_program("Surface_mesh_shortest_path_test_1.cpp") @@ -15,6 +13,8 @@ create_single_source_cgal_program("Surface_mesh_shortest_path_test_5.cpp") create_single_source_cgal_program("Surface_mesh_shortest_path_test_6.cpp") create_single_source_cgal_program("Surface_mesh_shortest_path_traits_test.cpp") +find_package(LEDA QUIET) + # Link with Boost.ProgramOptions (optional) find_package(Boost QUIET COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt index df746cdc92c..e082b7e942a 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -7,13 +7,6 @@ project(Surface_mesh_simplification_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() create_single_source_cgal_program("edge_collapse_envelope.cpp") create_single_source_cgal_program("edge_collapse_constrain_sharp_edges.cpp") create_single_source_cgal_program("edge_collapse_constrained_border_polyhedron.cpp") @@ -35,17 +28,19 @@ else() message(STATUS "NOTICE: Garland-Heckbert polices require the Eigen library, which has not been found; related examples will not be compiled.") endif() +find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + include(UseOpenMesh) create_single_source_cgal_program("edge_collapse_OpenMesh.cpp") target_link_libraries(edge_collapse_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() -find_package(METIS) +find_package(METIS QUIET) include(CGAL_METIS_support) -find_package(TBB) +find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support AND TARGET CGAL::METIS_support) create_single_source_cgal_program("collapse_small_edges_in_parallel.cpp") diff --git a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt index 061db68f7e1..e61824ac4f5 100644 --- a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt @@ -9,15 +9,11 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) - -if(NOT TARGET CGAL::Eigen3_support) - message(STATUS "NOTICE: Eigen 3.2 (or greater) is not found.") +if(TARGET CGAL::Eigen3_support) + create_single_source_cgal_program("solver_benchmark.cpp") + target_link_libraries(solver_benchmark PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("mcf_scale_invariance.cpp") + target_link_libraries(mcf_scale_invariance PUBLIC CGAL::Eigen3_support) +else() + message("NOTICE: This project requires Eigen 3.2.0 (or greater), and will not be compiled.") endif() - -# Creating entries for all .cpp/.C files with "main" routine -# ########################################################## - -create_single_source_cgal_program("solver_benchmark.cpp") -target_link_libraries(solver_benchmark PUBLIC CGAL::Eigen3_support) -create_single_source_cgal_program("mcf_scale_invariance.cpp") -target_link_libraries(mcf_scale_invariance PUBLIC CGAL::Eigen3_support) diff --git a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt index e809e5b742d..a2916b9e2a0 100644 --- a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt @@ -8,15 +8,6 @@ find_package(CGAL REQUIRED) find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) - -find_package(OpenMesh QUIET) - -if(OpenMesh_FOUND) - include(UseOpenMesh) -else() - message(STATUS "Examples that use OpenMesh will not be compiled.") -endif() - if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("simple_mcfskel_example.cpp") create_single_source_cgal_program("simple_mcfskel_sm_example.cpp") @@ -37,9 +28,13 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() + find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + include(UseOpenMesh) create_single_source_cgal_program("MCF_Skeleton_om_example.cpp") - target_link_libraries( MCF_Skeleton_om_example PUBLIC CGAL::Eigen3_support PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(MCF_Skeleton_om_example PUBLIC CGAL::Eigen3_support PRIVATE ${OPENMESH_LIBRARIES}) + else() + message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() else() message("NOTICE: These programs require the Eigen library (3.2 or greater), and will not be compiled.") diff --git a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt index 0c39993aed8..758f2f8bd87 100644 --- a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_skeletonization_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) +find_package(Eigen3 3.2.0 REQUIRED) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("MCF_Skeleton_test.cpp") diff --git a/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt b/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt index d0521ebfc51..1eaee1642bc 100644 --- a/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt +++ b/Surface_mesh_topology/benchmark/Surface_mesh_topology/CMakeLists.txt @@ -2,7 +2,7 @@ project(Surface_mesh_topology_Benchmarks) cmake_minimum_required(VERSION 3.1...3.23) -find_package(CGAL) +find_package(CGAL REQUIRED) # add_definitions(-DCGAL_TRACE_PATH_TESTS) # add_definitions(-DCGAL_TRACE_CMAP_TOOLS) diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt index b94703841f1..9e89831fc98 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt @@ -8,11 +8,10 @@ project(Tetrahedral_remeshing_Examples) # CGAL and its components find_package(CGAL REQUIRED) -# Use Eigen for Mesh_3 -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) -include(CGAL_Eigen3_support) -find_package(TBB QUIET) -include(CGAL_TBB_support) +create_single_source_cgal_program("tetrahedral_remeshing_example.cpp" ) +create_single_source_cgal_program("tetrahedral_remeshing_with_features.cpp") +create_single_source_cgal_program("tetrahedral_remeshing_of_one_subdomain.cpp") +create_single_source_cgal_program("tetrahedral_remeshing_from_mesh.cpp") # Concurrent Mesh_3 option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF) @@ -20,17 +19,16 @@ if(CGAL_ACTIVATE_CONCURRENT_MESH_3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_MESH_3}") add_definitions(-DCGAL_CONCURRENT_MESH_3) find_package(TBB REQUIRED) include(CGAL_TBB_support) +else() + find_package(TBB QUIET) + include(CGAL_TBB_support) endif() -# Creating entries for all C++ files with "main" routine -# ########################################################## -create_single_source_cgal_program( "tetrahedral_remeshing_example.cpp" ) -create_single_source_cgal_program( "tetrahedral_remeshing_with_features.cpp") -create_single_source_cgal_program( "tetrahedral_remeshing_of_one_subdomain.cpp") -create_single_source_cgal_program( "tetrahedral_remeshing_from_mesh.cpp") - +# Use Eigen for Mesh_3 +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) +include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) -create_single_source_cgal_program( "mesh_and_remesh_polyhedral_domain_with_features.cpp" ) + create_single_source_cgal_program( "mesh_and_remesh_polyhedral_domain_with_features.cpp" ) target_link_libraries(mesh_and_remesh_polyhedral_domain_with_features PUBLIC CGAL::Eigen3_support) if(CGAL_ACTIVATE_CONCURRENT_MESH_3 AND TARGET CGAL::TBB_support) target_link_libraries(mesh_and_remesh_polyhedral_domain_with_features PRIVATE CGAL::TBB_support) diff --git a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt index 6cebbe30e7e..a47c71cd04f 100644 --- a/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/test/Tetrahedral_remeshing/CMakeLists.txt @@ -8,40 +8,25 @@ project(Tetrahedral_remeshing_Tests) # CGAL and its components find_package(CGAL REQUIRED COMPONENTS ImageIO) -# 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() - -# Creating entries for all C++ files with "main" routine -# ########################################################## create_single_source_cgal_program("test_tetrahedral_remeshing.cpp") -create_single_source_cgal_program( - "test_tetrahedral_remeshing_with_features.cpp") -create_single_source_cgal_program( - "test_tetrahedral_remeshing_of_one_subdomain.cpp") +create_single_source_cgal_program("test_tetrahedral_remeshing_with_features.cpp") +create_single_source_cgal_program("test_tetrahedral_remeshing_of_one_subdomain.cpp") create_single_source_cgal_program("test_tetrahedral_remeshing_io.cpp") -create_single_source_cgal_program( - "test_tetrahedral_remeshing_from_mesh_file.cpp") +create_single_source_cgal_program("test_tetrahedral_remeshing_from_mesh_file.cpp") # Tests using Mesh_3 require Eigen -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) -if(NOT TARGET CGAL::Eigen3_support) - message( - STATUS "This project requires the Eigen library, and will not be compiled.") - return() -endif() +if(TARGET CGAL::Eigen3_support) + create_single_source_cgal_program("test_mesh_and_remesh_polyhedral_domain_with_features.cpp") + target_link_libraries(test_mesh_and_remesh_polyhedral_domain_with_features PUBLIC CGAL::Eigen3_support) -create_single_source_cgal_program( - "test_mesh_and_remesh_polyhedral_domain_with_features.cpp") -target_link_libraries(test_mesh_and_remesh_polyhedral_domain_with_features - PUBLIC CGAL::Eigen3_support) - -if(CGAL_ImageIO_USE_ZLIB) - create_single_source_cgal_program("test_mesh_and_remesh_image.cpp") - target_link_libraries(test_mesh_and_remesh_image PUBLIC CGAL::Eigen3_support) + if(CGAL_ImageIO_USE_ZLIB) + create_single_source_cgal_program("test_mesh_and_remesh_image.cpp") + target_link_libraries(test_mesh_and_remesh_image PUBLIC CGAL::Eigen3_support) + else() + message(STATUS "NOTICE: The test 'test_mesh_and_remesh_image' uses zlib, and will not be compiled.") + endif() +else() + message(STATUS "NOTICE: Some tests require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt b/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt index 8a207c2b79f..19fd0c0efac 100644 --- a/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/benchmark/Triangulation_3/CMakeLists.txt @@ -12,25 +12,25 @@ create_single_source_cgal_program("incident_edges.cpp") create_single_source_cgal_program("simple_2.cpp") create_single_source_cgal_program("simple.cpp") create_single_source_cgal_program("Triangulation_benchmark_3.cpp") +create_single_source_cgal_program("segment_traverser_benchmark.cpp" ) -create_single_source_cgal_program( "segment_traverser_benchmark.cpp" ) - -find_package(benchmark) - -if(TARGET benchmark::benchmark) - find_package(TBB REQUIRED) - include(CGAL_TBB_support) - - create_single_source_cgal_program("DT3_benchmark_with_TBB.cpp") - target_link_libraries(DT3_benchmark_with_TBB PRIVATE benchmark::benchmark - CGAL::TBB_support) - - add_executable(DT3_benchmark_with_TBB_CCC_approximate_size - DT3_benchmark_with_TBB.cpp) - target_compile_definitions( - DT3_benchmark_with_TBB_CCC_approximate_size - PRIVATE CGAL_CONCURRENT_COMPACT_CONTAINER_APPROXIMATE_SIZE) - target_link_libraries( - DT3_benchmark_with_TBB_CCC_approximate_size - PRIVATE CGAL::CGAL benchmark::benchmark CGAL::TBB_support) +find_package(benchmark QUIET) +if(NOT TARGET benchmark::benchmark) + message(STATUS "NOTICE: Some benchmarks require the Google benchmark library, and will not be compiled.") + return() +endif() + +find_package(TBB REQUIRED) +include(CGAL_TBB_support) +if(TARGET CGAL::TBB_support) + create_single_source_cgal_program("DT3_benchmark_with_TBB.cpp") + target_link_libraries(DT3_benchmark_with_TBB PRIVATE benchmark::benchmark CGAL::TBB_support) + + add_executable(DT3_benchmark_with_TBB_CCC_approximate_size DT3_benchmark_with_TBB.cpp) + target_compile_definitions(DT3_benchmark_with_TBB_CCC_approximate_size + PRIVATE CGAL_CONCURRENT_COMPACT_CONTAINER_APPROXIMATE_SIZE) + target_link_libraries(DT3_benchmark_with_TBB_CCC_approximate_size + PRIVATE CGAL::CGAL benchmark::benchmark CGAL::TBB_support) +else() + message(STATUS "NOTICE: Some benchmarks require the TBB library, and will not be compiled.") endif() diff --git a/Triangulation_on_sphere_2/benchmark/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/benchmark/Triangulation_on_sphere_2/CMakeLists.txt index b8c1d21bba3..0e8422aefa1 100644 --- a/Triangulation_on_sphere_2/benchmark/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/benchmark/Triangulation_on_sphere_2/CMakeLists.txt @@ -1,20 +1,12 @@ # Created by the script cgal_create_cmake_script # This is the CMake script for compiling a CGAL application. -project( Triangulation_on_sphere_2_Benchmarks ) - cmake_minimum_required(VERSION 3.1...3.23) +project( Triangulation_on_sphere_2_Benchmarks ) + find_package(CGAL REQUIRED COMPONENTS Core ) -if ( CGAL_FOUND ) - - create_single_source_cgal_program( "bench_dtos2.cpp" ) - create_single_source_cgal_program( "generate_points.cpp" ) - -else() - - message(STATUS "This program requires the CGAL library, and will not be compiled.") - -endif() +create_single_source_cgal_program( "bench_dtos2.cpp" ) +create_single_source_cgal_program( "generate_points.cpp" ) diff --git a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt index f99b2a133d0..a06979d869f 100644 --- a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt @@ -26,7 +26,7 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) # Find Qt5 itself find_package(Qt5 QUIET COMPONENTS Script OpenGL Gui Svg) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(CGAL_Qt5_FOUND AND Qt5_FOUND AND TARGET CGAL::Eigen3_support) diff --git a/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt index 36405ad2cb7..6e26394bee1 100644 --- a/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/test/Triangulation_on_sphere_2/CMakeLists.txt @@ -4,23 +4,18 @@ project( Triangulation_on_sphere_2_Tests ) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +create_single_source_cgal_program( "test_dtos.cpp" ) +create_single_source_cgal_program( "test_dtos2_remove.cpp" ) +create_single_source_cgal_program( "test_dtos_degenerate_cases.cpp" ) +create_single_source_cgal_program( "test_dtos_illegal_points.cpp" ) +create_single_source_cgal_program( "test_dtos_projection_traits.cpp" ) +create_single_source_cgal_program( "test_dtos_traits.cpp" ) + +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) - -if ( CGAL_FOUND ) - - create_single_source_cgal_program( "test_dtos.cpp" ) - create_single_source_cgal_program( "test_dtos2_remove.cpp" ) - create_single_source_cgal_program( "test_dtos_degenerate_cases.cpp" ) - create_single_source_cgal_program( "test_dtos_illegal_points.cpp" ) - create_single_source_cgal_program( "test_dtos_projection_traits.cpp" ) - create_single_source_cgal_program( "test_dtos_traits.cpp" ) - - if(TARGET CGAL::Eigen3_support) - create_single_source_cgal_program( "test_dtos_dual.cpp" ) - target_link_libraries(test_dtos_dual PUBLIC CGAL::Eigen3_support) - endif() - +if(TARGET CGAL::Eigen3_support) + create_single_source_cgal_program( "test_dtos_dual.cpp" ) + target_link_libraries(test_dtos_dual PUBLIC CGAL::Eigen3_support) else() message(STATUS "NOTICE: The Eigen library was not found. The test 'test_dtos_dual' will not be compiled.") endif() diff --git a/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt b/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt index 3408ad984cb..ea1bf322bf5 100644 --- a/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt +++ b/Voronoi_diagram_2/examples/Voronoi_diagram_2/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.1...3.23) project(Voronoi_diagram_2_Examples) -find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) +find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Qt5) # create a target per cppfile file( diff --git a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt index 9172b01d64d..3c52d3d7eca 100644 --- a/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt +++ b/Voronoi_diagram_2/test/Voronoi_diagram_2/CMakeLists.txt @@ -12,7 +12,7 @@ create_single_source_cgal_program("vda_pt.cpp") create_single_source_cgal_program("vda_rt.cpp") create_single_source_cgal_program("vda_sdg.cpp") -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("vda_tos2.cpp") diff --git a/Weights/examples/Weights/CMakeLists.txt b/Weights/examples/Weights/CMakeLists.txt index 1ccd0cf4364..bfa7a57734b 100644 --- a/Weights/examples/Weights/CMakeLists.txt +++ b/Weights/examples/Weights/CMakeLists.txt @@ -11,7 +11,7 @@ create_single_source_cgal_program("projection_traits.cpp") create_single_source_cgal_program("custom_traits.cpp") create_single_source_cgal_program("convergence.cpp") -find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) # (requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("weighted_laplacian.cpp") From e93b0b28eb6f326ed4cbe0b770ac18f75d5193d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 6 Sep 2022 16:25:47 +0200 Subject: [PATCH 05/60] Misc trivial cleaning --- .../Arrangement_on_surface_2/lexical_cast.hpp | 2 +- .../Arrangement_on_surface_2/test_configuration.h | 2 +- BGL/examples/BGL_graphcut/CMakeLists.txt | 3 +-- .../test/Generalized_map/CMakeLists.txt | 7 ++++--- .../examples/Heat_method_3/CMakeLists.txt | 3 +-- .../cmake/modules/CGALConfig_binary.cmake.in | 2 +- .../cmake/modules/CGALConfig_install.cmake.in | 2 +- Installation/cmake/modules/CGAL_Macros.cmake | 2 +- .../include/CGAL/Sqrt_extension/convert_to_bfi.h | 2 +- .../examples/Optimal_bounding_box/CMakeLists.txt | 3 +-- Point_set_3/examples/Point_set_3/CMakeLists.txt | 3 +-- .../test/Point_set_processing_3/CMakeLists.txt | 3 +-- .../test/Polygon_mesh_processing/CMakeLists.txt | 3 +-- .../CMakeLists.txt | 9 +++------ Polyhedron/demo/Polyhedron/CMakeLists.txt | 14 ++++++-------- .../Set_movable_separability_2/CMakeLists.txt | 6 ++---- .../benchmark/Shape_regularization/CMakeLists.txt | 7 +------ .../Surface_mesh_parameterization/CMakeLists.txt | 3 +-- .../Surface_mesh_parameterization/CMakeLists.txt | 3 +-- .../demo/Triangulation_3/CMakeLists.txt | 6 ++---- 20 files changed, 32 insertions(+), 53 deletions(-) diff --git a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/lexical_cast.hpp b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/lexical_cast.hpp index 79d885905ef..d16d9e378a8 100644 --- a/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/lexical_cast.hpp +++ b/Arrangement_on_surface_2/benchmark/Arrangement_on_surface_2/lexical_cast.hpp @@ -1,7 +1,7 @@ #ifndef LEXICAL_CAST_HPP #define LEXICAL_CAST_HPP -/*! This files provides lexical casts from std::string to any one of the number +/*! This file provides lexical casts from std::string to any one of the number * types we intend to use in the benchmark, and a lexical cast does not exist. * It is inspired by boost::lexical_cast */ diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_configuration.h b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_configuration.h index dfd25a01536..2a4baa7609b 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_configuration.h +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_configuration.h @@ -1,7 +1,7 @@ #ifndef CGAL_TEST_CONFIGURATION_H #define CGAL_TEST_CONFIGURATION_H -/*! This files contains define statements, include statement, and typedef +/*! This file contains define statements, include statement, and typedef * of the number types, kernel, and traits used. * */ diff --git a/BGL/examples/BGL_graphcut/CMakeLists.txt b/BGL/examples/BGL_graphcut/CMakeLists.txt index dc8be80ed63..af873296cab 100644 --- a/BGL/examples/BGL_graphcut/CMakeLists.txt +++ b/BGL/examples/BGL_graphcut/CMakeLists.txt @@ -9,5 +9,4 @@ project(BGL_graphcut_Examples) find_package(CGAL REQUIRED) create_single_source_cgal_program("alpha_expansion_example.cpp") -create_single_source_cgal_program( - "face_selection_borders_regularization_example.cpp") +create_single_source_cgal_program("face_selection_borders_regularization_example.cpp") diff --git a/Generalized_map/test/Generalized_map/CMakeLists.txt b/Generalized_map/test/Generalized_map/CMakeLists.txt index 4cebd95827c..642815d6c08 100644 --- a/Generalized_map/test/Generalized_map/CMakeLists.txt +++ b/Generalized_map/test/Generalized_map/CMakeLists.txt @@ -7,9 +7,10 @@ project(Generalized_map_Tests) # CGAL and its components find_package(CGAL REQUIRED) - -set(hfiles Generalized_map_2_test.h Generalized_map_3_test.h - Generalized_map_4_test.h GMap_test_insertions.h) +set(hfiles Generalized_map_2_test.h + Generalized_map_3_test.h + Generalized_map_4_test.h + GMap_test_insertions.h) create_single_source_cgal_program("Generalized_map_test.cpp" ${hfiles}) diff --git a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt index fc6be4f65ec..a2ca12fbc65 100644 --- a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt @@ -24,5 +24,4 @@ target_link_libraries(heat_method_polyhedron PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh.cpp") target_link_libraries(heat_method_surface_mesh PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("heat_method_surface_mesh_direct.cpp") -target_link_libraries(heat_method_surface_mesh_direct - PUBLIC CGAL::Eigen3_support) +target_link_libraries(heat_method_surface_mesh_direct PUBLIC CGAL::Eigen3_support) diff --git a/Installation/cmake/modules/CGALConfig_binary.cmake.in b/Installation/cmake/modules/CGALConfig_binary.cmake.in index 769d18ab80d..9782812a2e3 100644 --- a/Installation/cmake/modules/CGALConfig_binary.cmake.in +++ b/Installation/cmake/modules/CGALConfig_binary.cmake.in @@ -1,5 +1,5 @@ # -# This files contains definitions needed to use CGAL in a program. +# This file contains definitions needed to use CGAL in a program. # DO NOT EDIT THIS. The definitons have been generated by CMake at configuration time. # This file is loaded by cmake via the command "find_package(CGAL)" # diff --git a/Installation/cmake/modules/CGALConfig_install.cmake.in b/Installation/cmake/modules/CGALConfig_install.cmake.in index ade24452f95..4d840a8a68c 100644 --- a/Installation/cmake/modules/CGALConfig_install.cmake.in +++ b/Installation/cmake/modules/CGALConfig_install.cmake.in @@ -1,5 +1,5 @@ # -# This files contains definitions needed to use CGAL in a program. +# This file contains definitions needed to use CGAL in a program. # DO NOT EDIT THIS. The definitons have been generated by CMake at configuration time. # This file is loaded by cmake via the command "find_package(CGAL)" # diff --git a/Installation/cmake/modules/CGAL_Macros.cmake b/Installation/cmake/modules/CGAL_Macros.cmake index 6cc009ec9aa..8cc470d2673 100644 --- a/Installation/cmake/modules/CGAL_Macros.cmake +++ b/Installation/cmake/modules/CGAL_Macros.cmake @@ -360,7 +360,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) VERSION "${CGAL_MAJOR_VERSION}.${CGAL_MINOR_VERSION}.${CGAL_BUGFIX_VERSION}" COMPATIBILITY SameMajorVersion) - # There is also a version of CGALConfig.cmake that is prepared in case CGAL in installed in CMAKE_INSTALL_PREFIX. + # There is also a version of CGALConfig.cmake that is prepared in case CGAL is installed in CMAKE_INSTALL_PREFIX. configure_file("${CGAL_MODULES_DIR}/CGALConfig_install.cmake.in" "${CMAKE_BINARY_DIR}/config/CGALConfig.cmake" @ONLY) #write prefix exceptions diff --git a/Number_types/include/CGAL/Sqrt_extension/convert_to_bfi.h b/Number_types/include/CGAL/Sqrt_extension/convert_to_bfi.h index 544f8fb8790..004f53bd9c1 100644 --- a/Number_types/include/CGAL/Sqrt_extension/convert_to_bfi.h +++ b/Number_types/include/CGAL/Sqrt_extension/convert_to_bfi.h @@ -10,7 +10,7 @@ // // Author(s) : Michael Hemmer -// This files adds an optional static cache to convert_to_bfi for Sqrt_extension +// This file adds an optional static cache to convert_to_bfi for Sqrt_extension #ifndef CGAL_SQRT_EXTENSION_CONVERT_TO_BFI_H #define CGAL_SQRT_EXTENSION_CONVERT_TO_BFI_H diff --git a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt index 97f9a323685..8c8dbb8a6e2 100644 --- a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt @@ -17,7 +17,6 @@ create_single_source_cgal_program("obb_example.cpp") create_single_source_cgal_program("obb_with_point_maps_example.cpp") create_single_source_cgal_program("rotated_aabb_tree_example.cpp") -foreach(target obb_example obb_with_point_maps_example - rotated_aabb_tree_example) +foreach(target obb_example obb_with_point_maps_example rotated_aabb_tree_example) target_link_libraries(${target} PUBLIC CGAL::Eigen3_support) endforeach() diff --git a/Point_set_3/examples/Point_set_3/CMakeLists.txt b/Point_set_3/examples/Point_set_3/CMakeLists.txt index 1699f75d099..b26633c293a 100644 --- a/Point_set_3/examples/Point_set_3/CMakeLists.txt +++ b/Point_set_3/examples/Point_set_3/CMakeLists.txt @@ -13,8 +13,7 @@ create_single_source_cgal_program("point_set_read_xyz.cpp") create_single_source_cgal_program("point_set_advanced.cpp") set(needed_cxx_features cxx_rvalue_references cxx_variadic_templates) -create_single_source_cgal_program("point_set_read_ply.cpp" CXX_FEATURES - ${needed_cxx_features}) +create_single_source_cgal_program("point_set_read_ply.cpp" CXX_FEATURES ${needed_cxx_features}) find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) diff --git a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt index 8766b4c40ca..3f5583bb8b8 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt @@ -55,8 +55,7 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(normal_estimation_test PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("hierarchy_simplification_test.cpp") - target_link_libraries(hierarchy_simplification_test - PUBLIC CGAL::Eigen3_support) + target_link_libraries(hierarchy_simplification_test PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("smoothing_test.cpp") target_link_libraries(smoothing_test PUBLIC CGAL::Eigen3_support) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index b7328227479..d3fc45f270e 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -97,8 +97,7 @@ if(TARGET CGAL::TBB_support) target_link_libraries(test_hausdorff_bounded_error_distance PUBLIC CGAL::TBB_support) target_link_libraries(test_pmp_distance PUBLIC CGAL::TBB_support) target_link_libraries(orient_polygon_soup_test PUBLIC CGAL::TBB_support) - target_link_libraries(self_intersection_surface_mesh_test - PUBLIC CGAL::TBB_support) + target_link_libraries(self_intersection_surface_mesh_test PUBLIC CGAL::TBB_support) else() message(STATUS "NOTICE: Intel TBB was not found. Tests will use sequential code.") endif() diff --git a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt index b4984c15043..78198bdec86 100644 --- a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt @@ -27,12 +27,9 @@ if(NOT TARGET CGAL::SCIP_support) endif() create_single_source_cgal_program("polygonal_surface_reconstruction_test.cpp") -target_link_libraries(polygonal_surface_reconstruction_test - PUBLIC CGAL::Eigen3_support) +target_link_libraries(polygonal_surface_reconstruction_test PUBLIC CGAL::Eigen3_support) if(TARGET CGAL::SCIP_support) - target_link_libraries(polygonal_surface_reconstruction_test - PUBLIC CGAL::SCIP_support) + target_link_libraries(polygonal_surface_reconstruction_test PUBLIC CGAL::SCIP_support) else() - target_link_libraries(polygonal_surface_reconstruction_test - PUBLIC CGAL::GLPK_support) + target_link_libraries(polygonal_surface_reconstruction_test PUBLIC CGAL::GLPK_support) endif() diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index a15bb212d96..563deff8f5c 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -29,20 +29,18 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") include_directories(BEFORE ./ ./include ./CGAL_demo) list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}") -# Find CGAL - option(POLYHEDRON_QTSCRIPT_DEBUGGER "Activate the use of Qt Script Debugger in Polyhedron_3 demo" OFF) +# Find CGAL find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5 ImageIO) set_package_properties(CGAL PROPERTIES TYPE REQUIRED) include(${CGAL_USE_FILE}) -# Find Qt5 itself -find_package( - Qt5 QUIET - COMPONENTS OpenGL Script Widgets - OPTIONAL_COMPONENTS ScriptTools WebSockets Network) +# Find Qt5 itself +find_package(Qt5 QUIET + COMPONENTS OpenGL Script Widgets + OPTIONAL_COMPONENTS ScriptTools WebSockets Network) set_package_properties( Qt5 PROPERTIES @@ -162,7 +160,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) # AUXILIARY LIBRARIES - # put s (which are shared libraries) at the same location as + # put plugins (which are shared libraries) at the same location as # executable files set(CGAL_POLYHEDRON_DEMO_PLUGINS_DIR "${RUNTIME_OUTPUT_PATH}") set(LIBRARY_OUTPUT_PATH "${CGAL_POLYHEDRON_DEMO_PLUGINS_DIR}") diff --git a/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt b/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt index 7ee0eaa3b49..5f5008878f6 100644 --- a/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt +++ b/Set_movable_separability_2/examples/Set_movable_separability_2/CMakeLists.txt @@ -7,7 +7,5 @@ project(Set_movable_separability_2_Examples) find_package(CGAL REQUIRED) create_single_source_cgal_program("top_edges_single_mold_trans_cast.cpp") -create_single_source_cgal_program( - "is_pullout_direction_single_mold_trans_cast.cpp") -create_single_source_cgal_program( - "pullout_directions_single_mold_trans_cast.cpp") +create_single_source_cgal_program("is_pullout_direction_single_mold_trans_cast.cpp") +create_single_source_cgal_program("pullout_directions_single_mold_trans_cast.cpp") diff --git a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt index 9de592b8f8a..6ad0b25d29e 100644 --- a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt @@ -11,12 +11,7 @@ find_package(CGAL REQUIRED COMPONENTS Core) find_package(OSQP QUIET) include(CGAL_OSQP_support) if(TARGET CGAL::OSQP_support) - message(STATUS "Found OSQP") - - set(osqp_targets - benchmark_contours - benchmark_qp_segments) - + set(osqp_targets benchmark_contours benchmark_qp_segments) foreach(osqp_target ${osqp_targets}) create_single_source_cgal_program("${osqp_target}.cpp") if(TARGET ${osqp_target}) diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt index b09f63d1cd8..7c2d1fb9dc8 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt @@ -17,8 +17,7 @@ if(TARGET CGAL::Eigen3_support) # ------------------------------------------------------------------ set(SuiteSparse_USE_LAPACK_BLAS ON) - find_package(SuiteSparse QUIET NO_MODULE - )# 1st: Try to locate the *config.cmake file. + find_package(SuiteSparse QUIET NO_MODULE)# 1st: Try to locate the *config.cmake file. if(NOT SuiteSparse_FOUND) set(SuiteSparse_VERBOSE ON) find_package(SuiteSparse QUIET) # 2nd: Use FindSuiteSparse.cmake module diff --git a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt index 81d75a3ce49..bf1a08432cd 100644 --- a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt @@ -10,8 +10,7 @@ find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("extensive_parameterization_test.cpp") - target_link_libraries(extensive_parameterization_test - PUBLIC CGAL::Eigen3_support) + target_link_libraries(extensive_parameterization_test PUBLIC CGAL::Eigen3_support) else() message("NOTICE: The tests require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt index 15fc236f473..d142ca17989 100644 --- a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt @@ -81,7 +81,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND) include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) cgal_add_compilation_test(T3_demo) -else(Qt5_FOUND) +else(CGAL_Qt5_FOUND AND Qt5_FOUND) set(TRIANGULATION_3_MISSING_DEPS "") @@ -96,6 +96,4 @@ else(Qt5_FOUND) message("NOTICE: This demo requires ${TRIANGULATION_3_MISSING_DEPS}, and will not be compiled.") -endif( - CGAL_Qt5_FOUND - AND Qt5_FOUND) +endif(CGAL_Qt5_FOUND AND Qt5_FOUND) From 174fefaeb854137b38430e1c909981512d62ba74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 6 Sep 2022 16:26:06 +0200 Subject: [PATCH 06/60] Fix wrong target check for Boost program_options --- Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt | 2 +- .../test/Surface_mesh_shortest_path/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt index e3c35fe60a2..844f51f4331 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt @@ -16,7 +16,7 @@ if(TARGET CGAL::Eigen3_support) if(Boost_PROGRAM_OPTIONS_FOUND) create_single_source_cgal_program("Mesh_estimation.cpp") target_link_libraries(Mesh_estimation PUBLIC CGAL::Eigen3_support) - if(TARGET Boost::filesystem) + if(TARGET Boost::program_options) target_link_libraries(Mesh_estimation PRIVATE Boost::program_options) else() target_link_libraries(Mesh_estimation PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) 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 index f086d72d46a..b1f2e05b69e 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt @@ -20,7 +20,7 @@ find_package(Boost QUIET COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) if(CGAL_Core_FOUND OR LEDA_FOUND) create_single_source_cgal_program("TestMesh.cpp") - if(TARGET Boost::filesystem) + if(TARGET Boost::program_options) target_link_libraries(TestMesh PRIVATE Boost::program_options) else() target_link_libraries(TestMesh PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY}) From 01e072270fc7932be62e4b6f524d55789a01a6d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 7 Sep 2022 10:21:46 +0200 Subject: [PATCH 07/60] Misc minor fixes --- BGL/examples/BGL_polyhedron_3/CMakeLists.txt | 4 ++-- Surface_mesh/benchmark/CMakeLists.txt | 6 +++--- .../demo/Surface_mesh_deformation/CMakeLists.txt | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index 31f3a4f2d51..9fbe55b6e75 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -14,14 +14,14 @@ create_single_source_cgal_program("kruskal_with_stored_id.cpp") create_single_source_cgal_program("normals.cpp") create_single_source_cgal_program("range.cpp") create_single_source_cgal_program("transform_iterator.cpp") +create_single_source_cgal_program("copy_polyhedron.cpp") find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - create_single_source_cgal_program("copy_polyhedron.cpp") target_link_libraries(copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES}) target_compile_definitions(copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH) else() - message(STATUS "NOTICE: The example 'copy_polyhedron' requires OpenMesh, and will not be compiled.") + message(STATUS "NOTICE: The example 'copy_polyhedron' will not use OpenMesh.") endif() find_package(METIS QUIET) diff --git a/Surface_mesh/benchmark/CMakeLists.txt b/Surface_mesh/benchmark/CMakeLists.txt index 841e9b4bea9..33ae6c84569 100644 --- a/Surface_mesh/benchmark/CMakeLists.txt +++ b/Surface_mesh/benchmark/CMakeLists.txt @@ -12,12 +12,12 @@ add_definitions("-std=c++1y") # Polyhedron add_executable(polyhedron_performance performance_2.h polyhedron_performance.h polyhedron_performance.cpp) -target_link_libraries(polyhedron_performance ${CGAL_LIBRARIES}) +target_link_libraries(polyhedron_performance PRIVATE ${CGAL_LIBRARIES}) # LCC_2 add_executable(lcc_performance_2 performance_2.h lcc_performance_2.h lcc_performance_2.cpp) -target_link_libraries(lcc_performance_2 ${CGAL_LIBRARIES}) +target_link_libraries(lcc_performance_2 PRIVATE ${CGAL_LIBRARIES}) # Surface_mesh add_executable( @@ -29,7 +29,7 @@ add_executable( performance_2 performance_2.cpp performance_2.h polyhedron_performance.h surface_mesh_performance.h lcc_performance_2.h) -target_link_libraries(performance_2 ${CGAL_LIBRARIES}) +target_link_libraries(performance_2 PRIVATE ${CGAL_LIBRARIES}) create_single_source_cgal_program("sm_sms.cpp") create_single_source_cgal_program("poly_sms.cpp") diff --git a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt index d0e7ddae9bb..c5805ce92f7 100644 --- a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt @@ -17,8 +17,7 @@ find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("deform_mesh_for_botsch08_format.cpp") - target_link_libraries(deform_mesh_for_botsch08_format - PUBLIC CGAL::Eigen3_support) + target_link_libraries(deform_mesh_for_botsch08_format PUBLIC CGAL::Eigen3_support) else() message("NOTICE: This program requires requires Eigen 3.1.91 (or greater) or later and will not be compiled.") endif() From b78da384906a94e7960a4cd52b26d8bbf2cdd2c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 7 Sep 2022 11:42:44 +0200 Subject: [PATCH 08/60] Add 'REQUIRED' in the documentation's `find_package(CGAL)` usages --- .../Developer_manual/create_and_use_a_cmakelist.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt index 68318652bdc..02ff32da6bc 100644 --- a/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt +++ b/Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt @@ -6,7 +6,7 @@ A base can be created using the script `cgal_create_CMakeLists`. Its usage is de \section seclink Linking with CGAL To link with the \cgal library, use the following: \code -find_package(CGAL) +find_package(CGAL REQUIRED) add_executable(my_executable my_source_file.cpp) target_link_libraries(my_executable CGAL::CGAL) \endcode @@ -14,7 +14,7 @@ target_link_libraries(my_executable CGAL::CGAL) Other \cgal libraries are linked similarly. For example, with `CGAL_Core`: \code -find_package(CGAL COMPONENTS Core) +find_package(CGAL REQUIRED COMPONENTS Core) target_link_libraries(my_executable CGAL::CGAL CGAL::CGAL_Core) \endcode From 6f187f332cbb592c95a250b6a66beadfc5ac8766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Wed, 14 Sep 2022 14:08:23 +0200 Subject: [PATCH 09/60] Misc minor fixes/improvements --- .../examples/Algebraic_kernel_d/CMakeLists.txt | 2 +- Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt | 2 ++ Box_intersection_d/test/Box_intersection_d/CMakeLists.txt | 2 +- CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt | 2 +- Classification/examples/Classification/CMakeLists.txt | 4 +++- Classification/test/Classification/CMakeLists.txt | 2 +- Combinatorial_map/test/Combinatorial_map/CMakeLists.txt | 2 ++ Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt | 1 + GraphicsView/demo/Polygon/CMakeLists.txt | 2 +- Heat_method_3/examples/Heat_method_3/CMakeLists.txt | 2 +- Heat_method_3/test/Heat_method_3/CMakeLists.txt | 2 +- Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt | 2 +- Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt | 2 +- Mesh_3/test/Mesh_3/CMakeLists.txt | 2 +- NewKernel_d/test/NewKernel_d/CMakeLists.txt | 2 +- Number_types/test/Number_types/CMakeLists.txt | 4 ++-- .../benchmark/Optimal_bounding_box/CMakeLists.txt | 2 +- .../examples/Optimal_bounding_box/CMakeLists.txt | 2 +- .../test/Optimal_bounding_box/CMakeLists.txt | 2 +- Orthtree/examples/Orthtree/CMakeLists.txt | 2 +- .../examples/Periodic_3_mesh_3/CMakeLists.txt | 2 +- Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt | 2 +- .../Poisson_surface_reconstruction_3/CMakeLists.txt | 2 +- .../test/Poisson_surface_reconstruction_3/CMakeLists.txt | 2 +- .../benchmark/Polygon_mesh_processing/CMakeLists.txt | 2 +- .../Polygonal_surface_reconstruction/CMakeLists.txt | 6 +++--- .../test/Polygonal_surface_reconstruction/CMakeLists.txt | 2 +- Polyhedron/demo/Polyhedron/CMakeLists.txt | 2 +- .../demo/Principal_component_analysis/CMakeLists.txt | 2 +- .../examples/Principal_component_analysis/CMakeLists.txt | 2 +- .../test/Principal_component_analysis/CMakeLists.txt | 2 +- Property_map/examples/Property_map/CMakeLists.txt | 2 +- Property_map/test/Property_map/CMakeLists.txt | 1 + Ridges_3/examples/Ridges_3/CMakeLists.txt | 2 +- Ridges_3/test/Ridges_3/CMakeLists.txt | 2 +- SMDS_3/test/SMDS_3/CMakeLists.txt | 2 +- .../benchmark/compact_container_benchmark/CMakeLists.txt | 5 ++++- STL_Extension/test/STL_Extension/CMakeLists.txt | 3 +++ .../examples/Scale_space_reconstruction_3/CMakeLists.txt | 4 +++- Shape_detection/benchmark/Shape_detection/CMakeLists.txt | 2 +- Shape_detection/test/Shape_detection/CMakeLists.txt | 1 + .../benchmark/Shape_regularization/CMakeLists.txt | 2 ++ .../examples/Shape_regularization/CMakeLists.txt | 1 + Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt | 1 + Solver_interface/examples/Solver_interface/CMakeLists.txt | 8 +++++++- .../benchmark/Spatial_searching/CMakeLists.txt | 2 +- .../examples/Spatial_searching/CMakeLists.txt | 2 ++ Spatial_sorting/examples/Spatial_sorting/CMakeLists.txt | 1 + Spatial_sorting/test/Spatial_sorting/CMakeLists.txt | 1 + .../examples/Surface_mesh_approximation/CMakeLists.txt | 2 +- .../test/Surface_mesh_approximation/CMakeLists.txt | 2 +- .../optimal_rotation/CMakeLists.txt | 2 +- .../demo/Surface_mesh_deformation/CMakeLists.txt | 2 +- .../examples/Surface_mesh_deformation/CMakeLists.txt | 4 +++- .../test/Surface_mesh_deformation/CMakeLists.txt | 4 +++- .../examples/Surface_mesh_parameterization/CMakeLists.txt | 2 +- .../test/Surface_mesh_parameterization/CMakeLists.txt | 2 +- .../examples/Surface_mesh_segmentation/CMakeLists.txt | 2 ++ .../examples/Surface_mesh_shortest_path/CMakeLists.txt | 2 ++ .../test/Surface_mesh_shortest_path/CMakeLists.txt | 4 ++++ .../examples/Surface_mesh_simplification/CMakeLists.txt | 4 ++++ .../benchmark/Surface_mesh_skeletonization/CMakeLists.txt | 2 +- .../examples/Surface_mesh_skeletonization/CMakeLists.txt | 5 ++++- .../test/Surface_mesh_skeletonization/CMakeLists.txt | 2 +- TDS_3/test/TDS_3/CMakeLists.txt | 3 +++ Testsuite/test/collect_cgal_testresults_from_cmake | 2 +- .../examples/Tetrahedral_remeshing/CMakeLists.txt | 2 ++ Triangulation/applications/Triangulation/CMakeLists.txt | 2 +- Triangulation/benchmark/Triangulation/CMakeLists.txt | 3 ++- Triangulation/examples/Triangulation/CMakeLists.txt | 2 +- Triangulation/test/Triangulation/CMakeLists.txt | 2 +- Triangulation_3/examples/Triangulation_3/CMakeLists.txt | 2 ++ Triangulation_3/test/Triangulation_3/CMakeLists.txt | 3 +++ .../demo/Triangulation_on_sphere_2/CMakeLists.txt | 2 +- Weights/examples/Weights/CMakeLists.txt | 2 +- 75 files changed, 119 insertions(+), 58 deletions(-) diff --git a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt index c1fd8d009f6..696fdabc10a 100644 --- a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt @@ -3,7 +3,7 @@ project(Algebraic_kernel_d_Examples) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(MPFI) +find_package(MPFI QUIET) if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP) include(${MPFI_USE_FILE}) create_single_source_cgal_program("Compare_1.cpp") diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt index aafb87f5217..33e96b365e9 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt @@ -6,11 +6,13 @@ find_package(CGAL REQUIRED COMPONENTS Core) find_package(MPFI QUIET) if(MPFI_FOUND) + message(STATUS "Found MPFI") include(${MPFI_USE_FILE}) endif() find_package(RS3 QUIET) if(RS3_FOUND) + message(STATUS "Found RS3") include(${RS3_USE_FILE}) endif() diff --git a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt index 0a032673863..56fa8d95856 100644 --- a/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt +++ b/Box_intersection_d/test/Box_intersection_d/CMakeLists.txt @@ -17,5 +17,5 @@ include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) target_link_libraries(test_box_grid PUBLIC CGAL::TBB_support) else() - message(STATUS "NOTICE: Intel TBB was not found. Sequential code will be used.") + message(STATUS "NOTICE: Intel TBB was not found. Parallel code will not be used.") endif() diff --git a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt index 8944aae476d..f017575dd85 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt @@ -22,7 +22,7 @@ find_package(CGAL REQUIRED COMPONENTS Core) include(${CGAL_USE_FILE}) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Classification/examples/Classification/CMakeLists.txt b/Classification/examples/Classification/CMakeLists.txt index 3901b756407..daf1223226e 100644 --- a/Classification/examples/Classification/CMakeLists.txt +++ b/Classification/examples/Classification/CMakeLists.txt @@ -23,7 +23,7 @@ if(NOT TARGET CGAL::Boost_iostreams_support) set(Classification_dependencies_met FALSE) endif() -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") @@ -49,6 +49,8 @@ create_single_source_cgal_program( "example_deprecated_conversion.cpp" ) find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning include(CGAL_OpenCV_support) if(TARGET CGAL::OpenCV_support) + message(STATUS "Found OpenCV") + create_single_source_cgal_program( "example_opencv_random_forest.cpp" ) target_link_libraries(example_opencv_random_forest PUBLIC CGAL::OpenCV_support) else() diff --git a/Classification/test/Classification/CMakeLists.txt b/Classification/test/Classification/CMakeLists.txt index c2a8f3211dc..6e179f78144 100644 --- a/Classification/test/Classification/CMakeLists.txt +++ b/Classification/test/Classification/CMakeLists.txt @@ -23,7 +23,7 @@ if(NOT TARGET CGAL::Boost_iostreams_support) set(Classification_dependencies_met FALSE) endif() -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt index 898951705f9..f38888d60e5 100644 --- a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt +++ b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt @@ -27,6 +27,8 @@ cgal_add_compilation_test(Combinatorial_map_copy_test_index) # Link with OpenMesh if possible find_package(OpenMesh QUIET) if(TARGET OpenMesh::OpenMesh) + message(STATUS "Found OpenMesh") + target_link_libraries(Combinatorial_map_copy_test PRIVATE OpenMesh::OpenMesh) target_compile_definitions(Combinatorial_map_copy_test PRIVATE -DCGAL_USE_OPENMESH) target_link_libraries(Combinatorial_map_copy_test_index PRIVATE OpenMesh::OpenMesh) diff --git a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt index bfb1068c315..2b436e6ea29 100644 --- a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt @@ -22,6 +22,7 @@ create_single_source_cgal_program("extreme_indices_3.cpp") find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) + message(STATUS "Found OpenMesh") create_single_source_cgal_program("quickhull_OM_3.cpp") target_link_libraries(quickhull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index 5aa21d3880b..8314d618d2f 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -15,7 +15,7 @@ endif() find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5 Core) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This demo requires the Eigen library, and will not be compiled.") diff --git a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt index a2ca12fbc65..42c7c498369 100644 --- a/Heat_method_3/examples/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/examples/Heat_method_3/CMakeLists.txt @@ -7,7 +7,7 @@ project(Heat_method_3_Examples) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.3.0) +find_package(Eigen3 3.3.0 QUIET) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: These examples require the Eigen library (3.3 or greater), and will not be compiled.") diff --git a/Heat_method_3/test/Heat_method_3/CMakeLists.txt b/Heat_method_3/test/Heat_method_3/CMakeLists.txt index f57897dc07b..bd1f923430e 100644 --- a/Heat_method_3/test/Heat_method_3/CMakeLists.txt +++ b/Heat_method_3/test/Heat_method_3/CMakeLists.txt @@ -7,7 +7,7 @@ project(Heat_method_3_Tests) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.3.0) +find_package(Eigen3 3.3.0 QUIET) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: These tests require the Eigen library (3.3 or greater), and will not be compiled.") diff --git a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt index 844f51f4331..b68d6a52fd0 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/examples/Jet_fitting_3/CMakeLists.txt @@ -7,7 +7,7 @@ project(Jet_fitting_3_Examples) find_package(CGAL REQUIRED) # use Eigen -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) diff --git a/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt b/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt index c371969ef24..008acda4622 100644 --- a/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt +++ b/Jet_fitting_3/test/Jet_fitting_3/CMakeLists.txt @@ -7,7 +7,7 @@ project(Jet_fitting_3_Tests) find_package(CGAL REQUIRED) # use Eigen -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("blind_1pt.cpp") diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index 58fb91a6bb9..471906677c7 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -7,7 +7,7 @@ project( Mesh_3_Tests ) find_package(CGAL REQUIRED COMPONENTS ImageIO) # Use Eigen -find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if (NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/NewKernel_d/test/NewKernel_d/CMakeLists.txt b/NewKernel_d/test/NewKernel_d/CMakeLists.txt index 103bcabd9ca..bb66aa77eb3 100644 --- a/NewKernel_d/test/NewKernel_d/CMakeLists.txt +++ b/NewKernel_d/test/NewKernel_d/CMakeLists.txt @@ -12,7 +12,7 @@ endif() find_package(CGAL REQUIRED) -find_package(Eigen3) +find_package(Eigen3 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) file( diff --git a/Number_types/test/Number_types/CMakeLists.txt b/Number_types/test/Number_types/CMakeLists.txt index a637db06486..1fb8b4aff34 100644 --- a/Number_types/test/Number_types/CMakeLists.txt +++ b/Number_types/test/Number_types/CMakeLists.txt @@ -66,7 +66,7 @@ create_single_source_cgal_program("utilities.cpp") find_package( GMP ) if( GMP_FOUND AND NOT CGAL_DISABLE_GMP ) create_single_source_cgal_program( "CORE_Expr_ticket_4296.cpp" ) - find_package( MPFI ) + find_package(MPFI QUIET) if( MPFI_FOUND ) include( ${MPFI_USE_FILE} ) endif() #MPFI_FOUND @@ -76,7 +76,7 @@ if(NOT CGAL_DISABLE_GMP) create_single_source_cgal_program( "Gmpfi.cpp" ) create_single_source_cgal_program( "Gmpfr_bug.cpp" ) create_single_source_cgal_program( "test_eigen.cpp" ) - find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) + find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if (TARGET CGAL::Eigen3_support) target_link_libraries(test_eigen PUBLIC CGAL::Eigen3_support) diff --git a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt index 31b92ab56e6..0bbc27d0aa8 100644 --- a/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/benchmark/Optimal_bounding_box/CMakeLists.txt @@ -7,7 +7,7 @@ project(Optimal_bounding_box_Benchmark) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt index 8c8dbb8a6e2..d771e4440e4 100644 --- a/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/examples/Optimal_bounding_box/CMakeLists.txt @@ -6,7 +6,7 @@ project(Optimal_bounding_box_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt index db5e5b0a874..0bbca049598 100644 --- a/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt +++ b/Optimal_bounding_box/test/Optimal_bounding_box/CMakeLists.txt @@ -6,7 +6,7 @@ project(Optimal_bounding_box_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Orthtree/examples/Orthtree/CMakeLists.txt b/Orthtree/examples/Orthtree/CMakeLists.txt index b4e92f36ee9..432d99b21c4 100644 --- a/Orthtree/examples/Orthtree/CMakeLists.txt +++ b/Orthtree/examples/Orthtree/CMakeLists.txt @@ -16,7 +16,7 @@ create_single_source_cgal_program("octree_traversal_preorder.cpp") create_single_source_cgal_program("octree_grade.cpp") create_single_source_cgal_program("quadtree_build_from_point_vector.cpp") -find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) +find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) include(CGAL_Eigen_support) if (TARGET CGAL::Eigen_support) create_single_source_cgal_program("orthtree_build.cpp") diff --git a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt index 70027d80b08..e27c0b7afff 100644 --- a/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/examples/Periodic_3_mesh_3/CMakeLists.txt @@ -8,7 +8,7 @@ project(Periodic_3_mesh_3_Examples) find_package(CGAL REQUIRED) # Use Eigen -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt index b962e56be41..9f8d277a28a 100644 --- a/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt +++ b/Periodic_3_mesh_3/test/Periodic_3_mesh_3/CMakeLists.txt @@ -7,7 +7,7 @@ project(Periodic_3_mesh_3_Tests) find_package(CGAL REQUIRED COMPONENTS ImageIO) # Use Eigen -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt index 40694e9e5d1..d62b4bccd03 100644 --- a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt +++ b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -19,7 +19,7 @@ if(MSVC) endif() # Find Eigen3 (requires 3.1.0 or greater) -find_package(Eigen3 3.1.0) +find_package(Eigen3 3.1.0 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) # Executables that require Eigen 3 diff --git a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt index 347a37eeab9..efd978ee3a3 100644 --- a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt +++ b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -18,7 +18,7 @@ if(MSVC) message(STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'") endif() -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) # Executables that require Eigen 3.1 diff --git a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt index fd77f8a046d..5fcd1fc630a 100644 --- a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt @@ -7,7 +7,7 @@ project(Polygon_mesh_processing) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: Benchmarks require Eigen 3.2 (or greater), and will not be compiled") diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt index a5bd6e2c6a4..32d10eb1480 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/CMakeLists.txt @@ -8,17 +8,17 @@ cmake_minimum_required(VERSION 3.1...3.23) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") return() endif() -find_package(SCIP) +find_package(SCIP QUIET) include(CGAL_SCIP_support) if(NOT TARGET CGAL::SCIP_support) - find_package(GLPK) + find_package(GLPK QUIET) include(CGAL_GLPK_support) if(NOT TARGET CGAL::GLPK_support) message("NOTICE: This project requires either SCIP or GLPK, and will not be compiled.") diff --git a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt index 78198bdec86..790da0f2757 100644 --- a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt @@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 3.1...3.23) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 563deff8f5c..1b967c1d5af 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -63,7 +63,7 @@ if(NOT TARGET CGAL::Eigen3_support) message(STATUS "NOTICE: Eigen was not found.") endif() -find_package(METIS) +find_package(METIS QUIET) include(CGAL_METIS_support) set_package_properties( METIS PROPERTIES diff --git a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt index 60b1475d431..6ec0024f3a5 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt @@ -17,7 +17,7 @@ include_directories(./) # Find CGAL and CGAL Qt5 find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires the Eigen library, and will not be compiled.") diff --git a/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt index 6ba4150b812..5eaeeee35a3 100644 --- a/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/examples/Principal_component_analysis/CMakeLists.txt @@ -7,7 +7,7 @@ project(Principal_component_analysis_Examples) find_package(CGAL REQUIRED) # Use Eigen -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt index 9fb9d3a75db..8a4078ffd37 100644 --- a/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt @@ -7,7 +7,7 @@ project(Principal_component_analysis_Tests) find_package(CGAL REQUIRED) # Use Eigen -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Property_map/examples/Property_map/CMakeLists.txt b/Property_map/examples/Property_map/CMakeLists.txt index 771f98f63ed..4cc28458f81 100644 --- a/Property_map/examples/Property_map/CMakeLists.txt +++ b/Property_map/examples/Property_map/CMakeLists.txt @@ -6,7 +6,7 @@ find_package(CGAL REQUIRED) create_single_source_cgal_program("dynamic_properties.cpp") -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("custom_property_map.cpp") diff --git a/Property_map/test/Property_map/CMakeLists.txt b/Property_map/test/Property_map/CMakeLists.txt index ab38886b812..b0480bfa209 100644 --- a/Property_map/test/Property_map/CMakeLists.txt +++ b/Property_map/test/Property_map/CMakeLists.txt @@ -11,6 +11,7 @@ create_single_source_cgal_program("kernel_converter_properties_test.cpp") find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + message(STATUS "Found OpenMesh") include(UseOpenMesh) target_link_libraries(dynamic_properties_test PRIVATE ${OPENMESH_LIBRARIES}) diff --git a/Ridges_3/examples/Ridges_3/CMakeLists.txt b/Ridges_3/examples/Ridges_3/CMakeLists.txt index f310a7f98f0..fa1c4c35ff6 100644 --- a/Ridges_3/examples/Ridges_3/CMakeLists.txt +++ b/Ridges_3/examples/Ridges_3/CMakeLists.txt @@ -4,7 +4,7 @@ project(Ridges_3_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) diff --git a/Ridges_3/test/Ridges_3/CMakeLists.txt b/Ridges_3/test/Ridges_3/CMakeLists.txt index 4ec3de72518..f47bdeca10a 100644 --- a/Ridges_3/test/Ridges_3/CMakeLists.txt +++ b/Ridges_3/test/Ridges_3/CMakeLists.txt @@ -6,7 +6,7 @@ project(Ridges_3_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("ridge_test.cpp") diff --git a/SMDS_3/test/SMDS_3/CMakeLists.txt b/SMDS_3/test/SMDS_3/CMakeLists.txt index 2baa66ee018..7124b808434 100644 --- a/SMDS_3/test/SMDS_3/CMakeLists.txt +++ b/SMDS_3/test/SMDS_3/CMakeLists.txt @@ -8,7 +8,7 @@ find_package(CGAL REQUIRED) create_single_source_cgal_program( "test_simplicial_cb_vb.cpp") -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program( "test_c3t3.cpp" ) diff --git a/STL_Extension/benchmark/compact_container_benchmark/CMakeLists.txt b/STL_Extension/benchmark/compact_container_benchmark/CMakeLists.txt index 29f55d23097..4771b63fe10 100644 --- a/STL_Extension/benchmark/compact_container_benchmark/CMakeLists.txt +++ b/STL_Extension/benchmark/compact_container_benchmark/CMakeLists.txt @@ -3,9 +3,12 @@ project(Compact_container_benchmark) find_package(CGAL REQUIRED) -find_package(TBB) +find_package(TBB QUIET) include(CGAL_TBB_support) + create_single_source_cgal_program("cc_benchmark.cpp") + if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") target_link_libraries(cc_benchmark PUBLIC CGAL::TBB_support) endif() diff --git a/STL_Extension/test/STL_Extension/CMakeLists.txt b/STL_Extension/test/STL_Extension/CMakeLists.txt index a295d487ca3..d2590609109 100644 --- a/STL_Extension/test/STL_Extension/CMakeLists.txt +++ b/STL_Extension/test/STL_Extension/CMakeLists.txt @@ -51,12 +51,15 @@ create_single_source_cgal_program("test_vector.cpp") create_single_source_cgal_program("test_join_iterators.cpp") create_single_source_cgal_program("test_for_each.cpp") if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") target_link_libraries(test_for_each PUBLIC CGAL::TBB_support) endif() find_package(OpenMesh QUIET) if(OpenMesh_FOUND) + message(STATUS "Found OpenMesh") include(UseOpenMesh) + create_single_source_cgal_program("test_hash_OpenMesh.cpp") target_link_libraries(test_hash_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) else() diff --git a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt index 8aec35e8e15..8a7397b76d3 100644 --- a/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt +++ b/Scale_space_reconstruction_3/examples/Scale_space_reconstruction_3/CMakeLists.txt @@ -14,7 +14,7 @@ if(ACTIVATE_CONCURRENCY) endif() endif() -find_package(Eigen3 3.1.0) +find_package(Eigen3 3.1.0 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("scale_space.cpp") @@ -27,6 +27,8 @@ if(TARGET CGAL::Eigen3_support) target_link_libraries(scale_space_advancing_front PUBLIC CGAL::Eigen3_support) if(ACTIVATE_CONCURRENCY AND TARGET CGAL::TBB_support) + message(STATUS "Found TBB") + target_link_libraries(scale_space PUBLIC CGAL::TBB_support) target_link_libraries(scale_space_incremental PUBLIC CGAL::TBB_support) target_link_libraries(scale_space_manifold PUBLIC CGAL::TBB_support) diff --git a/Shape_detection/benchmark/Shape_detection/CMakeLists.txt b/Shape_detection/benchmark/Shape_detection/CMakeLists.txt index 8b7bd020dd3..eb5185726dc 100644 --- a/Shape_detection/benchmark/Shape_detection/CMakeLists.txt +++ b/Shape_detection/benchmark/Shape_detection/CMakeLists.txt @@ -6,7 +6,7 @@ project(Shape_detection_Benchmarks) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(Eigen3 3.1.0) # (3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("benchmark_region_growing_on_point_set_2.cpp") diff --git a/Shape_detection/test/Shape_detection/CMakeLists.txt b/Shape_detection/test/Shape_detection/CMakeLists.txt index 5250b7a6a4b..e625c9f8b83 100644 --- a/Shape_detection/test/Shape_detection/CMakeLists.txt +++ b/Shape_detection/test/Shape_detection/CMakeLists.txt @@ -30,6 +30,7 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("test_region_growing_on_point_set_3_with_sorting.cpp") create_single_source_cgal_program("test_region_growing_on_polygon_mesh_with_sorting.cpp") create_single_source_cgal_program("test_region_growing_on_degenerated_mesh.cpp") + foreach( target test_region_growing_basic diff --git a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt index 6ad0b25d29e..06073318cbc 100644 --- a/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/benchmark/Shape_regularization/CMakeLists.txt @@ -11,6 +11,8 @@ find_package(CGAL REQUIRED COMPONENTS Core) find_package(OSQP QUIET) include(CGAL_OSQP_support) if(TARGET CGAL::OSQP_support) + message(STATUS "Found OSQP") + set(osqp_targets benchmark_contours benchmark_qp_segments) foreach(osqp_target ${osqp_targets}) create_single_source_cgal_program("${osqp_target}.cpp") diff --git a/Shape_regularization/examples/Shape_regularization/CMakeLists.txt b/Shape_regularization/examples/Shape_regularization/CMakeLists.txt index d01c9585a16..78cd7bfe429 100644 --- a/Shape_regularization/examples/Shape_regularization/CMakeLists.txt +++ b/Shape_regularization/examples/Shape_regularization/CMakeLists.txt @@ -31,6 +31,7 @@ if(TARGET CGAL::OSQP_support) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) message(STATUS "Found Eigen") + create_single_source_cgal_program("regularize_real_data_2.cpp") target_link_libraries(regularize_real_data_2 PUBLIC CGAL::Eigen3_support CGAL::OSQP_support) else() diff --git a/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt b/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt index 24e5253b5ea..f637565bc51 100644 --- a/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt +++ b/Skin_surface_3/examples/Skin_surface_3/CMakeLists.txt @@ -22,6 +22,7 @@ create_single_source_cgal_program("union_of_balls_subdiv.cpp") find_package(ESBTL QUIET) if(ESBTL_FOUND) + message(STATUS "Found ESBTL") include_directories(${ESBTL_INCLUDE_DIR}) create_single_source_cgal_program("skin_surface_pdb_reader.cpp") else(ESBTL_FOUND) diff --git a/Solver_interface/examples/Solver_interface/CMakeLists.txt b/Solver_interface/examples/Solver_interface/CMakeLists.txt index b269af2e059..cf7fafadd89 100644 --- a/Solver_interface/examples/Solver_interface/CMakeLists.txt +++ b/Solver_interface/examples/Solver_interface/CMakeLists.txt @@ -7,7 +7,7 @@ project(Solver_interface_Examples) find_package(CGAL REQUIRED) # Use Eigen -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("singular_value_decomposition.cpp") @@ -23,6 +23,8 @@ endif() find_package(OSQP QUIET) include(CGAL_OSQP_support) if(TARGET CGAL::OSQP_support) + message(STATUS "Found OSQP") + create_single_source_cgal_program("osqp_quadratic_program.cpp") target_link_libraries(osqp_quadratic_program PUBLIC CGAL::OSQP_support) message(STATUS "OSQP found and used") @@ -33,6 +35,8 @@ endif() find_package(SCIP QUIET) include(CGAL_SCIP_support) if(TARGET CGAL::SCIP_support) + message(STATUS "Found SCIP") + create_single_source_cgal_program("mixed_integer_program.cpp") target_link_libraries(mixed_integer_program PUBLIC CGAL::SCIP_support) message(STATUS "SCIP found and used") @@ -40,6 +44,8 @@ else() find_package(GLPK QUIET) include(CGAL_GLPK_support) if(TARGET CGAL::GLPK_support) + message(STATUS "Found GLPK") + create_single_source_cgal_program("mixed_integer_program.cpp") target_link_libraries(mixed_integer_program PUBLIC CGAL::GLPK_support) message(STATUS "GLPK found and used") diff --git a/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt b/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt index 239b7f03600..cc0ac42097f 100644 --- a/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/benchmark/Spatial_searching/CMakeLists.txt @@ -8,7 +8,7 @@ find_package(CGAL REQUIRED COMPONENTS Core) include_directories(BEFORE "include") -find_package(Eigen3 3.1.91) # (requires 3.1.91 or greater) +find_package(Eigen3 3.1.91 QUIET) # (requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: These benchmarks require Eigen 3.1.91 (or greater), and will not be compiled.") diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index 53661afd8bb..df150df4c8d 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -43,6 +43,8 @@ endif() find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") + create_single_source_cgal_program("parallel_kdtree.cpp") target_link_libraries(parallel_kdtree PUBLIC CGAL::TBB_support) else() diff --git a/Spatial_sorting/examples/Spatial_sorting/CMakeLists.txt b/Spatial_sorting/examples/Spatial_sorting/CMakeLists.txt index e1fd380977a..e8cd7e05df7 100644 --- a/Spatial_sorting/examples/Spatial_sorting/CMakeLists.txt +++ b/Spatial_sorting/examples/Spatial_sorting/CMakeLists.txt @@ -17,5 +17,6 @@ endforeach() find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") target_link_libraries(parallel_spatial_sort_3 PUBLIC CGAL::TBB_support) endif() diff --git a/Spatial_sorting/test/Spatial_sorting/CMakeLists.txt b/Spatial_sorting/test/Spatial_sorting/CMakeLists.txt index 7ac68ead263..e7f809cb086 100644 --- a/Spatial_sorting/test/Spatial_sorting/CMakeLists.txt +++ b/Spatial_sorting/test/Spatial_sorting/CMakeLists.txt @@ -12,5 +12,6 @@ create_single_source_cgal_program("test_multiscale.cpp") find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") target_link_libraries(test_hilbert PUBLIC CGAL::TBB_support) endif() diff --git a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt index 7748468d634..e61a9141b62 100644 --- a/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/examples/Surface_mesh_approximation/CMakeLists.txt @@ -8,7 +8,7 @@ project(Surface_mesh_approximation_Examples) find_package(CGAL REQUIRED) # Use Eigen (for PCA) -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt index d1acae25bf2..0c269600668 100644 --- a/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt +++ b/Surface_mesh_approximation/test/Surface_mesh_approximation/CMakeLists.txt @@ -8,7 +8,7 @@ project(Surface_mesh_approximation_Tests) find_package(CGAL REQUIRED) # Use Eigen (for PCA) -find_package(Eigen3 3.1.0) #(3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: This project requires Eigen 3.1 (or greater), and will not be compiled.") diff --git a/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt b/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt index 6e3106ff9f4..15ec2c40838 100644 --- a/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt +++ b/Surface_mesh_deformation/benchmark/Surface_mesh_deformation/optimal_rotation/CMakeLists.txt @@ -3,7 +3,7 @@ project(benchmark_for_closest_rotation) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("benchmark_for_concept_models.cpp") diff --git a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt index c5805ce92f7..33263a81543 100644 --- a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt @@ -13,7 +13,7 @@ set_property(DIRECTORY PROPERTY CGAL_NO_TESTING TRUE) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) +find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("deform_mesh_for_botsch08_format.cpp") diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt index 19989c9654d..e61a3546eb2 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_deformation_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) +find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("all_roi_assign_example.cpp") @@ -34,6 +34,8 @@ if(TARGET CGAL::Eigen3_support) find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) + message(STATUS "Found OpenMesh") + create_single_source_cgal_program("all_roi_assign_example_with_OpenMesh.cpp") target_link_libraries(all_roi_assign_example_with_OpenMesh PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt index cc33b2b8f22..b903ca3bcf0 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_deformation_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.91) #(requires 3.1.91 or greater) +find_package(Eigen3 3.1.91 QUIET) #(requires 3.1.91 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("Cactus_deformation_session.cpp") @@ -19,6 +19,8 @@ if(TARGET CGAL::Eigen3_support) find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) + message(STATUS "Found OpenMesh") + create_single_source_cgal_program("Cactus_deformation_session_OpenMesh.cpp") target_link_libraries(Cactus_deformation_session_OpenMesh PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) diff --git a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt index 7c2d1fb9dc8..78a9f87f083 100644 --- a/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/examples/Surface_mesh_parameterization/CMakeLists.txt @@ -5,7 +5,7 @@ project(Surface_mesh_parameterization_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) # Executables that require Eigen 3.1 diff --git a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt index bf1a08432cd..ab08e517ccd 100644 --- a/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt +++ b/Surface_mesh_parameterization/test/Surface_mesh_parameterization/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_parameterization_Tests) # Find CGAL find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("extensive_parameterization_test.cpp") diff --git a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt index 6f8460fec27..b319050e6a5 100644 --- a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt +++ b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt @@ -18,6 +18,8 @@ create_single_source_cgal_program("extract_segmentation_into_mesh_example.cpp") find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) + message(STATUS "Found OpenMesh") + create_single_source_cgal_program("segmentation_from_sdf_values_OpenMesh_example.cpp") target_link_libraries(segmentation_from_sdf_values_OpenMesh_example PRIVATE ${OPENMESH_LIBRARIES}) else() diff --git a/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt b/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt index 67c248833c6..763fb37b61a 100644 --- a/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/examples/Surface_mesh_shortest_path/CMakeLists.txt @@ -16,6 +16,8 @@ create_single_source_cgal_program("shortest_path_with_locate.cpp") find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) + message(STATUS "Found OpenMesh") + create_single_source_cgal_program("shortest_paths_OpenMesh.cpp") target_link_libraries(shortest_paths_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) else() 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 index b1f2e05b69e..f3184c37609 100644 --- a/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt +++ b/Surface_mesh_shortest_path/test/Surface_mesh_shortest_path/CMakeLists.txt @@ -14,10 +14,14 @@ create_single_source_cgal_program("Surface_mesh_shortest_path_test_6.cpp") create_single_source_cgal_program("Surface_mesh_shortest_path_traits_test.cpp") find_package(LEDA QUIET) +if(LEDA_FOUND) + message(STATUS "Found LEDA") +endif() # Link with Boost.ProgramOptions (optional) find_package(Boost QUIET COMPONENTS program_options) if(Boost_PROGRAM_OPTIONS_FOUND) + message(STATUS "Found Boost program_options") if(CGAL_Core_FOUND OR LEDA_FOUND) create_single_source_cgal_program("TestMesh.cpp") if(TARGET Boost::program_options) diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt index e082b7e942a..4b2c37925e1 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -31,6 +31,8 @@ endif() find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) + message(STATUS "Found OpenMesh") + create_single_source_cgal_program("edge_collapse_OpenMesh.cpp") target_link_libraries(edge_collapse_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) else() @@ -43,6 +45,8 @@ include(CGAL_METIS_support) find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support AND TARGET CGAL::METIS_support) + message(STATUS "Found METIS & TBB") + create_single_source_cgal_program("collapse_small_edges_in_parallel.cpp") target_link_libraries(collapse_small_edges_in_parallel PUBLIC CGAL::TBB_support CGAL::METIS_support) else() diff --git a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt index e61824ac4f5..280cc828112 100644 --- a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt @@ -7,7 +7,7 @@ project(Mean_curvature_skeleton) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("solver_benchmark.cpp") diff --git a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt index a2916b9e2a0..798977cdd1b 100644 --- a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_skeletonization_Examples) find_package(CGAL REQUIRED) -find_package(Eigen3 3.2.0) #(requires 3.2.0 or greater) +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("simple_mcfskel_example.cpp") @@ -16,6 +16,7 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("MCF_Skeleton_sm_example.cpp") create_single_source_cgal_program("MCF_Skeleton_LCC_example.cpp") create_single_source_cgal_program("segmentation_example.cpp") + foreach( target simple_mcfskel_example @@ -31,6 +32,8 @@ if(TARGET CGAL::Eigen3_support) find_package(OpenMesh QUIET) if(OpenMesh_FOUND) include(UseOpenMesh) + message(STATUS "Found OpenMesh") + create_single_source_cgal_program("MCF_Skeleton_om_example.cpp") target_link_libraries(MCF_Skeleton_om_example PUBLIC CGAL::Eigen3_support PRIVATE ${OPENMESH_LIBRARIES}) else() diff --git a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt index 758f2f8bd87..a44eb1af3eb 100644 --- a/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/test/Surface_mesh_skeletonization/CMakeLists.txt @@ -6,7 +6,7 @@ project(Surface_mesh_skeletonization_Tests) find_package(CGAL REQUIRED) -find_package(Eigen3 3.2.0 REQUIRED) #(requires 3.2.0 or greater) +find_package(Eigen3 3.2.0 QUIET) #(requires 3.2.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("MCF_Skeleton_test.cpp") diff --git a/TDS_3/test/TDS_3/CMakeLists.txt b/TDS_3/test/TDS_3/CMakeLists.txt index 1e2256ba348..a80cd824ea3 100644 --- a/TDS_3/test/TDS_3/CMakeLists.txt +++ b/TDS_3/test/TDS_3/CMakeLists.txt @@ -7,8 +7,11 @@ include_directories(BEFORE "./include") find_package(TBB QUIET) include(CGAL_TBB_support) + create_single_source_cgal_program("test_triangulation_tds_3.cpp") create_single_source_cgal_program("test_io_tds3.cpp") + if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") target_link_libraries(test_triangulation_tds_3 PUBLIC CGAL::TBB_support) endif() diff --git a/Testsuite/test/collect_cgal_testresults_from_cmake b/Testsuite/test/collect_cgal_testresults_from_cmake index a7098c435e0..b8e3370abee 100755 --- a/Testsuite/test/collect_cgal_testresults_from_cmake +++ b/Testsuite/test/collect_cgal_testresults_from_cmake @@ -60,7 +60,7 @@ print_testresult() RESULT="t" fi else - if grep -E -q 'NOTICE: .*(need|require|incompatible).*will not be' CompilerOutput_$1 + if grep -E -q 'NOTICE: .*(need|require|incompatible|not found).*will not be' CompilerOutput_$1 then RESULT="r" else diff --git a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt index 9e89831fc98..b5c4c1da2ab 100644 --- a/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt +++ b/Tetrahedral_remeshing/examples/Tetrahedral_remeshing/CMakeLists.txt @@ -30,7 +30,9 @@ include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program( "mesh_and_remesh_polyhedral_domain_with_features.cpp" ) target_link_libraries(mesh_and_remesh_polyhedral_domain_with_features PUBLIC CGAL::Eigen3_support) + if(CGAL_ACTIVATE_CONCURRENT_MESH_3 AND TARGET CGAL::TBB_support) + message(STATUS "Found TBB") target_link_libraries(mesh_and_remesh_polyhedral_domain_with_features PRIVATE CGAL::TBB_support) endif() else() diff --git a/Triangulation/applications/Triangulation/CMakeLists.txt b/Triangulation/applications/Triangulation/CMakeLists.txt index 2b0d8c131ed..8ec8183570c 100644 --- a/Triangulation/applications/Triangulation/CMakeLists.txt +++ b/Triangulation/applications/Triangulation/CMakeLists.txt @@ -7,7 +7,7 @@ project(Triangulation_apps) # CGAL and its components find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) +find_package(Eigen3 3.1.0 QUIET) include(CGAL_Eigen3_support) if(NOT TARGET CGAL::Eigen3_support) message("NOTICE: Applications require Eigen 3.1 (or greater), and will not be compiled") diff --git a/Triangulation/benchmark/Triangulation/CMakeLists.txt b/Triangulation/benchmark/Triangulation/CMakeLists.txt index b47bea021e1..ab384682f8e 100644 --- a/Triangulation/benchmark/Triangulation/CMakeLists.txt +++ b/Triangulation/benchmark/Triangulation/CMakeLists.txt @@ -6,10 +6,11 @@ project(Triangulation_benchmark) find_package(CGAL REQUIRED COMPONENTS Core) -find_package(Eigen3 3.1.0) +find_package(Eigen3 3.1.0 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) include_directories(BEFORE "include") + create_single_source_cgal_program("delaunay.cpp") target_link_libraries(delaunay PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("Td_vs_T2_and_T3.cpp") diff --git a/Triangulation/examples/Triangulation/CMakeLists.txt b/Triangulation/examples/Triangulation/CMakeLists.txt index 0574b70126e..3ad27172e58 100644 --- a/Triangulation/examples/Triangulation/CMakeLists.txt +++ b/Triangulation/examples/Triangulation/CMakeLists.txt @@ -11,7 +11,7 @@ endif() find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) +find_package(Eigen3 3.1.0 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("barycentric_subdivision.cpp") diff --git a/Triangulation/test/Triangulation/CMakeLists.txt b/Triangulation/test/Triangulation/CMakeLists.txt index 292869eee6c..aeb3d8a5e50 100644 --- a/Triangulation/test/Triangulation/CMakeLists.txt +++ b/Triangulation/test/Triangulation/CMakeLists.txt @@ -11,7 +11,7 @@ endif() find_package(CGAL REQUIRED) -find_package(Eigen3 3.1.0) +find_package(Eigen3 3.1.0 QUIET) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) include_directories(BEFORE "include") diff --git a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt index f69ece8b238..4519992969f 100644 --- a/Triangulation_3/examples/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/examples/Triangulation_3/CMakeLists.txt @@ -33,6 +33,8 @@ find_package(TBB QUIET) include(CGAL_TBB_support) if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") + create_single_source_cgal_program("parallel_insertion_and_removal_in_regular_3.cpp") create_single_source_cgal_program("parallel_insertion_in_delaunay_3.cpp") create_single_source_cgal_program("sequential_parallel.cpp") diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index 19983c752f3..c87f341eb25 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -30,10 +30,13 @@ create_single_source_cgal_program("test_triangulation_3.cpp") create_single_source_cgal_program("test_io_triangulation_3.cpp") if(TARGET CGAL::TBB_support) + message(STATUS "Found TBB") + foreach(target test_delaunay_3 test_regular_3 test_regular_insert_range_with_info) target_link_libraries(${target} PUBLIC CGAL::TBB_support) endforeach() + if(BUILD_TESTING) set_property(TEST execution___of__test_delaunay_3 diff --git a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt index a06979d869f..6833911fa0c 100644 --- a/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt +++ b/Triangulation_on_sphere_2/demo/Triangulation_on_sphere_2/CMakeLists.txt @@ -31,8 +31,8 @@ include(CGAL_Eigen3_support) if(CGAL_Qt5_FOUND AND Qt5_FOUND AND TARGET CGAL::Eigen3_support) # Include this package's headers first - include_directories(BEFORE ./ ./include) + # ui file, created wih Qt Designer qt5_wrap_ui( uis Mainwindow.ui ) diff --git a/Weights/examples/Weights/CMakeLists.txt b/Weights/examples/Weights/CMakeLists.txt index bfa7a57734b..26748ec7233 100644 --- a/Weights/examples/Weights/CMakeLists.txt +++ b/Weights/examples/Weights/CMakeLists.txt @@ -17,5 +17,5 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("weighted_laplacian.cpp") target_link_libraries(weighted_laplacian PUBLIC CGAL::Eigen3_support) else() - message(STATUS "NOTICE: The Eigen library was not found. The example 'weighted_laplacian' will not be compiled.") + message(STATUS "NOTICE: The example 'weighted_laplacian' requires the Eigen library, and will not be compiled.") endif() From 397620e7bef72cedbcc727f3857707338741c292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 13 Dec 2022 19:03:46 +0100 Subject: [PATCH 10/60] add special case for intersection of a vertical segment with an horizontal segment --- .../CGAL/Intersections_2/Segment_2_Segment_2.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h index 5fd1545cc38..f7032fa8daa 100644 --- a/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h +++ b/Intersections_2/include/CGAL/Intersections_2/Segment_2_Segment_2.h @@ -436,6 +436,22 @@ Segment_2_Segment_2_pair::intersection_type() const : CGAL::make_array( _seg2->point(s2s2_id[c][2]), _seg2->point(s2s2_id[c][3]), _seg1->point(s2s2_id[c][0]), _seg1->point(s2s2_id[c][1]) ); + // special case for vertical and horizontal segments + if (std::is_floating_point::value && + std::is_same::value) + { + if (pts[0].x()==pts[1].x() && pts[2].y()==pts[3].y()) + { + _intersection_point = K().construct_point_2_object()(pts[0].x(), pts[2].y()); + return _result; + } + if (pts[0].y()==pts[1].y() && pts[2].x()==pts[3].x()) + { + _intersection_point = K().construct_point_2_object()(pts[2].x(), pts[0].y()); + return _result; + } + } + typename K::FT alpha = s2s2_alpha(pts[0].x(), pts[0].y(), pts[1].x(), pts[1].y(), pts[2].x(), pts[2].y(), pts[3].x(), pts[3].y()); _intersection_point = K().construct_barycenter_2_object()(pts[0], alpha, pts[1]); From 1e4cec6b03395dfbb79f056cf0167304ba8d0543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 16 Dec 2022 16:19:40 +0100 Subject: [PATCH 11/60] Fix not unchecking smoothing (if enabled) when protecting (+ui improvements) --- .../PMP/Isotropic_remeshing_plugin.cpp | 81 ++++++++++++++----- 1 file changed, 60 insertions(+), 21 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp b/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp index ee9c3fa0e69..a15e1f14dfd 100644 --- a/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Plugins/PMP/Isotropic_remeshing_plugin.cpp @@ -347,8 +347,7 @@ public Q_SLOTS: } // Create dialog box QDialog dialog(mw); - Ui::Isotropic_remeshing_dialog ui - = remeshing_dialog(&dialog, poly_item, selection_item); + initialize_remeshing_dialog(&dialog, poly_item, selection_item); // Get values int i = dialog.exec(); @@ -357,6 +356,7 @@ public Q_SLOTS: std::cout << "Remeshing aborted" << std::endl; return; } + bool edges_only = ui.splitEdgesOnly_checkbox->isChecked(); bool preserve_duplicates = ui.preserveDuplicates_checkbox->isChecked(); double target_length = ui.edgeLength_dspinbox->value(); @@ -710,7 +710,7 @@ public Q_SLOTS: if (target_length == 0.)//parameters have not been set yet { QDialog dialog(mw); - Ui::Isotropic_remeshing_dialog ui = remeshing_dialog(&dialog, poly_item); + initialize_remeshing_dialog(&dialog, poly_item); ui.objectName->setText(QString::number(scene->selectionIndices().size()) .append(QString(" items to be remeshed"))); int i = dialog.exec(); @@ -937,32 +937,73 @@ private: }; #endif - Ui::Isotropic_remeshing_dialog - remeshing_dialog(QDialog* dialog, - Scene_facegraph_item* poly_item, - Scene_polyhedron_selection_item* selection_item = nullptr) +public Q_SLOTS: + void update_after_protect_checkbox_click() + { + if(ui.protect_checkbox->isChecked()) + { + ui.smooth1D_label->setEnabled(false); + ui.smooth1D_checkbox->setEnabled(false); + ui.smooth1D_checkbox->setChecked(false); + } + else + { + ui.smooth1D_label->setEnabled(true); + ui.smooth1D_checkbox->setEnabled(true); + } + } + + void update_after_splitEdgesOnly_click() + { + if(ui.splitEdgesOnly_checkbox->isChecked()) + { + ui.nbIterations_label->setEnabled(false); + ui.nbIterations_spinbox->setEnabled(false); + ui.nbSmoothing_label->setEnabled(false); + ui.nbSmoothing_spinbox->setEnabled(false); + + ui.protect_label->setEnabled(false); + ui.protect_checkbox->setEnabled(false); + ui.protect_checkbox->setChecked(false); + + ui.smooth1D_label->setEnabled(false); + ui.smooth1D_checkbox->setEnabled(false); + ui.smooth1D_checkbox->setChecked(false); + } + else + { + ui.nbIterations_label->setEnabled(true); + ui.nbIterations_spinbox->setEnabled(true); + ui.nbSmoothing_label->setEnabled(true); + ui.nbSmoothing_spinbox->setEnabled(true); + + ui.protect_label->setEnabled(true); + ui.protect_checkbox->setEnabled(true); + + ui.smooth1D_label->setEnabled(true); + ui.smooth1D_checkbox->setEnabled(true); + } + } + +public: + void + initialize_remeshing_dialog(QDialog* dialog, + Scene_facegraph_item* poly_item, + Scene_polyhedron_selection_item* selection_item = nullptr) { - Ui::Isotropic_remeshing_dialog ui; ui.setupUi(dialog); connect(ui.buttonBox, SIGNAL(accepted()), dialog, SLOT(accept())); connect(ui.buttonBox, SIGNAL(rejected()), dialog, SLOT(reject())); //connect checkbox to spinbox - connect(ui.splitEdgesOnly_checkbox, SIGNAL(toggled(bool)), - ui.nbIterations_spinbox, SLOT(setDisabled(bool))); - connect(ui.splitEdgesOnly_checkbox, SIGNAL(toggled(bool)), - ui.protect_checkbox, SLOT(setDisabled(bool))); - connect(ui.splitEdgesOnly_checkbox, SIGNAL(toggled(bool)), - ui.smooth1D_checkbox, SLOT(setDisabled(bool))); - connect(ui.splitEdgesOnly_checkbox, SIGNAL(toggled(bool)), - ui.nbSmoothing_spinbox, SLOT(setDisabled(bool))); - connect(ui.protect_checkbox, SIGNAL(toggled(bool)), - ui.smooth1D_checkbox, SLOT(setDisabled(bool))); connect(ui.preserveDuplicates_checkbox, SIGNAL(toggled(bool)), ui.protect_checkbox, SLOT(setChecked(bool))); connect(ui.preserveDuplicates_checkbox, SIGNAL(toggled(bool)), ui.protect_checkbox, SLOT(setDisabled(bool))); + connect(ui.protect_checkbox, SIGNAL(clicked(bool)), this, SLOT(update_after_protect_checkbox_click())); + connect(ui.splitEdgesOnly_checkbox, SIGNAL(clicked(bool)), this, SLOT(update_after_splitEdgesOnly_click())); + //Set default parameters Scene_interface::Bbox bbox = poly_item != nullptr ? poly_item->bbox() : (selection_item != nullptr ? selection_item->bbox() @@ -1003,14 +1044,12 @@ private: ui.preserveDuplicates_checkbox->setDisabled(true); ui.preserveDuplicates_checkbox->setChecked(false); } - - return ui; } private: QAction* actionIsotropicRemeshing_; - + Ui::Isotropic_remeshing_dialog ui; }; // end Polyhedron_demo_isotropic_remeshing_plugin #include "Isotropic_remeshing_plugin.moc" From a798fb6803a2dca91cc915d73075638452997a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 16 Dec 2022 16:20:25 +0100 Subject: [PATCH 12/60] Minor example improvements --- .../Polygon_mesh_processing/isotropic_remeshing_example.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp index 048739c136f..159ff7cd708 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_example.cpp @@ -43,7 +43,7 @@ int main(int argc, char* argv[]) } double target_edge_length = (argc > 2) ? std::stod(std::string(argv[2])) : 0.04; - unsigned int nb_iter = 3; + unsigned int nb_iter = (argc > 3) ? std::stoi(std::string(argv[3])) : 10; std::cout << "Split border..."; @@ -59,6 +59,8 @@ int main(int argc, char* argv[]) CGAL::parameters::number_of_iterations(nb_iter) .protect_constraints(true)); //i.e. protect border, here + CGAL::IO::write_polygon_mesh("out.off", mesh, CGAL::parameters::stream_precision(17)); + std::cout << "Remeshing done." << std::endl; return 0; From 52fc2ffdd41aecdd48d83e9e3d396ee0d281eadd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 16 Dec 2022 16:21:46 +0100 Subject: [PATCH 13/60] Change criterion used in "should_flip" The criterion that takes the scalar_product of the cross products is maybe adapted to minimize the curvature when triangulating faces, but should_flip() is used in PMP::isotropic_remeshing, (soon) PMP::refine(), and PMP::remove_almost_degenerate_faces(). These algorithms aim to produce well-shaped elements. The criterion is not adapted to these algorithms: for example, on a flat mesh the scalar product is meaningless so it will pick the diagonal which maximizes the product of the lengths and product of sines, but this might create very anisotropic elements since the sine of obtuse angles is still positive. The "new" criterion is simply the criterion used in mesh smoothing and the typical Delaunay criterion for surfaces. --- .../repair_degeneracies.h | 44 ++++--------------- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h index 22be1f47e8e..c727b9c360f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h @@ -294,7 +294,6 @@ get_best_edge_orientation(typename boost::graph_traits::edge_descr return boost::graph_traits::null_halfedge(); } -// adapted from triangulate_faces template bool should_flip(typename boost::graph_traits::edge_descriptor e, const TriangleMesh& tmesh, @@ -309,43 +308,18 @@ bool should_flip(typename boost::graph_traits::edge_descriptor e, CGAL_precondition(!is_border(e, tmesh)); - halfedge_descriptor h = halfedge(e, tmesh); + typename Traits::Compute_approximate_angle_3 angle = gt.compute_approximate_angle_3_object(); - Point_ref p0 = get(vpm, target(h, tmesh)); - Point_ref p1 = get(vpm, target(next(h, tmesh), tmesh)); - Point_ref p2 = get(vpm, source(h, tmesh)); - Point_ref p3 = get(vpm, target(next(opposite(h, tmesh), tmesh), tmesh)); + const halfedge_descriptor h = halfedge(e, tmesh); - /* Chooses the diagonal that will split the quad in two triangles that maximize - * the scalar product of of the un-normalized normals of the two triangles. - * The lengths of the un-normalized normals (computed using cross-products of two vectors) - * are proportional to the area of the triangles. - * Maximize the scalar product of the two normals will avoid skinny triangles, - * and will also taken into account the cosine of the angle between the two normals. - * In particular, if the two triangles are oriented in different directions, - * the scalar product will be negative. - */ + const Point_ref p0 = get(vpm, target(h, tmesh)); + const Point_ref p1 = get(vpm, target(next(h, tmesh), tmesh)); + const Point_ref p2 = get(vpm, source(h, tmesh)); + const Point_ref p3 = get(vpm, target(next(opposite(h, tmesh), tmesh), tmesh)); -// CGAL::cross_product(p2-p1, p3-p2) * CGAL::cross_product(p0-p3, p1-p0); -// CGAL::cross_product(p1-p0, p1-p2) * CGAL::cross_product(p3-p2, p3-p0); - - const Vector_3 v01 = gt.construct_vector_3_object()(p0, p1); - const Vector_3 v12 = gt.construct_vector_3_object()(p1, p2); - const Vector_3 v23 = gt.construct_vector_3_object()(p2, p3); - const Vector_3 v30 = gt.construct_vector_3_object()(p3, p0); - - const FT p1p3 = gt.compute_scalar_product_3_object()( - gt.construct_cross_product_vector_3_object()(v12, v23), - gt.construct_cross_product_vector_3_object()(v30, v01)); - - const Vector_3 v21 = gt.construct_opposite_vector_3_object()(v12); - const Vector_3 v03 = gt.construct_opposite_vector_3_object()(v30); - - const FT p0p2 = gt.compute_scalar_product_3_object()( - gt.construct_cross_product_vector_3_object()(v01, v21), - gt.construct_cross_product_vector_3_object()(v23, v03)); - - return p0p2 <= p1p3; + const double ap1 = angle(p0,p1,p2); + const double ap3 = angle(p2,p3,p0); + return (ap1 + ap3 > 180); } template From 92bd00f61220952ef99e66db98fbd2d4b55b8806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 16 Dec 2022 16:26:43 +0100 Subject: [PATCH 14/60] Change PMP::refine() is_flippable criterion The current criterion is some kind of Delaunay ball, which might work OK for flat regions, but can produce super thin wedges (see issue: https://github.com/CGAL/cgal/issues/6982) when the mesh is not flat. The criterion used instead is the one used in PMP::isotropic_remeshing and PMP::remove_almost_degenerate_faces(), which is the typical angle-based surface Delaunay criterion. --- .../internal/refine_impl.h | 43 ++++++++++++++----- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h index 54369aee910..d71fe960a1a 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h @@ -15,12 +15,6 @@ #include - -#include -#include -#include -#include - #include #ifdef CGAL_PMP_FAIR_DEBUG #include @@ -30,8 +24,14 @@ #include #include #include +#include #include +#include +#include +#include +#include + namespace CGAL { namespace Polygon_mesh_processing { @@ -49,15 +49,28 @@ class Refine_Polyhedron_3 { typedef Halfedge_around_face_circulator Halfedge_around_facet_circulator; typedef Halfedge_around_target_circulator Halfedge_around_vertex_circulator; + typedef typename CGAL::Kernel_traits::type Traits; + private: PolygonMesh& pmesh; VertexPointMap vpmap; + Traits traits = {}; - bool flippable(halfedge_descriptor h) { + bool flippable(halfedge_descriptor h) + { // this check is added so that edge flip does not break manifoldness // it might happen when there is an edge where flip_edge(h) will be placed (i.e. two edges collide after flip) vertex_descriptor v_tip_0 = target(next(h,pmesh),pmesh); vertex_descriptor v_tip_1 = target(next(opposite(h,pmesh),pmesh),pmesh); + +#ifdef CGAL_PMP_REFINE_DEBUG_PP + std::cout << "flippable() " << h << std::endl; + std::cout << "\t" << source(h, pmesh) << ": " << pmesh.point(source(h, pmesh)) << std::endl; + std::cout << "\t" << target(h, pmesh) << ": " << pmesh.point(target(h, pmesh)) << std::endl; + std::cout << "\t" << v_tip_0 << ": " << pmesh.point(v_tip_0) << std::endl; + std::cout << "\t" << v_tip_1 << ": " << pmesh.point(v_tip_1) << std::endl; +#endif + Halfedge_around_vertex_circulator v_cir(next(h,pmesh), pmesh), v_end(v_cir); do { if(target(opposite(*v_cir, pmesh),pmesh) == v_tip_1) { return false; } @@ -74,13 +87,21 @@ private: bool relax(halfedge_descriptor h) { +#ifdef CGAL_PMP_REFINE_DEBUG_PP typedef typename boost::property_traits::reference Point_3_ref; - Point_3_ref p = get(vpmap, target(h,pmesh)); - Point_3_ref q = get(vpmap, target(opposite(h,pmesh),pmesh)); + Point_3_ref p = get(vpmap, source(h,pmesh)); + Point_3_ref q = get(vpmap, target(h,pmesh)); Point_3_ref r = get(vpmap, target(next(h,pmesh),pmesh)); Point_3_ref s = get(vpmap, target(next(opposite(h,pmesh),pmesh),pmesh)); - if( (CGAL::ON_UNBOUNDED_SIDE != CGAL::side_of_bounded_sphere(p,q,r,s)) || - (CGAL::ON_UNBOUNDED_SIDE != CGAL::side_of_bounded_sphere(p,q,s,r)) ) + + std::cout << "relax() " << h << std::endl; + std::cout << "\t" << source(h, pmesh) << ": " << p << std::endl; + std::cout << "\t" << target(h, pmesh) << ": " << q << std::endl; + std::cout << "\t" << target(next(h,pmesh),pmesh) << ": " << r << std::endl; + std::cout << "\t" << target(next(opposite(h,pmesh),pmesh),pmesh) << ": " << s << std::endl; +#endif + + if(internal::should_flip(edge(h, pmesh), pmesh, vpmap, traits)) { if(flippable(h)) { Euler::flip_edge(h,pmesh); From 70efea3bcb312c54f40635a67bdf40980b444f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 16 Dec 2022 16:28:53 +0100 Subject: [PATCH 15/60] Tiny code modernization --- .../CGAL/Polygon_mesh_processing/internal/refine_impl.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h index d71fe960a1a..06ddc868f0d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/refine_impl.h @@ -259,8 +259,7 @@ private: Halfedge_around_face_circulator circ(halfedge(fd,pmesh),pmesh), done(circ); do { vertex_descriptor v = target(*circ,pmesh); - std::pair::iterator, bool> v_insert - = scale_attribute.insert(std::make_pair(v, 0)); + auto v_insert = scale_attribute.emplace(v, 0); if(!v_insert.second) { continue; } // already calculated v_insert.first->second = average_length(v, interior_map, accept_internal_facets); } while(++circ != done); From 5e101566fb6920674a52f5e31f5355745f1b280b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Mon, 2 Jan 2023 10:34:27 +0100 Subject: [PATCH 16/60] Remove obsolete typedefs --- .../include/CGAL/Polygon_mesh_processing/repair_degeneracies.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h index c727b9c360f..e9afa43b78c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h @@ -302,9 +302,7 @@ bool should_flip(typename boost::graph_traits::edge_descriptor e, { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; - typedef typename Traits::FT FT; typedef typename boost::property_traits::reference Point_ref; - typedef typename Traits::Vector_3 Vector_3; CGAL_precondition(!is_border(e, tmesh)); From 8c0d5bd59bd858e58db6e1983f5222221edb7665 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 13 Jan 2023 10:48:28 +0000 Subject: [PATCH 17/60] Largest_empty_iso_rectangle: Improve Demo --- .../Largest_empty_rectangle_2.cpp | 48 ++++++++++++++++++- .../Largest_empty_rectangle_2.ui | 8 +++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp b/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp index 012ef71d3e5..67e4f336075 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp +++ b/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.cpp @@ -98,6 +98,8 @@ public Q_SLOTS: void on_actionClear_triggered(); + void on_actionOpen_triggered(); + void processInput(CGAL::Object); void on_actionRecenter_triggered(); @@ -105,7 +107,7 @@ public Q_SLOTS: void on_actionGeneratePointsInSquare_triggered(); void on_actionGeneratePointsInDisc_triggered(); void clear(); - + void open(QString fileName); void update_largest_empty_rectangle(); Q_SIGNALS: @@ -229,6 +231,50 @@ MainWindow::on_actionClear_triggered() Q_EMIT( changed()); } +void +MainWindow::on_actionOpen_triggered() +{ + QString fileName = QFileDialog::getOpenFileName(this, + tr("Open points file"), + "." + ,tr("xy files (*.xy)") + ); + if(! fileName.isEmpty()){ + open(fileName); + } + +} + +void +MainWindow::open(QString fileName) +{ + // wait cursor + QApplication::setOverrideCursor(Qt::WaitCursor); + std::ifstream ifs(qPrintable(fileName)); + + clear(); + + Point_2 p; + while(ifs >> p){ + points.push_back(p); + } + + CGAL::Bbox_2 bbox = CGAL::bbox_2(points.begin(), points.end()); + square = Iso_rectangle_2(bbox); + + ler = Largest_empty_iso_rectangle_2(square); + ler.insert(points.begin(), points.end()); + + frame[0]->setLine(convert(Segment_2(square.vertex(0),square.vertex(1)))); + frame[1]->setLine(convert(Segment_2(square.vertex(1), square.vertex(2)))); + frame[2]->setLine(convert(Segment_2(square.vertex(2), square.vertex(3)))); + frame[3]->setLine(convert(Segment_2(square.vertex(3), square.vertex(0)))); + + QApplication::restoreOverrideCursor(); + on_actionRecenter_triggered(); + Q_EMIT( changed()); +} + void MainWindow::on_actionRecenter_triggered() { diff --git a/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.ui b/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.ui index 19c46f07374..a6ddf170ca2 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.ui +++ b/GraphicsView/demo/Largest_empty_rect_2/Largest_empty_rectangle_2.ui @@ -80,7 +80,7 @@ 0 0 500 - 26 + 22 @@ -90,6 +90,7 @@ + @@ -199,6 +200,11 @@ Generate Segment Fans + + + Open + + From 6a7bd8b0e3f34961ebfd8cb3eb8e884eb6ad3714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 16 Jan 2023 19:46:01 +0100 Subject: [PATCH 18/60] fix angle return type --- .../CGAL/Polygon_mesh_processing/repair_degeneracies.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h index e9afa43b78c..9704b52c32d 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h @@ -315,9 +315,9 @@ bool should_flip(typename boost::graph_traits::edge_descriptor e, const Point_ref p2 = get(vpm, source(h, tmesh)); const Point_ref p3 = get(vpm, target(next(opposite(h, tmesh), tmesh), tmesh)); - const double ap1 = angle(p0,p1,p2); - const double ap3 = angle(p2,p3,p0); - return (ap1 + ap3 > 180); + const typename Traits::FT ap1 = to_double(angle(p0,p1,p2)); + const typename Traits::FT ap3 = to_double(angle(p2,p3,p0)); + return (ap1 + ap3 > typename Traits::FT(180.)); } template From d67d7cd4b6881bd4912632c67540e86f3a249b72 Mon Sep 17 00:00:00 2001 From: Mael Date: Wed, 18 Jan 2023 11:15:17 +0100 Subject: [PATCH 19/60] Remove extra `to_double` --- .../CGAL/Polygon_mesh_processing/repair_degeneracies.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h index 9704b52c32d..d681d530337 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h @@ -302,6 +302,7 @@ bool should_flip(typename boost::graph_traits::edge_descriptor e, { typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename Traits:: FT FT; typedef typename boost::property_traits::reference Point_ref; CGAL_precondition(!is_border(e, tmesh)); @@ -315,9 +316,9 @@ bool should_flip(typename boost::graph_traits::edge_descriptor e, const Point_ref p2 = get(vpm, source(h, tmesh)); const Point_ref p3 = get(vpm, target(next(opposite(h, tmesh), tmesh), tmesh)); - const typename Traits::FT ap1 = to_double(angle(p0,p1,p2)); - const typename Traits::FT ap3 = to_double(angle(p2,p3,p0)); - return (ap1 + ap3 > typename Traits::FT(180.)); + const FT ap1 = angle(p0,p1,p2); + const FT ap3 = angle(p2,p3,p0); + return (ap1 + ap3 > FT(180)); } template From 6a2932b8d279bac30777b1a206807714c0290c85 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 25 Jan 2023 15:42:54 +0000 Subject: [PATCH 20/60] LCC: Add an incremental builder --- .../doc/Linear_cell_complex/PackageDescription.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt index 42da9fd9276..975b4a3f053 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt @@ -63,6 +63,7 @@ - `CGAL::Cell_attribute_with_point` - `CGAL::Cell_attribute_with_point_and_id` - `CGAL::Linear_cell_complex` +- `CGAL::Linear_cell_complex_incremental_builder_3` \cgalCRPSection{Global Functions} \cgalCRPSubsection{Constructions for Linear Cell Complex} @@ -78,4 +79,3 @@ - \link PkgDrawLinearCellComplex CGAL::draw() \endlink */ - From ac00c68f38219572b191508fbcea1abfd6933563 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 25 Jan 2023 16:06:13 +0000 Subject: [PATCH 21/60] Add file --- .../Linear_cell_complex_incremental_builder.h | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h new file mode 100644 index 00000000000..771b00fa46a --- /dev/null +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h @@ -0,0 +1,94 @@ + +namespace CGAL { + +/*! +\ingroup PkgLinearCellComplexClasses + +The auxiliary class `Linear_cell_complex_incremental_builder` supports the incremental +construction of linear cell complexes. + +\tparam LCC a linear cell complex +*/ + +template < class LCC > +class Linear_cell_complex_incremental_builder_3 +{ + typedef LCC_ LCC; + typedef typename LCC::Dart_descriptor DH; + typedef typename LCC::Vertex_attribute_descriptor VAH; + typedef typename LCC::Point Point_3; + typedef typename LCC::size_type size_type; + + /// \name Creation + /// @{ + + /*! + * Constructor + */ + Linear_cell_complex_incremental_builder_3(LCC & alcc); + +/// @} + + /*! +\name Surface Creation + +To build a linear cell complex, the following regular expression gives +the correct and allowed order and nesting of method calls from this +section: + +\code +begin_surface ( add_vertex | ( begin_facet add_vertex_to_facet end_facet ) ) end_surface +\endcode +*/ +/// @{ + + + /*! + * + */ + void begin_surface(); + + + /*! + * adds a new vertex for `p` and returns its handle. + */ + VAH add_vertex(const Point_3& p); + + /* + * starts a new facet and returns its handle. + */ + void begin_facet(); + + /*! + * + */ + void add_vertex_to_facet(size_type i); + + /*! + * End of the facet. Returns the first dart of this facet. + */ + DH end_facet(); + + + /*! + * End of the surface construction. Returns one dart of the created surface. + */ + DH end_surface(); + +/// @} + +/// \name Additional Operations +/// @{ + +/*! + * is a synonym for `begin_facet()`, a call to `add_vertex_to_facet()` for each + * value in the range `[first,beyond)`, and a call to `end_facet()`. + */ + DH add_facet(std::initializer_list l); + + +/// @} + + }; + +} // namespace CGAL From d6e5e22ce10760f69240a39e1e2eb52534edaef8 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 25 Jan 2023 16:15:40 +0000 Subject: [PATCH 22/60] No _3 --- .../doc/Linear_cell_complex/PackageDescription.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt index 975b4a3f053..f6ba76d90be 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt @@ -63,7 +63,7 @@ - `CGAL::Cell_attribute_with_point` - `CGAL::Cell_attribute_with_point_and_id` - `CGAL::Linear_cell_complex` -- `CGAL::Linear_cell_complex_incremental_builder_3` +- `CGAL::Linear_cell_complex_incremental_builder` \cgalCRPSection{Global Functions} \cgalCRPSubsection{Constructions for Linear Cell Complex} From 217a65bfba83027c1fb47688b9397550b61849e9 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 25 Jan 2023 16:25:58 +0000 Subject: [PATCH 23/60] Make public: --- .../CGAL/Linear_cell_complex_incremental_builder.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h index 771b00fa46a..8f19ee07783 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h @@ -13,6 +13,7 @@ construction of linear cell complexes. template < class LCC > class Linear_cell_complex_incremental_builder_3 { + public: typedef LCC_ LCC; typedef typename LCC::Dart_descriptor DH; typedef typename LCC::Vertex_attribute_descriptor VAH; From 17b86d5536932e482d5a5c12bfd43eadbd712a7f Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 25 Jan 2023 16:32:19 +0000 Subject: [PATCH 24/60] Another _3 --- .../CGAL/Linear_cell_complex_incremental_builder.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h index 8f19ee07783..9663a9693c3 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h @@ -11,7 +11,7 @@ construction of linear cell complexes. */ template < class LCC > -class Linear_cell_complex_incremental_builder_3 +class Linear_cell_complex_incremental_builder { public: typedef LCC_ LCC; @@ -26,7 +26,7 @@ class Linear_cell_complex_incremental_builder_3 /*! * Constructor */ - Linear_cell_complex_incremental_builder_3(LCC & alcc); + Linear_cell_complex_incremental_builder(LCC & alcc); /// @} From d671f6069a18a47f9320cabcdd1a1d2c2618a3ef Mon Sep 17 00:00:00 2001 From: Bishwash Khanal <43448240+bkhanal-11@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:04:44 +0545 Subject: [PATCH 25/60] added user input --- .../polyfit_example_model_complexity_control.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexity_control.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexity_control.cpp index e132d62975d..cf1ce77b8b1 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexity_control.cpp +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_model_complexity_control.cpp @@ -39,9 +39,9 @@ typedef CGAL::Nth_of_tuple_property_map<2, PNI> * candidate generation are cached and reused. */ -int main() +int main(int argc, char* argv[]) { - const std::string& input_file(CGAL::data_file_path("points_3/building.ply")); + const std::string input_file = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/building.ply"); std::ifstream input_stream(input_file.c_str()); std::vector points; // store points From c7aac265f5c7e06e8d12ac03f483b87ab115b84e Mon Sep 17 00:00:00 2001 From: Bishwash Khanal <43448240+bkhanal-11@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:05:45 +0545 Subject: [PATCH 26/60] added user input --- .../polyfit_example_user_provided_planes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp index 2f2ed2df2c9..5db8d3f3700 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_user_provided_planes.cpp @@ -39,9 +39,9 @@ typedef CGAL::Nth_of_tuple_property_map<2, PNI> * the point is not assigned to a plane). */ -int main() +int main(int argc, char* argv[]) { - const std::string& input_file(CGAL::data_file_path("points_3/ball.ply")); + const std::string input_file = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/ball.ply"); std::ifstream input_stream(input_file.c_str()); std::vector points; // store points From 5fb7ad3b999aef665f3788ec88ff282a2c6ff3e7 Mon Sep 17 00:00:00 2001 From: Bishwash Khanal <43448240+bkhanal-11@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:07:25 +0545 Subject: [PATCH 27/60] added user input --- .../polyfit_example_with_region_growing.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp index 493c8c138aa..530d1422de4 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_with_region_growing.cpp @@ -83,13 +83,13 @@ private: * the surface model from the planes. */ -int main() +int main(int argc, char* argv[]) { Point_vector points; // Load point set from a file. - const std::string input_file(CGAL::data_file_path("points_3/cube.pwn")); - std::ifstream input_stream(input_file.c_str()); + const std::string input_file = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/cube.pwn"); + std::ifstream input_stream(input_file.c_str()); if (input_stream.fail()) { std::cerr << "Failed open file \'" << input_file << "\'" << std::endl; return EXIT_FAILURE; From 63cead9d2bade3bc659822bff890c3b07667b320 Mon Sep 17 00:00:00 2001 From: Bishwash Khanal <43448240+bkhanal-11@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:08:22 +0545 Subject: [PATCH 28/60] added user input --- .../polyfit_example_without_input_planes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp index 4b2ed8f91a4..d14411babd1 100644 --- a/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp +++ b/Polygonal_surface_reconstruction/examples/Polygonal_surface_reconstruction/polyfit_example_without_input_planes.cpp @@ -52,13 +52,13 @@ typedef CGAL::Surface_mesh * the surface model from the planes. */ -int main() +int main(int argc, char* argv[]) { Point_vector points; // Loads point set from a file. - const std::string input_file(CGAL::data_file_path("points_3/cube.pwn")); - std::ifstream input_stream(input_file.c_str()); + const std::string input_file = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/cube.pwn"); + std::ifstream input_stream(input_file.c_str()); if (input_stream.fail()) { std::cerr << "failed open file \'" < Date: Fri, 27 Jan 2023 13:37:34 +0000 Subject: [PATCH 29/60] Largest Empty Iso Rectangle: Ignore points on the border --- .../Inscribed_areas/CGAL/Largest_empty_iso_rectangle_2.h | 6 ++++-- .../examples/Inscribed_areas/largest_empty_rectangle.cpp | 3 +-- .../include/CGAL/Largest_empty_iso_rectangle_2.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Inscribed_areas/doc/Inscribed_areas/CGAL/Largest_empty_iso_rectangle_2.h b/Inscribed_areas/doc/Inscribed_areas/CGAL/Largest_empty_iso_rectangle_2.h index f11af4ccdf1..080fc203bfb 100644 --- a/Inscribed_areas/doc/Inscribed_areas/CGAL/Largest_empty_iso_rectangle_2.h +++ b/Inscribed_areas/doc/Inscribed_areas/CGAL/Largest_empty_iso_rectangle_2.h @@ -142,9 +142,11 @@ Iso_rectangle_2 get_bounding_box(); /// @{ /*! -Inserts point `p` in the point set, if it is not already in the set. +Inserts point `p` in the point set, if it is not already in the set +and on the bounded side of the bounding rectangle. +\note Points on the boundary can be ignored as they lead to the same result. */ -void +bool insert(const Point_2& p); /*! diff --git a/Inscribed_areas/examples/Inscribed_areas/largest_empty_rectangle.cpp b/Inscribed_areas/examples/Inscribed_areas/largest_empty_rectangle.cpp index 5128e958d84..bbf8989b7b8 100644 --- a/Inscribed_areas/examples/Inscribed_areas/largest_empty_rectangle.cpp +++ b/Inscribed_areas/examples/Inscribed_areas/largest_empty_rectangle.cpp @@ -1,8 +1,7 @@ #include -#include #include -#include +#include typedef double Number_Type; typedef CGAL::Simple_cartesian K; diff --git a/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h b/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h index 382c80e2c0b..b82f038bae1 100644 --- a/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h +++ b/Inscribed_areas/include/CGAL/Largest_empty_iso_rectangle_2.h @@ -762,7 +762,7 @@ bool Largest_empty_iso_rectangle_2::insert(const Point_2& _p) { // check that the point is inside the bounding box - if(bbox_p.has_on_unbounded_side(_p)) { + if(! bbox_p.has_on_bounded_side(_p)) { return(false); } From ab2a655a53dd0ff1b78cddba726171bc3421c47e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 30 Jan 2023 13:44:08 +0000 Subject: [PATCH 30/60] Fixes after Guillaume's review --- .../doc/Linear_cell_complex/PackageDescription.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt index f6ba76d90be..5978b48c317 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt @@ -62,7 +62,6 @@ - `CGAL::Linear_cell_complex_traits` - `CGAL::Cell_attribute_with_point` - `CGAL::Cell_attribute_with_point_and_id` -- `CGAL::Linear_cell_complex` - `CGAL::Linear_cell_complex_incremental_builder` \cgalCRPSection{Global Functions} From 54245a754ff3c96cb132f9db35ab07a4a9801f5c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 30 Jan 2023 14:38:31 +0000 Subject: [PATCH 31/60] Add example --- .../doc/Linear_cell_complex/examples.txt | 1 + .../Linear_cell_complex/CMakeLists.txt | 1 + ...ear_cell_complex_3_incremental_builder.cpp | 58 +++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp diff --git a/Linear_cell_complex/doc/Linear_cell_complex/examples.txt b/Linear_cell_complex/doc/Linear_cell_complex/examples.txt index f41e9b41af0..4f178f666d1 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/examples.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/examples.txt @@ -3,5 +3,6 @@ \example Linear_cell_complex/linear_cell_complex_3.cpp \example Linear_cell_complex/linear_cell_complex_4.cpp \example Linear_cell_complex/linear_cell_complex_3_attributes_management.cpp +\example Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp \example Linear_cell_complex/draw_linear_cell_complex.cpp */ diff --git a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt index 1ee1208d461..27f68625fc3 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt @@ -21,6 +21,7 @@ create_single_source_cgal_program("linear_cell_complex_3_operations.cpp") create_single_source_cgal_program( "linear_cell_complex_3_with_colored_vertices.cpp") create_single_source_cgal_program("linear_cell_complex_3_with_mypoint.cpp") +create_single_source_cgal_program("linear_cell_complex_3_incremntal_builder.cpp") create_single_source_cgal_program("linear_cell_complex_4.cpp") create_single_source_cgal_program("plane_graph_to_lcc_2.cpp") create_single_source_cgal_program("voronoi_2.cpp") diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp new file mode 100644 index 00000000000..6ad599abb91 --- /dev/null +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp @@ -0,0 +1,58 @@ +#include +#include +#include + +typedef CGAL::Linear_cell_complex_for_combinatorial_map<3, 3> LCC_3; +using Point=LCC_3::Point; + +//============================================================================== +int main() +{ + LCC_3 lcc; + CGAL::Linear_cell_complex_incremental_builder_3 ib(lcc); + + ib.add_vertex(Point(0,0,0)); // vertex 0 + ib.add_vertex(Point(1,0,0)); // vertex 1 + ib.add_vertex(Point(1,1,0)); // vertex 2 + ib.add_vertex(Point(0,1,0)); // vertex 3 + + ib.add_vertex(Point(0,1,1)); // vertex 4 + ib.add_vertex(Point(0,0,1)); // vertex 5 + ib.add_vertex(Point(1,0,1)); // vertex 6 + ib.add_vertex(Point(1,1,1)); // vertex 7 + + // Create a cube + ib.begin_surface(); + ib.add_facet({0,1,2,3}); // Create a new facet v1: given all of its indices + ib.add_facet({1,0,5,6}); + ib.add_facet({2,1,6,7}); + ib.add_facet({3,2,7,4}); + + ib.begin_facet(); // Create a new facet v2: begin facet + ib.add_vertex_to_facet(0); // all incrementally its indices + ib.add_vertex_to_facet(3); + ib.add_vertex_to_facet(4); + ib.add_vertex_to_facet(5); + ib.end_facet(); // end facet + + ib.add_facet({5,4,7,6}); + + ib.end_surface(); + + ib.add_vertex(Point(-1, 0.5, 0.5)); // vertex 8 + + // Create a pyramid, sharing one of its face with the cube + ib.begin_surface(); + ib.add_facet({3,0,5,4}); + ib.add_facet({0,3,8}); + ib.add_facet({3,4,8}); + ib.add_facet({4,5,8}); + ib.add_facet({5,0,8}); + ib.end_surface(); + + // Draw the lcc and display its characteristics + lcc.display_characteristics(std::cout)< Date: Mon, 30 Jan 2023 15:03:53 +0000 Subject: [PATCH 32/60] Fix CMakeLists.txt --- .../examples/Linear_cell_complex/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt index 27f68625fc3..d0ed1c3a028 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt @@ -21,7 +21,7 @@ create_single_source_cgal_program("linear_cell_complex_3_operations.cpp") create_single_source_cgal_program( "linear_cell_complex_3_with_colored_vertices.cpp") create_single_source_cgal_program("linear_cell_complex_3_with_mypoint.cpp") -create_single_source_cgal_program("linear_cell_complex_3_incremntal_builder.cpp") +create_single_source_cgal_program("linear_cell_complex_3_incremental_builder.cpp") create_single_source_cgal_program("linear_cell_complex_4.cpp") create_single_source_cgal_program("plane_graph_to_lcc_2.cpp") create_single_source_cgal_program("voronoi_2.cpp") @@ -30,4 +30,5 @@ create_single_source_cgal_program("voronoi_3.cpp") create_single_source_cgal_program("draw_linear_cell_complex.cpp") if(CGAL_Qt5_FOUND) target_link_libraries(draw_linear_cell_complex PUBLIC CGAL::CGAL_Basic_viewer) + target_link_libraries(linear_cell_complex_3_incremental_builder PUBLIC CGAL::CGAL_Basic_viewer) endif() From 5270bbfdc703796c71af592105e5dac91b922b81 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 30 Jan 2023 15:09:58 +0000 Subject: [PATCH 33/60] trailing whitespace --- .../linear_cell_complex_3_incremental_builder.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp index 6ad599abb91..1e16e5efdec 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp @@ -10,7 +10,7 @@ int main() { LCC_3 lcc; CGAL::Linear_cell_complex_incremental_builder_3 ib(lcc); - + ib.add_vertex(Point(0,0,0)); // vertex 0 ib.add_vertex(Point(1,0,0)); // vertex 1 ib.add_vertex(Point(1,1,0)); // vertex 2 @@ -34,13 +34,13 @@ int main() ib.add_vertex_to_facet(4); ib.add_vertex_to_facet(5); ib.end_facet(); // end facet - + ib.add_facet({5,4,7,6}); - + ib.end_surface(); ib.add_vertex(Point(-1, 0.5, 0.5)); // vertex 8 - + // Create a pyramid, sharing one of its face with the cube ib.begin_surface(); ib.add_facet({3,0,5,4}); @@ -48,11 +48,11 @@ int main() ib.add_facet({3,4,8}); ib.add_facet({4,5,8}); ib.add_facet({5,0,8}); - ib.end_surface(); + ib.end_surface(); // Draw the lcc and display its characteristics lcc.display_characteristics(std::cout)< Date: Tue, 31 Jan 2023 08:36:31 +0000 Subject: [PATCH 34/60] Polygon: Fix erase(Vertex_circulator) --- Polygon/include/CGAL/Polygon_2.h | 7 +++++-- Polygon/test/Polygon/issue7228.cpp | 29 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 Polygon/test/Polygon/issue7228.cpp diff --git a/Polygon/include/CGAL/Polygon_2.h b/Polygon/include/CGAL/Polygon_2.h index 987215691ac..9920d8f25f4 100644 --- a/Polygon/include/CGAL/Polygon_2.h +++ b/Polygon/include/CGAL/Polygon_2.h @@ -238,8 +238,11 @@ class Polygon_2 { /// Erases the vertex pointed to by `i`. Vertex_circulator erase(Vertex_circulator i) { - return Vertex_circulator(&d_container, - d_container.erase(i.mod_iterator())); + auto it = d_container.erase(i.mod_iterator()); + if(it == d_container.end()){ + it = d_container.begin(); + } + return Vertex_circulator(&d_container, it); } /// Erases the vertices in the range `[first, last)`. diff --git a/Polygon/test/Polygon/issue7228.cpp b/Polygon/test/Polygon/issue7228.cpp new file mode 100644 index 00000000000..2740f7afa42 --- /dev/null +++ b/Polygon/test/Polygon/issue7228.cpp @@ -0,0 +1,29 @@ +#include +#include + +#include +#include +#include + +typedef CGAL::Simple_cartesian K; +typedef K::Point_2 Point; +typedef CGAL::Polygon_2 Polygon; +typedef Polygon::Vertex_circulator Vertex_circulator; + +int main() +{ + std::array points = { Point(0,0), Point(1,0), Point(1,1), Point(0,1) }; + Polygon poly(points.begin(), points.end()); + + Vertex_circulator vc = poly.vertices_circulator(); + + ++vc; + ++vc; + ++vc; + + vc = poly.erase(vc); + + assert(*vc == Point(0,0)); + + return 0; +} From 5797ddb48c7820ec4b3c75744ad7b5e807600579 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 31 Jan 2023 10:10:03 +0000 Subject: [PATCH 35/60] Add _3 suffix and add example to the User Manual --- ...near_cell_complex_incremental_builder_3.h} | 6 ++--- .../Linear_cell_complex.txt | 16 +++++++++++++- .../PackageDescription.txt | 2 +- ...ear_cell_complex_3_incremental_builder.cpp | 2 +- ...near_cell_complex_incremental_builder_3.h} | 22 +++++++++---------- 5 files changed, 31 insertions(+), 17 deletions(-) rename Linear_cell_complex/doc/Linear_cell_complex/CGAL/{Linear_cell_complex_incremental_builder.h => Linear_cell_complex_incremental_builder_3.h} (89%) rename Linear_cell_complex/include/CGAL/{Linear_cell_complex_incremental_builder.h => Linear_cell_complex_incremental_builder_3.h} (93%) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h similarity index 89% rename from Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h rename to Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h index 9663a9693c3..863369c04b5 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h @@ -4,14 +4,14 @@ namespace CGAL { /*! \ingroup PkgLinearCellComplexClasses -The auxiliary class `Linear_cell_complex_incremental_builder` supports the incremental +The auxiliary class `Linear_cell_complex_incremental_builder_3` supports the incremental construction of linear cell complexes. \tparam LCC a linear cell complex */ template < class LCC > -class Linear_cell_complex_incremental_builder +class Linear_cell_complex_incremental_builder_3 { public: typedef LCC_ LCC; @@ -26,7 +26,7 @@ class Linear_cell_complex_incremental_builder /*! * Constructor */ - Linear_cell_complex_incremental_builder(LCC & alcc); + Linear_cell_complex_incremental_builder_3(LCC & alcc); /// @} diff --git a/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt b/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt index 925e269a738..fcb11828b2a 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt @@ -141,6 +141,14 @@ Some examples of use of these operations are given in Section \ref ssec5dexample If \link GenericMap::set_automatic_attributes_management `set_automatic_attributes_management(false)`\endlink is called, all the future insertion or removal operations will not update non void attributes. These attributes will be updated latter by the call to \link GenericMap::set_automatic_attributes_management `set_automatic_attributes_management(true)`\endlink. This can be useful to speed up an algorithm which uses several successive insertion and removal operations. See example \ref ssecAttributesManagement "Automatic attributes management". \cgalAdvancedEnd + +\subsection Linear_cell_complexIncrementalBuilder Incremental Builder + +A utility class `Linear_cell_complex_incremental_builder_3` helps in creating 2D and 3D linear cell complexes +from a list of points followed by a list of facets that are represented as indices into the point list. +Note that, compared to `Polyhedron_incremental_builder_3` it has only absolute indexing and no rollback +mechanism. + \section Linear_cell_complexExamples Examples \subsection Linear_cell_complexA3DLinearCellComplex A 3D Linear Cell Complex @@ -264,10 +272,16 @@ Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt5 Result of the run of the draw_linear_cell_complex program. A window shows two 3D cubes and allows to navigate through the 3D scene. \cgalFigureEnd +\subsection Linear_cell_complexIncrementalBuilderExample Incremental Builder + +The following example shows the incremental builder + +\cgalExample{Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp} + + \section Linear_cell_complexDesign Design and Implementation History This package was developed by Guillaume Damiand, with the help of Andreas Fabri, Sébastien Loriot and Laurent Rineau. Monique Teillaud and Bernd Gärtner contributed to the manual. */ } /* namespace CGAL */ - diff --git a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt index 5978b48c317..d8cc1ad2fbd 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/PackageDescription.txt @@ -62,7 +62,7 @@ - `CGAL::Linear_cell_complex_traits` - `CGAL::Cell_attribute_with_point` - `CGAL::Cell_attribute_with_point_and_id` -- `CGAL::Linear_cell_complex_incremental_builder` +- `CGAL::Linear_cell_complex_incremental_builder_3` \cgalCRPSection{Global Functions} \cgalCRPSubsection{Constructions for Linear Cell Complex} diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp index 1e16e5efdec..9bcbb86a5ca 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include typedef CGAL::Linear_cell_complex_for_combinatorial_map<3, 3> LCC_3; diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_incremental_builder.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_incremental_builder_3.h similarity index 93% rename from Linear_cell_complex/include/CGAL/Linear_cell_complex_incremental_builder.h rename to Linear_cell_complex/include/CGAL/Linear_cell_complex_incremental_builder_3.h index 087b3da7944..8efa806a91e 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_incremental_builder.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_incremental_builder_3.h @@ -9,8 +9,8 @@ // // Author(s) : Guillaume Damiand // -#ifndef CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_H -#define CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_H 1 +#ifndef CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_3_H +#define CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_3_H 1 #include #include @@ -127,7 +127,7 @@ struct Find_opposite_2_with_control { if (!lcc.template is_free<2>(res)) { // Here a dart vah1->vah2 already exists, and it was already 2-sewn. - std::cerr<<"ERROR in My_linear_cell_complex_incremental_builder_3: try to use a same oriented edge twice."< vertex_to_dart_map_in_surface, vah2, vah1)!=lcc.null_descriptor) { // Here a dart vah1->vah2 already exists (but it was not already 2-sewn). - std::cerr<<"ERROR in My_linear_cell_complex_incremental_builder_3: try to use a same oriented edge twice."< { if (!lcc.template is_free<2>(res)) { // Here a dart vah1->vah2 already exists, and it was already 2-sewn. - std::cerr<<"ERROR in My_linear_cell_complex_incremental_builder_3: try to use a same oriented edge twice."< }; /////////////////////////////////////////////////////////////////////////////// template -struct Sew3_for_LCC_incremental_builder +struct Sew3_for_LCC_incremental_builder_3 { static void run(LCC_& lcc, typename LCC_::Dart_descriptor dh1, typename LCC_::Dart_descriptor dh2) @@ -218,8 +218,8 @@ struct Sew3_for_LCC_incremental_builder { if(!lcc.template is_free<3>(dh1)) { - std::cerr<<"ERROR in My_linear_cell_complex_incremental_builder_3: " - <<"it exists more than 2 faces with same indices."<(lcc.other_orientation(dh1), dh2); } @@ -227,7 +227,7 @@ struct Sew3_for_LCC_incremental_builder } }; template -struct Sew3_for_LCC_incremental_builder +struct Sew3_for_LCC_incremental_builder_3 { static void run(LCC_&, typename LCC_::Dart_descriptor, typename LCC_::Dart_descriptor) {} @@ -319,7 +319,7 @@ public: if(LCC::dimension>2) { opposite=opposite_face(); - Sew3_for_LCC_incremental_builder::run(lcc, opposite, min_dart); + Sew3_for_LCC_incremental_builder_3::run(lcc, opposite, min_dart); add_face_in_array(); } return first_dart; @@ -404,5 +404,5 @@ private: } //namespace CGAL -#endif // CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_H // +#endif // CGAL_LINEAR_CELL_COMPLEX_INCREMENTAL_BUILDER_3_H // // EOF // From 4ca40f8e07b4628d80505119e2c25f0ac56bd3c3 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 1 Feb 2023 11:35:19 +0100 Subject: [PATCH 36/60] LCC incremental builder doc --- .../CGAL/Linear_cell_complex_incremental_builder_3.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h index 863369c04b5..383cb47cd40 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h @@ -45,7 +45,7 @@ begin_surface ( add_vertex | ( begin_facet add_vertex_to_facet end_facet ) ) /*! - * + * starts a new surface. */ void begin_surface(); @@ -56,23 +56,23 @@ begin_surface ( add_vertex | ( begin_facet add_vertex_to_facet end_facet ) ) VAH add_vertex(const Point_3& p); /* - * starts a new facet and returns its handle. + * starts a new facet. */ void begin_facet(); /*! - * + * add vertex `i` at the end of the current facet. */ void add_vertex_to_facet(size_type i); /*! - * End of the facet. Returns the first dart of this facet. + * end of the facet. Returns the first dart of this facet. */ DH end_facet(); /*! - * End of the surface construction. Returns one dart of the created surface. + * end of the surface construction. Returns one dart of the created surface. */ DH end_surface(); From f1535c2ae4ed29b3d590e9a57308ff2b65a3d806 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 1 Feb 2023 10:52:31 +0000 Subject: [PATCH 37/60] Unify comments --- .../CGAL/Linear_cell_complex_incremental_builder_3.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h index 383cb47cd40..12525e0cc33 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h @@ -61,18 +61,18 @@ begin_surface ( add_vertex | ( begin_facet add_vertex_to_facet end_facet ) ) void begin_facet(); /*! - * add vertex `i` at the end of the current facet. + * adds vertex `i` at the end of the current facet. */ void add_vertex_to_facet(size_type i); /*! - * end of the facet. Returns the first dart of this facet. + * ends the construction of the facet and returns the first dart of this facet. */ DH end_facet(); /*! - * end of the surface construction. Returns one dart of the created surface. + * ends the construction of the surface and returns one dart of the created surface. */ DH end_surface(); From 612991fa841068cf5e407ed7ed5e3cdf29447636 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 1 Feb 2023 13:08:51 +0100 Subject: [PATCH 38/60] add _3 after LCC incremental builder --- .../include/CGAL/Linear_cell_complex_constructors.h | 2 +- .../test/Linear_cell_complex/LCC_3_incremental_builder_test.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h index c1032854fba..1bdac283a67 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_constructors.h @@ -13,7 +13,7 @@ #define CGAL_LINEAR_CELL_COMPLEX_CONSTRUCTORS_H 1 #include -#include +#include #include #include diff --git a/Linear_cell_complex/test/Linear_cell_complex/LCC_3_incremental_builder_test.cpp b/Linear_cell_complex/test/Linear_cell_complex/LCC_3_incremental_builder_test.cpp index 2569b0f929b..03d6bf55922 100644 --- a/Linear_cell_complex/test/Linear_cell_complex/LCC_3_incremental_builder_test.cpp +++ b/Linear_cell_complex/test/Linear_cell_complex/LCC_3_incremental_builder_test.cpp @@ -1,6 +1,6 @@ #include #include -#include +#include #include #include "Linear_cell_complex_3_test.h" From 1530b0a25d8fee4241964b4b5c1b361b97f4c2ed Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 1 Feb 2023 13:02:03 +0000 Subject: [PATCH 39/60] Traverse the linear cell complex in the example --- .../linear_cell_complex_3_incremental_builder.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp index 9bcbb86a5ca..d05c1c1009f 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp @@ -50,6 +50,20 @@ int main() ib.add_facet({5,0,8}); ib.end_surface(); + + LCC_3::One_dart_per_cell_range<3,3> cells = lcc.one_dart_per_cell<3>(); + for (auto c = cells.begin(); c != cells.end(); ++c) { + std::cout << "a cell"<< std::endl; + LCC_3::One_dart_per_incident_cell_range<2,3> faces = lcc.one_dart_per_incident_cell<2,3>(c); + for (auto f = faces.begin(); f != faces.end(); ++f) { + std::cout << " a face"<< std::endl; + LCC_3::One_dart_per_incident_cell_range<0,2> vertices = lcc.one_dart_per_incident_cell<0,2>(f); + for(auto v = vertices.begin(); v!= vertices.end(); ++v){ + std::cout << " " << lcc.point(v) << std::endl; + } + } + } + // Draw the lcc and display its characteristics lcc.display_characteristics(std::cout)< Date: Thu, 2 Feb 2023 08:00:29 +0000 Subject: [PATCH 40/60] Fix doc --- .../CGAL/Linear_cell_complex_incremental_builder_3.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h index 12525e0cc33..f231dbf323e 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h @@ -7,7 +7,7 @@ namespace CGAL { The auxiliary class `Linear_cell_complex_incremental_builder_3` supports the incremental construction of linear cell complexes. -\tparam LCC a linear cell complex +\tparam LCC must be a model of the concept `LinearCellComplex` */ template < class LCC > @@ -40,6 +40,10 @@ section: \code begin_surface ( add_vertex | ( begin_facet add_vertex_to_facet end_facet ) ) end_surface \endcode + +When an edge is added in a facet, if the same edge exists in another facet of the same surface, then the two facets are glued along this edge. + +When a facet is added, if the same facet exists in another surface, the two surfaces are glued along this facet. */ /// @{ From 7b3fd28dac67f2319145a94f6e6d77b9013d657e Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Thu, 2 Feb 2023 12:31:35 +0100 Subject: [PATCH 41/60] missing dot --- .../doc/Linear_cell_complex/Linear_cell_complex.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt b/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt index fcb11828b2a..6eae9275a75 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt @@ -274,7 +274,7 @@ Result of the run of the draw_linear_cell_complex program. A window shows two 3D \subsection Linear_cell_complexIncrementalBuilderExample Incremental Builder -The following example shows the incremental builder +The following example shows the incremental builder. \cgalExample{Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp} From a0826b492942970ca9184ba475f4e9c6e688684f Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Thu, 2 Feb 2023 12:31:53 +0100 Subject: [PATCH 42/60] update documentation in example --- .../linear_cell_complex_3_incremental_builder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp index d05c1c1009f..2c53a5dfb6d 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp @@ -23,13 +23,13 @@ int main() // Create a cube ib.begin_surface(); - ib.add_facet({0,1,2,3}); // Create a new facet v1: given all of its indices + ib.add_facet({0,1,2,3}); // Create a new facet version 1: given all of its indices ib.add_facet({1,0,5,6}); ib.add_facet({2,1,6,7}); ib.add_facet({3,2,7,4}); - ib.begin_facet(); // Create a new facet v2: begin facet - ib.add_vertex_to_facet(0); // all incrementally its indices + ib.begin_facet(); // Create a new facet version 2: begin facet + ib.add_vertex_to_facet(0); // add sucessively its indices ib.add_vertex_to_facet(3); ib.add_vertex_to_facet(4); ib.add_vertex_to_facet(5); From c37341671e4a3058aec4122fbb34ff95fad04f99 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 2 Feb 2023 12:29:29 +0000 Subject: [PATCH 43/60] Turn comment into doxygen comment --- .../CGAL/Linear_cell_complex_incremental_builder_3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h index f231dbf323e..a2c950d46d6 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h +++ b/Linear_cell_complex/doc/Linear_cell_complex/CGAL/Linear_cell_complex_incremental_builder_3.h @@ -59,7 +59,7 @@ When a facet is added, if the same facet exists in another surface, the two surf */ VAH add_vertex(const Point_3& p); - /* + /*! * starts a new facet. */ void begin_facet(); From c716775fc05e249366dd838cb98d1283aa2e1475 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 2 Feb 2023 12:33:29 +0000 Subject: [PATCH 44/60] Add to change log --- Installation/CHANGES.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index a8e5332db23..63acb4dc055 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -14,6 +14,9 @@ Release date: June 2023 - Added a version that uses indices instead of handles as dart and attribute descriptors. As the indices are integers convertible from and to `std::size_t`, they can be used as index into vectors which store properties. To use the index version, `Use_index` must be defined and be equal to `CGAL::Tag_true` in the item class. +### [Linear Cell Complex](https://doc.cgal.org/5.6/Manual/packages.html#PkgLinearCellComplex) +- Added the class `Linear_cell_complex_incremental_builder_3`. + ### [Polygon Mesh Processing](https://doc.cgal.org/5.6/Manual/packages.html#PkgPolygonMeshProcessing) - **Breaking change**: Deprecated the overloads of functions `CGAL::Polygon_mesh_processing::triangulate_hole()`, From b2798bc81ebd1860d270a55ec1fafe147ae4cae6 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 2 Feb 2023 14:33:28 +0000 Subject: [PATCH 45/60] polish the example --- .../linear_cell_complex_3_incremental_builder.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp index 2c53a5dfb6d..414be85978a 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_incremental_builder.cpp @@ -5,7 +5,7 @@ typedef CGAL::Linear_cell_complex_for_combinatorial_map<3, 3> LCC_3; using Point=LCC_3::Point; -//============================================================================== + int main() { LCC_3 lcc; @@ -23,25 +23,24 @@ int main() // Create a cube ib.begin_surface(); - ib.add_facet({0,1,2,3}); // Create a new facet version 1: given all of its indices + ib.add_facet({0,1,2,3}); // Create a new facet version 1: given all of its indices ib.add_facet({1,0,5,6}); ib.add_facet({2,1,6,7}); ib.add_facet({3,2,7,4}); + ib.add_facet({5,4,7,6}); - ib.begin_facet(); // Create a new facet version 2: begin facet + ib.begin_facet(); // Create a new facet version 2: begin facet ib.add_vertex_to_facet(0); // add sucessively its indices ib.add_vertex_to_facet(3); ib.add_vertex_to_facet(4); ib.add_vertex_to_facet(5); - ib.end_facet(); // end facet - - ib.add_facet({5,4,7,6}); + ib.end_facet(); ib.end_surface(); ib.add_vertex(Point(-1, 0.5, 0.5)); // vertex 8 - // Create a pyramid, sharing one of its face with the cube + // Create a pyramid, sharing one of its facets with a facet of the cube ib.begin_surface(); ib.add_facet({3,0,5,4}); ib.add_facet({0,3,8}); From bf6d67951ce2de119f822dfde5ddb2a13d168763 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 20 Jan 2023 13:54:29 +0100 Subject: [PATCH 46/60] Introduce Base_with_time_stamp --- .../include/CGAL/Base_with_time_stamp.h | 48 +++++++++++++++++++ .../test/Triangulation_2/issue_4405.cpp | 31 +----------- .../test_cdt_degenerate_case.cpp | 31 +----------- 3 files changed, 52 insertions(+), 58 deletions(-) create mode 100644 STL_Extension/include/CGAL/Base_with_time_stamp.h diff --git a/STL_Extension/include/CGAL/Base_with_time_stamp.h b/STL_Extension/include/CGAL/Base_with_time_stamp.h new file mode 100644 index 00000000000..1e2dbeff088 --- /dev/null +++ b/STL_Extension/include/CGAL/Base_with_time_stamp.h @@ -0,0 +1,48 @@ +// Copyright (c) 2023 GeometryFactory Sarl (France). +// All rights reserved. +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Laurent Rineau + +#ifndef CGAL_BASE_WITH_TIME_STAMP_H +#define CGAL_BASE_WITH_TIME_STAMP_H + +#include // for Tag_true +#include // for std::size_t +#include // for std::forward + +namespace CGAL { + +template +class Base_with_time_stamp : public Base { + std::size_t time_stamp_ = -1; +public: + using Base::Base; + + Base_with_time_stamp(const Base_with_time_stamp& other) : + Base(other), + time_stamp_(other.time_stamp_) + {} + + typedef CGAL::Tag_true Has_timestamp; + + std::size_t time_stamp() const { + return time_stamp_; + } + void set_time_stamp(const std::size_t& ts) { + time_stamp_ = ts; + } + + template < class TDS > + struct Rebind_TDS { + typedef typename Base::template Rebind_TDS::Other Base2; + typedef Base_with_time_stamp Other; + }; +}; + +} // namespace CGAL + +#endif // CGAL_BASE_WITH_TIME_STAMP_H diff --git a/Triangulation_2/test/Triangulation_2/issue_4405.cpp b/Triangulation_2/test/Triangulation_2/issue_4405.cpp index c0e412e6209..ff8ebffa239 100644 --- a/Triangulation_2/test/Triangulation_2/issue_4405.cpp +++ b/Triangulation_2/test/Triangulation_2/issue_4405.cpp @@ -4,47 +4,20 @@ #include #include #include +#include typedef CGAL::Epick Kernel; typedef Kernel::FT FieldNumberType; typedef Kernel::Point_2 Point2; typedef Kernel::Point_3 Point3; -template -class My_vertex_base : public Vb { - std::size_t time_stamp_; -public: - My_vertex_base() : Vb(), time_stamp_(-1) { - } - - My_vertex_base(const My_vertex_base& other) : - Vb(other), - time_stamp_(other.time_stamp_) - {} - - typedef CGAL::Tag_true Has_timestamp; - - std::size_t time_stamp() const { - return time_stamp_; - } - void set_time_stamp(const std::size_t& ts) { - time_stamp_ = ts; - } - - template < class TDS > - struct Rebind_TDS { - typedef typename Vb::template Rebind_TDS::Other Vb2; - typedef My_vertex_base Other; - }; -}; - struct FaceInfo2 { unsigned long long m_id; }; typedef CGAL::Projection_traits_xy_3 TriangulationTraits; typedef CGAL::Triangulation_vertex_base_with_id_2 VertexBaseWithId; -typedef My_vertex_base Vb2; +typedef CGAL::Base_with_time_stamp Vb2; typedef CGAL::Triangulation_vertex_base_2 VertexBase; typedef CGAL::Triangulation_face_base_with_info_2 FaceBaseWithInfo; typedef CGAL::Constrained_triangulation_face_base_2 FaceBase; diff --git a/Triangulation_2/test/Triangulation_2/test_cdt_degenerate_case.cpp b/Triangulation_2/test/Triangulation_2/test_cdt_degenerate_case.cpp index b4de0e1e0f7..3c2bcf48f3f 100644 --- a/Triangulation_2/test/Triangulation_2/test_cdt_degenerate_case.cpp +++ b/Triangulation_2/test/Triangulation_2/test_cdt_degenerate_case.cpp @@ -2,41 +2,14 @@ #include #include #include +#include #include typedef CGAL::Exact_predicates_inexact_constructions_kernel EPIC; typedef EPIC::Point_2 Point_2; -template -class My_vertex_base : public Vb { - std::size_t time_stamp_; -public: - My_vertex_base() : Vb(), time_stamp_(-1) { - } - - My_vertex_base(const My_vertex_base& other) : - Vb(other), - time_stamp_(other.time_stamp_) - {} - - typedef CGAL::Tag_true Has_timestamp; - - std::size_t time_stamp() const { - return time_stamp_; - } - void set_time_stamp(const std::size_t& ts) { - time_stamp_ = ts; - } - - template < class TDS > - struct Rebind_TDS { - typedef typename Vb::template Rebind_TDS::Other Vb2; - typedef My_vertex_base Other; - }; -}; - #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS -typedef My_vertex_base > Vb; +typedef CGAL::Base_with_time_stamp > Vb; #else typedef CGAL::Triangulation_vertex_base_2 Vb; #endif From e8d10955260bbf7c50a55ca1e25157a7cffdfd77 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 20 Jan 2023 16:35:15 +0100 Subject: [PATCH 47/60] Use Output_rep to display debug info --- .../include/CGAL/Compact_container.h | 15 +++++ STL_Extension/include/CGAL/Time_stamper.h | 11 ++++ .../CGAL/Constrained_triangulation_2.h | 64 +++++++++++++------ .../CGAL/Constrained_triangulation_plus_2.h | 54 ++++++++-------- .../Polyline_constraint_hierarchy_2.h | 33 ++++------ 5 files changed, 112 insertions(+), 65 deletions(-) diff --git a/STL_Extension/include/CGAL/Compact_container.h b/STL_Extension/include/CGAL/Compact_container.h index b8c1cb0769c..24f7ef91c72 100644 --- a/STL_Extension/include/CGAL/Compact_container.h +++ b/STL_Extension/include/CGAL/Compact_container.h @@ -33,6 +33,7 @@ #include #include #include +#include #include @@ -1153,6 +1154,20 @@ namespace handle { } // namespace internal +template +class Output_rep > { +protected: + using CC_iterator = CGAL::internal::CC_iterator; + using Compact_container = typename CC_iterator::CC; + using Time_stamper = typename Compact_container::Time_stamper; + CC_iterator it; +public: + Output_rep( const CC_iterator it) : it(it) {} + std::ostream& operator()( std::ostream& out) const { + return (out << Time_stamper::display_id(it.operator->())); + } +}; + } //namespace CGAL namespace std { diff --git a/STL_Extension/include/CGAL/Time_stamper.h b/STL_Extension/include/CGAL/Time_stamper.h index 8d346516a27..f48f5307ef0 100644 --- a/STL_Extension/include/CGAL/Time_stamper.h +++ b/STL_Extension/include/CGAL/Time_stamper.h @@ -13,6 +13,7 @@ #define CGAL_TIME_STAMPER_H #include +#include namespace CGAL { @@ -66,6 +67,11 @@ struct Time_stamper return pt->time_stamp(); } + static auto display_id(const T* pt) + { + return std::string("#") + std::to_string(pt->time_stamp()); + } + static std::size_t hash_value(const T* p) { if(nullptr == p) return std::size_t(-1); @@ -101,6 +107,11 @@ public: return 0; } + static auto display_id(const T* pt) + { + return static_cast(pt); + } + static std::size_t hash_value(const T* p) { constexpr std::size_t shift = internal::rounded_down_log2(sizeof(T)); diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index ac11e5182e2..37c27cb81a8 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -38,6 +38,28 @@ #include #include +#ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS +# include +# include +# include +namespace CGAL { + +struct With_point_tag {}; + +template +struct Output_rep, With_point_tag> + : public Output_rep> +{ + using Base = Output_rep>; + using Base::Base; + + std::ostream& operator()(std::ostream& out) const { + return Base::operator()(out) << "= " << this->it->point(); + } +}; +} // namespace CGAL +#endif // CGAL_CDT_2_DEBUG_INTERSECTIONS + namespace CGAL { struct No_constraint_intersection_tag{}; @@ -597,6 +619,12 @@ public: return are_there; } +#ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + auto display_vertex(Vertex_handle v) const { + With_point_tag point_tag; + return oformat(v, point_tag); + } +#endif // CGAL_CDT_2_DEBUG_INTERSECTIONS template OutputItEdges incident_constraints(Vertex_handle v, @@ -804,8 +832,8 @@ insert_constraint(Vertex_handle vaa, Vertex_handle vbb) #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_constraint( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_2::insert_constraint( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n"; internal::Indentation_level::Exit_guard exit_guard = CGAL::internal::cdt_2_indent_level.open_new_scope(); #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS @@ -815,8 +843,8 @@ insert_constraint(Vertex_handle vaa, Vertex_handle vbb) CGAL_precondition( vaa != vbb); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_constraint, stack pop=( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_2::insert_constraint, stack pop=( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " ) remaining stack size: " << stack.size() << '\n'; CGAL_assertion(this->is_valid()); @@ -858,12 +886,12 @@ insert_constraint(Vertex_handle vaa, Vertex_handle vbb) if (vi != vaa && vi != vbb) { #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_constraint stack push [vaa, vi] ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vi->time_stamp() << "= " << vi->point() + << "CT_2::insert_constraint stack push [vaa, vi] ( " << display_vertex(vaa) + << " , " << display_vertex(vi) << " )\n"; std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_constraint stack push [vi, vbb] ( #" << vi->time_stamp() << "= " << vi->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_2::insert_constraint stack push [vi, vbb] ( " << display_vertex(vi) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS stack.push(std::make_pair(vaa,vi)); @@ -872,8 +900,8 @@ insert_constraint(Vertex_handle vaa, Vertex_handle vbb) else{ #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_constraint stack push [vaa, vbb]( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_2::insert_constraint stack push [vaa, vbb]( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS stack.push(std::make_pair(vaa,vbb)); @@ -921,8 +949,8 @@ find_intersected_faces(Vertex_handle vaa, // is constrained #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::find_intersected_faces ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_2::find_intersected_faces ( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n" << CGAL::internal::cdt_2_indent_level << "> current constrained edges are:\n"; @@ -1220,7 +1248,7 @@ insert_intersection(Face_handle f, int i, } #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::insert_intersection, `vi` is ( #" << vi->time_stamp() << "= " << vi->point() + << "CT_2::insert_intersection, `vi` is ( " << display_vertex(vi) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS return vi; @@ -1245,16 +1273,16 @@ intersect(Face_handle f, int i, #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::intersect segment ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() - << " ) with edge ( #"<< vcc->time_stamp() << "= " << vcc->point() - << " , #" << vdd->time_stamp() << "= " << vdd->point() + << "CT_2::intersect segment ( " << display_vertex(vaa) + << " , " << display_vertex(vbb) + << " ) with edge ( " << display_vertex(vcc) + << " , " << display_vertex(vdd) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS Vertex_handle vi = insert_intersection(f, i, vaa, vbb, vcc, vdd, pa, pb, pc, pd, itag); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_2::intersect, `vi` is ( #" << vi->time_stamp() << "= " << vi->point() + << "CT_2::intersect, `vi` is ( " << display_vertex(vi) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h index 50ca1f4bfec..63e07c51dcf 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_plus_2.h @@ -129,6 +129,10 @@ public: using Triangulation::is_infinite; using Triangulation::number_of_vertices; #endif +#ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + using Triangulation::display_vertex; +#endif // CGAL_CDT_2_DEBUG_INTERSECTIONS + typedef typename Triangulation::Edge Edge; typedef typename Triangulation::Vertex Vertex; @@ -275,8 +279,8 @@ public: { #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint( #" << va->time_stamp() << "= " << va->point() - << " , #" << vb->time_stamp() << "= " << vb->point() + << "CT_plus_2::insert_constraint( " << display_vertex(va) + << " , " << display_vertex(vb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS // protects against inserting a zero length constraint @@ -883,13 +887,13 @@ insert_subconstraint(Vertex_handle vaa, { #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_subconstraint( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_subconstraint( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n"; internal::Indentation_level::Exit_guard exit_guard = CGAL::internal::cdt_2_indent_level.open_new_scope(); std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint stack push [va, vb] ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_constraint stack push [va, vb] ( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS std::stack > stack; @@ -901,8 +905,8 @@ insert_subconstraint(Vertex_handle vaa, CGAL_precondition( vaa != vbb); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_subconstraint, stack pop=( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_subconstraint, stack pop=( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " ) remaining stack size: " << stack.size() << '\n'; CGAL_assertion(this->is_valid()); @@ -914,8 +918,8 @@ insert_subconstraint(Vertex_handle vaa, if(this->includes_edge(vaa,vbb,vi,fr,i)) { #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_subconstraint, the segment ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_subconstraint, the segment ( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " ) is an edge with #" << vi->time_stamp() << "= " << vi->point() << '\n'; @@ -925,8 +929,8 @@ insert_subconstraint(Vertex_handle vaa, hierarchy.split_constraint(vaa,vbb,vi); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint (includes_edge) stack push [vi, vbb] ( #" << vi->time_stamp() << "= " << vi->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_constraint (includes_edge) stack push [vi, vbb] ( " << display_vertex(vi) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS stack.push(std::make_pair(vi,vbb)); @@ -949,12 +953,12 @@ insert_subconstraint(Vertex_handle vaa, hierarchy.split_constraint(vaa,vbb,vi); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint stack push [vaa, vi] ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vi->time_stamp() << "= " << vi->point() + << "CT_plus_2::insert_constraint stack push [vaa, vi] ( " << display_vertex(vaa) + << " , " << display_vertex(vi) << " )\n"; std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint stack push [vi, vbb] ( #" << vi->time_stamp() << "= " << vi->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_constraint stack push [vi, vbb] ( " << display_vertex(vi) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS stack.push(std::make_pair(vaa,vi)); @@ -963,8 +967,8 @@ insert_subconstraint(Vertex_handle vaa, else { #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::insert_constraint stack push [vaa, vbb]( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::insert_constraint stack push [vaa, vbb]( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS stack.push(std::make_pair(vaa,vbb)); @@ -1180,10 +1184,10 @@ intersect(Face_handle f, int i, const Point& pd = vd->point(); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::intersect segment ( #" << va->time_stamp() << "= " << va->point() - << " , #" << vb->time_stamp() << "= " << vb->point() + << "CT_plus_2::intersect segment ( " << display_vertex(va) + << " , " << display_vertex(vb) << " ) with edge ( #"<< vc->time_stamp() << "= " << vc->point() - << " , #" << vd->time_stamp() << "= " << vd->point() + << " , " << display_vertex(vd) << " , Exact_intersections_tag)\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS Point pi(ORIGIN); // initialize although we are sure that it will be @@ -1196,7 +1200,7 @@ intersect(Face_handle f, int i, Vertex_handle vi = insert(pi, Triangulation::EDGE, f, i); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::intersect, `vi` is ( #" << vi->time_stamp() << "= " << vi->point() + << "CT_plus_2::intersect, `vi` is ( " << display_vertex(vi) << " )\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS return vi; @@ -1220,10 +1224,10 @@ intersect(Face_handle f, int i, const Point& pd = vdd->point(); #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "CT_plus_2::intersect segment ( #" << vaa->time_stamp() << "= " << vaa->point() - << " , #" << vbb->time_stamp() << "= " << vbb->point() + << "CT_plus_2::intersect segment ( " << display_vertex(vaa) + << " , " << display_vertex(vbb) << " ) with edge ( #"<< vcc->time_stamp() << "= " << vcc->point() - << " , #" << vdd->time_stamp() << "= " << vdd->point() + << " , " << display_vertex(vdd) << " , Exact_predicates_tag)\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS diff --git a/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h b/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h index a6c2bf44571..8870458b042 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h @@ -25,7 +25,9 @@ #include #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS +# include # include +# include #endif namespace CGAL { @@ -861,11 +863,8 @@ insert_constraint(T va, T vb){ #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "C_hierachy.insert_constraint( #" - << va->time_stamp() - << ", #" - << vb->time_stamp() - << ")\n"; + << "C_hierachy.insert_constraint( " + << oformat(va) << ", " << oformat(vb) << ")\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he); if(scit == sc_to_c_map.end()){ @@ -898,11 +897,8 @@ insert_constraint_old_API(T va, T vb){ #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "C_hierachy.insert_constraint_old_API( #" - << va->time_stamp() - << ", #" - << vb->time_stamp() - << ")\n"; + << "C_hierachy.insert_constraint_old_API( " + << oformat(va) << ", " << oformat(vb) << ")\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he); if(scit == sc_to_c_map.end()){ @@ -933,11 +929,8 @@ append_constraint(Constraint_id cid, T va, T vb){ #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "C_hierachy.append_constraint( ..., #" - << va->time_stamp() - << ", #" - << vb->time_stamp() - << ")\n"; + << "C_hierachy.append_constraint( ..., " + << oformat(va) << ", " << oformat(vb) << ")\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS typename Sc_to_c_map::iterator scit = sc_to_c_map.find(he); if(scit == sc_to_c_map.end()){ @@ -1052,13 +1045,9 @@ Polyline_constraint_hierarchy_2:: add_Steiner(T va, T vb, T vc){ #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS std::cerr << CGAL::internal::cdt_2_indent_level - << "C_hierachy.add_Steinter( #" - << va->time_stamp() - << ", #" - << vb->time_stamp() - << ", #" - << vc->time_stamp() - << ")\n"; + << "C_hierachy.add_Steinter( " + << oformat(va) << ", " << oformat(vb) << ", " << oformat(vc) + << ")\n"; #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS Context_list* hcl=nullptr; if(!get_contexts(va,vb,hcl)) { From 9e277981edbaf11ad871a0c6e59bee5a64e37b4e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 24 Jan 2023 13:42:06 +0100 Subject: [PATCH 48/60] Circulator_from_container now works --- Circulator/include/CGAL/circulator.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Circulator/include/CGAL/circulator.h b/Circulator/include/CGAL/circulator.h index 144de51cd54..2b1556218f0 100644 --- a/Circulator/include/CGAL/circulator.h +++ b/Circulator/include/CGAL/circulator.h @@ -701,7 +701,13 @@ typedef Iterator_from_circulator< C, const_reference, const_pointer> template class Circulator_from_container { typedef Circulator_from_container Self; - typedef typename Container::iterator iterator; + typedef typename Container::iterator container_iterator; + typedef typename Container::const_iterator container_const_iterator; + typedef std::conditional_t< + std::is_const::value, + container_const_iterator, + container_iterator + > iterator; typedef std::iterator_traits iterator_traits; public: typedef typename iterator_traits::value_type value_type; From d940c3ae3f9244613d2700d50b8cdf2be0e8c9cb Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 2 Feb 2023 16:04:12 +0100 Subject: [PATCH 49/60] Triangulation_3.h: make_vertex_triple can be static --- Triangulation_3/include/CGAL/Triangulation_3.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index add6a8519f9..59e040cb33a 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -1659,8 +1659,8 @@ private: typedef typename Base::template Vertex_handle_unique_hash_map_generator< Vertex_handle>::type Vertex_handle_unique_hash_map; - Vertex_triple make_vertex_triple(const Facet& f) const; - void make_canonical_oriented_triple(Vertex_triple& t) const; + static Vertex_triple make_vertex_triple(const Facet& f); + static void make_canonical_oriented_triple(Vertex_triple& t); template < class VertexRemover > VertexRemover& make_hole_2D(Vertex_handle v, std::list& hole, @@ -4359,7 +4359,7 @@ Triangulation_3::insert_and_give_new_cells(const Point& p, template < class Gt, class Tds, class Lds > typename Triangulation_3::Vertex_triple Triangulation_3:: -make_vertex_triple(const Facet& f) const +make_vertex_triple(const Facet& f) { Cell_handle ch = f.first; int i = f.second; @@ -4372,7 +4372,7 @@ make_vertex_triple(const Facet& f) const template < class Gt, class Tds, class Lds > void Triangulation_3:: -make_canonical_oriented_triple(Vertex_triple& t) const +make_canonical_oriented_triple(Vertex_triple& t) { int i = (t.first < t.second) ? 0 : 1; if(i==0) From 686aff651d703aece00a47a28dc2e5e0c05b4307 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 2 Feb 2023 16:04:44 +0100 Subject: [PATCH 50/60] Triangulation_3.h: Factorize the two versions of make_hole_3D --- .../include/CGAL/Triangulation_3.h | 46 +++++++++---------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index 59e040cb33a..cf20fedb216 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -1673,6 +1673,9 @@ private: template < class VertexRemover > void fill_hole_2D(std::list& hole, VertexRemover& remover); + void make_hole_3D_impl(Vertex_handle v, + const std::vector& incident_cells, + Vertex_triple_Facet_map& outer_map); void make_hole_3D(Vertex_handle v, Vertex_triple_Facet_map& outer_map, std::vector& hole); @@ -4909,16 +4912,11 @@ fill_hole_2D(std::list& first_hole, VertexRemover& remover, OutputItCel template < class Gt, class Tds, class Lds > void Triangulation_3:: -make_hole_3D(Vertex_handle v, - Vertex_triple_Facet_map& outer_map, - std::vector& hole) +make_hole_3D_impl(Vertex_handle v, + const std::vector& incident_cells, + Vertex_triple_Facet_map& outer_map) { - CGAL_expensive_precondition(! test_dim_down(v)); - - incident_cells(v, std::back_inserter(hole)); - - for(typename std::vector::iterator cit = hole.begin(), - end = hole.end(); + for(auto cit = incident_cells.begin(), end = incident_cells.end(); cit != end; ++cit) { int indv = (*cit)->index(v); @@ -4935,6 +4933,20 @@ make_hole_3D(Vertex_handle v, } } +template < class Gt, class Tds, class Lds > +void +Triangulation_3:: +make_hole_3D(Vertex_handle v, + Vertex_triple_Facet_map& outer_map, + std::vector& hole) +{ + CGAL_expensive_precondition(! test_dim_down(v)); + + incident_cells(v, std::back_inserter(hole)); + + make_hole_3D_impl(v, hole, outer_map); +} + // When the incident cells are already known template < class Gt, class Tds, class Lds > void @@ -4945,21 +4957,7 @@ make_hole_3D(Vertex_handle v, { CGAL_expensive_precondition(! test_dim_down(v)); - for(typename std::vector::const_iterator cit = incident_cells.begin(), - end = incident_cells.end(); cit != end; ++cit) - { - int indv = (*cit)->index(v); - Cell_handle opp_cit = (*cit)->neighbor(indv); - Facet f(opp_cit, opp_cit->index(*cit)); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - outer_map[vt] = f; - for(int i=0; i<4; i++) - { - if(i != indv) - (*cit)->vertex(i)->set_cell(opp_cit); - } - } + make_hole_3D_impl(v, incident_cells, outer_map); } template < class Gt, class Tds, class Lds > From 029b5bead5f9ad4f295456ade9213f414e4bc4e1 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 3 Feb 2023 15:47:10 +0100 Subject: [PATCH 51/60] Triangulation_3.h: Rewrite/factorize New functions: - `create_hole_outer_map`, - `create_triangulation_inner_map`. - `copy_triangulation_into_hole`, - `fill_auxiliary_triangulation_with_vertices_around_v` --- .../include/CGAL/Triangulation_3.h | 1208 ++++------------- 1 file changed, 294 insertions(+), 914 deletions(-) diff --git a/Triangulation_3/include/CGAL/Triangulation_3.h b/Triangulation_3/include/CGAL/Triangulation_3.h index cf20fedb216..c5cff3b9f35 100644 --- a/Triangulation_3/include/CGAL/Triangulation_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_3.h @@ -1651,7 +1651,7 @@ protected: tds().delete_vertex(inserted); } -private: +protected: typedef Facet Edge_2D; typedef Triple Vertex_triple; typedef typename Base::template Vertex_triple_Facet_map_generator< @@ -1673,16 +1673,32 @@ private: template < class VertexRemover > void fill_hole_2D(std::list& hole, VertexRemover& remover); - void make_hole_3D_impl(Vertex_handle v, - const std::vector& incident_cells, - Vertex_triple_Facet_map& outer_map); - void make_hole_3D(Vertex_handle v, - Vertex_triple_Facet_map& outer_map, - std::vector& hole); - // When the incident cells are already known - void make_hole_3D(Vertex_handle v, - const std::vector& incident_cells, - Vertex_triple_Facet_map& outer_map); + Vertex_triple_Facet_map + create_hole_outer_map(Vertex_handle v, + const std::vector& hole); + + template < class Triangulation > + static Vertex_triple_Facet_map + create_triangulation_inner_map(const Triangulation& t, + const Vertex_handle_unique_hash_map& vmap, + bool inf); + + template + OutputItCells copy_triangulation_into_hole(const Vertex_handle_unique_hash_map& vmap, + Vertex_triple_Facet_map&& outer_map, + const Vertex_triple_Facet_map& inner_map, + OutputItCells fit); + + struct Fill_auxiliary_return_type { + Vertex_handle_unique_hash_map vmap; + bool vertex_is_incident_to_infinity; + }; + + template < class Triangulation > + Fill_auxiliary_return_type + fill_auxiliary_triangulation_with_vertices_around_v(Triangulation& t, + Vertex_handle v, + std::vector& adj_vertices) const; template < class VertexRemover > VertexRemover& remove_dim_down(Vertex_handle v, VertexRemover& remover); @@ -1765,7 +1781,7 @@ private: std::map& vstates); void _make_big_hole_3D(Vertex_handle v, - std::map& outer_map, + Vertex_triple_Facet_map& outer_map, std::vector& hole, std::vector& vertices, std::map& vstates); @@ -4909,13 +4925,15 @@ fill_hole_2D(std::list& first_hole, VertexRemover& remover, OutputItCel } } +// When the incident cells are already known template < class Gt, class Tds, class Lds > -void +typename Triangulation_3::Vertex_triple_Facet_map Triangulation_3:: -make_hole_3D_impl(Vertex_handle v, - const std::vector& incident_cells, - Vertex_triple_Facet_map& outer_map) +create_hole_outer_map(Vertex_handle v, const std::vector& incident_cells) { + CGAL_expensive_precondition(! test_dim_down(v)); + + Vertex_triple_Facet_map outer_map; for(auto cit = incident_cells.begin(), end = incident_cells.end(); cit != end; ++cit) { @@ -4931,35 +4949,206 @@ make_hole_3D_impl(Vertex_handle v, (*cit)->vertex(i)->set_cell(opp_cit); } } + return outer_map; } template < class Gt, class Tds, class Lds > -void +template < class Triangulation > +typename Triangulation_3::Vertex_triple_Facet_map Triangulation_3:: -make_hole_3D(Vertex_handle v, - Vertex_triple_Facet_map& outer_map, - std::vector& hole) -{ - CGAL_expensive_precondition(! test_dim_down(v)); +create_triangulation_inner_map(const Triangulation& t, + const Vertex_handle_unique_hash_map& vmap, + bool all_cells) { + Vertex_triple_Facet_map inner_map; - incident_cells(v, std::back_inserter(hole)); - - make_hole_3D_impl(v, hole, outer_map); + if(all_cells) + { + for(All_cells_iterator it = t.all_cells_begin(), + end = t.all_cells_end(); it != end; ++it) + { + for(unsigned int index=0; index < 4; index++) + { + Facet f = std::pair(it,index); + Vertex_triple vt_aux = make_vertex_triple(f); + Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); + make_canonical_oriented_triple(vt); + inner_map[vt] = f; + } + } + } else + { + for(Finite_cells_iterator it = t.finite_cells_begin(), + end = t.finite_cells_end(); it != end; ++it) + { + for(unsigned int index=0; index < 4; index++) + { + Facet f = std::pair(it,index); + Vertex_triple vt_aux = make_vertex_triple(f); + Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); + make_canonical_oriented_triple(vt); + inner_map[vt] = f; + } + } + } + return inner_map; } -// When the incident cells are already known template < class Gt, class Tds, class Lds > -void +template < class Triangulation > +typename Triangulation_3::Fill_auxiliary_return_type Triangulation_3:: -make_hole_3D(Vertex_handle v, - const std::vector& incident_cells, - Vertex_triple_Facet_map& outer_map) +fill_auxiliary_triangulation_with_vertices_around_v(Triangulation& t, + Vertex_handle v, + std::vector& adj_vertices) const { - CGAL_expensive_precondition(! test_dim_down(v)); + Fill_auxiliary_return_type result; + Vertex_handle_unique_hash_map& vmap = result.vmap; + unsigned int i = 0; + Cell_handle ch = Cell_handle(); +#ifdef CGAL_TRIANGULATION_3_USE_THE_4_POINTS_CONSTRUCTOR + size_t num_vertices = adj_vertices.size(); + if(num_vertices >= 5) + { + for(int j = 0 ; j < 4 ; ++j) + { + if(is_infinite(adj_vertices[j])) + { + std::swap(adj_vertices[j], adj_vertices[4]); + break; + } + } - make_hole_3D_impl(v, incident_cells, outer_map); + Orientation o = orientation(adj_vertices[0]->point(), + adj_vertices[1]->point(), + adj_vertices[2]->point(), + adj_vertices[3]->point()); + + if(o == NEGATIVE) + std::swap(adj_vertices[0], adj_vertices[1]); + + if(o != ZERO) + { + Vertex_handle vh1, vh2, vh3, vh4; + t.init_tds(adj_vertices[0]->point(), adj_vertices[1]->point(), + adj_vertices[2]->point(), adj_vertices[3]->point(), + vh1, vh2, vh3, vh4); + + ch = vh1->cell(); + vmap[vh1] = adj_vertices[0]; + vmap[vh2] = adj_vertices[1]; + vmap[vh3] = adj_vertices[2]; + vmap[vh4] = adj_vertices[3]; + i = 4; + } + } +#endif + + for(; i < adj_vertices.size(); i++) + { + if(! is_infinite(adj_vertices[i])) + { + Vertex_handle vh = t.insert(adj_vertices[i]->point(), ch); + ch = vh->cell(); + vmap[vh] = adj_vertices[i]; + } + else + { + result.vertex_is_incident_to_infinity = true; + } + } + + if(t.dimension() == 2) + { + Vertex_handle fake_inf = t.insert(v->point()); + vmap[fake_inf] = infinite_vertex(); + } + else + { + vmap[t.infinite_vertex()] = infinite_vertex(); + } + + CGAL_assertion(t.dimension() == 3); + + return result; } +template < class Gt, class Tds, class Lds > +template < class OutputItCells > +OutputItCells +Triangulation_3:: +copy_triangulation_into_hole(const Vertex_handle_unique_hash_map& vmap, + Vertex_triple_Facet_map&& outer_map, + const Vertex_triple_Facet_map& inner_map, + OutputItCells fit) +{ + while(! outer_map.empty()) + { + typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); + while(is_infinite(oit->first.first) || + is_infinite(oit->first.second) || + is_infinite(oit->first.third)) + { + ++oit; + // Otherwise the lookup in the inner_map fails + // because the infinite vertices are different + } + + typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; + outer_map.erase(oit); + Cell_handle o_ch = o_vt_f_pair.second.first; + unsigned int o_i = o_vt_f_pair.second.second; + + auto iit = inner_map.find(o_vt_f_pair.first); + CGAL_assertion(iit != inner_map.end()); + typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; + Cell_handle i_ch = i_vt_f_pair.second.first; + unsigned int i_i = i_vt_f_pair.second.second; + + // Create a new cell and glue it to the outer surface + Cell_handle new_ch = tds().create_cell(); + *fit++ = new_ch; + new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], + vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); + + o_ch->set_neighbor(o_i,new_ch); + new_ch->set_neighbor(i_i, o_ch); + + for(int j=0; j<4; j++) + new_ch->vertex(j)->set_cell(new_ch); + + // For the other faces check, if they can also be glued + for(unsigned int index = 0; index < 4; index++) + { + if(index != i_i) + { + Facet f = std::pair(new_ch, index); + Vertex_triple vt = make_vertex_triple(f); + make_canonical_oriented_triple(vt); + std::swap(vt.second, vt.third); + + typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); + if(oit2 == outer_map.end()) + { + std::swap(vt.second, vt.third); + outer_map[vt] = f; + } + else + { + // glue the faces + typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; + Cell_handle o_ch2 = o_vt_f_pair2.second.first; + int o_i2 = o_vt_f_pair2.second.second; + o_ch2->set_neighbor(o_i2, new_ch); + new_ch->set_neighbor(index, o_ch2); + outer_map.erase(oit2); + } + } + } + } + return fit; +} + + template < class Gt, class Tds, class Lds > template < class VertexRemover > VertexRemover& @@ -5028,201 +5217,7 @@ VertexRemover& Triangulation_3:: remove_3D(Vertex_handle v, VertexRemover& remover) { - std::vector hole; - hole.reserve(64); - - // Construct the set of vertex triples on the boundary - // with the facet just behind - Vertex_triple_Facet_map outer_map; - Vertex_triple_Facet_map inner_map; - - make_hole_3D(v, outer_map, hole); - CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); - - // Output the hidden points. - for(typename std::vector::iterator hi = hole.begin(), - hend = hole.end(); - hi != hend; ++hi) - { - remover.add_hidden_points(*hi); - } - - bool inf = false; - - // collect all vertices on the boundary - std::vector vertices; - vertices.reserve(64); - adjacent_vertices(v, std::back_inserter(vertices)); - - // create a Delaunay triangulation of the points on the boundary - // and make a map from the vertices in remover.tmp towards the vertices - // in *this - - unsigned int i = 0; - Vertex_handle_unique_hash_map vmap; - Cell_handle ch = Cell_handle(); -#ifdef CGAL_TRIANGULATION_3_USE_THE_4_POINTS_CONSTRUCTOR - size_t num_vertices = vertices.size(); - if(num_vertices >= 5) - { - for(int j = 0 ; j < 4 ; ++j) - { - if(is_infinite(vertices[j])) - { - std::swap(vertices[j], vertices[4]); - break; - } - } - - Orientation o = orientation(vertices[0]->point(), - vertices[1]->point(), - vertices[2]->point(), - vertices[3]->point()); - - if(o == NEGATIVE) - std::swap(vertices[0], vertices[1]); - - if(o != ZERO) - { - Vertex_handle vh1, vh2, vh3, vh4; - remover.tmp.init_tds(vertices[0]->point(), vertices[1]->point(), - vertices[2]->point(), vertices[3]->point(), - vh1, vh2, vh3, vh4); - ch = vh1->cell(); - vmap[vh1] = vertices[0]; - vmap[vh2] = vertices[1]; - vmap[vh3] = vertices[2]; - vmap[vh4] = vertices[3]; - i = 4; - } - } -#endif - - for(; i < vertices.size(); i++) - { - if(! is_infinite(vertices[i])) - { - Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch); - ch = vh->cell(); - vmap[vh] = vertices[i]; - } - else - { - inf = true; - } - } - - if(remover.tmp.dimension() == 2) - { - Vertex_handle fake_inf = remover.tmp.insert(v->point()); - vmap[fake_inf] = infinite_vertex(); - } - else - { - vmap[remover.tmp.infinite_vertex()] = infinite_vertex(); - } - - CGAL_assertion(remover.tmp.dimension() == 3); - - // Construct the set of vertex triples of remover.tmp - // We reorient the vertex triple so that it matches those from outer_map - // Also note that we use the vertices of *this, not of remover.tmp - - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - while(is_infinite(oit->first.first) || - is_infinite(oit->first.second) || - is_infinite(oit->first.third)) - { - ++oit; - // Otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } - - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = inner_map.find(o_vt_f_pair.first); - CGAL_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // Create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - // For the other faces check, if they can also be glued - for(i = 0; i < 4; i++) - { - if(i != i_i) - { - Facet f = std::pair(new_ch,i); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - std::swap(vt.second,vt.third); - - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second,vt.third); - outer_map[vt]= f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2,new_ch); - new_ch->set_neighbor(i, o_ch2); - outer_map.erase(oit2); - } - } - } - } - tds().delete_vertex(v); - tds().delete_cells(hole.begin(), hole.end()); - - return remover; + return remove_3D(v, remover, Emptyset_iterator()); } template < class Gt, class Tds, class Lds > @@ -5233,192 +5228,37 @@ remove_3D(Vertex_handle v, VertexRemover& remover, const std::vector& inc_cells, std::vector& adj_vertices) { - // Construct the set of vertex triples on the boundary with the facet just behind - Vertex_triple_Facet_map outer_map; - Vertex_triple_Facet_map inner_map; + const auto& hole = inc_cells; - make_hole_3D(v, inc_cells, outer_map); + // Construct the set of vertex triples on the boundary + // with the facet just behind + Vertex_triple_Facet_map outer_map = create_hole_outer_map(v, hole); CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); // Output the hidden points. - for(typename std::vector::const_iterator hi = inc_cells.begin(), - hend = inc_cells.end(); - hi != hend; ++hi) + for(auto ch: hole) { - remover.add_hidden_points(*hi); + remover.add_hidden_points(ch); } - bool inf = false; - // Create a Delaunay triangulation of the points on the boundary // and make a map from the vertices in remover.tmp towards the vertices // in *this - unsigned int i = 0; - Vertex_handle_unique_hash_map vmap; - Cell_handle ch = Cell_handle(); -#ifdef CGAL_TRIANGULATION_3_USE_THE_4_POINTS_CONSTRUCTOR - size_t num_vertices = adj_vertices.size(); - if(num_vertices >= 5) - { - for(int j = 0 ; j < 4 ; ++j) - { - if(is_infinite(adj_vertices[j])) - { - std::swap(adj_vertices[j], adj_vertices[4]); - break; - } - } - - Orientation o = orientation(adj_vertices[0]->point(), - adj_vertices[1]->point(), - adj_vertices[2]->point(), - adj_vertices[3]->point()); - - if(o == NEGATIVE) - std::swap(adj_vertices[0], adj_vertices[1]); - - if(o != ZERO) - { - Vertex_handle vh1, vh2, vh3, vh4; - remover.tmp.init_tds(adj_vertices[0]->point(), adj_vertices[1]->point(), - adj_vertices[2]->point(), adj_vertices[3]->point(), - vh1, vh2, vh3, vh4); - - ch = vh1->cell(); - vmap[vh1] = adj_vertices[0]; - vmap[vh2] = adj_vertices[1]; - vmap[vh3] = adj_vertices[2]; - vmap[vh4] = adj_vertices[3]; - i = 4; - } - } -#endif - - for(; i < adj_vertices.size(); i++) - { - if(! is_infinite(adj_vertices[i])) - { - Vertex_handle vh = remover.tmp.insert(adj_vertices[i]->point(), ch); - ch = vh->cell(); - vmap[vh] = adj_vertices[i]; - } - else - { - inf = true; - } - } - - if(remover.tmp.dimension()==2) - { - Vertex_handle fake_inf = remover.tmp.insert(v->point()); - vmap[fake_inf] = infinite_vertex(); - } - else - { - vmap[remover.tmp.infinite_vertex()] = infinite_vertex(); - } - - CGAL_assertion(remover.tmp.dimension() == 3); + const auto ret = fill_auxiliary_triangulation_with_vertices_around_v(remover.tmp, v, adj_vertices); + const auto& vmap = ret.vmap; + const bool inf = ret.vertex_is_incident_to_infinity; // Construct the set of vertex triples of remover.tmp // We reorient the vertex triple so that it matches those from outer_map // Also note that we use the vertices of *this, not of remover.tmp - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } + const Vertex_triple_Facet_map inner_map = create_triangulation_inner_map(remover.tmp, vmap, inf); // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - while(is_infinite(oit->first.first) || - is_infinite(oit->first.second) || - is_infinite(oit->first.third)) - { - ++oit; - // otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } + copy_triangulation_into_hole(vmap, std::move(outer_map), inner_map, Emptyset_iterator{}); - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = - inner_map.find(o_vt_f_pair.first); - CGAL_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - // for the other faces check, if they can also be glued - for(i = 0; i < 4; i++) - { - if(i != i_i) - { - Facet f = std::pair(new_ch,i); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - std::swap(vt.second,vt.third); - - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second,vt.third); - outer_map[vt]= f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2,new_ch); - new_ch->set_neighbor(i, o_ch2); - outer_map.erase(oit2); - } - } - } - } tds().delete_vertex(v); - tds().delete_cells(inc_cells.begin(), inc_cells.end()); + tds().delete_cells(hole.begin(), hole.end()); return remover; } @@ -5565,162 +5405,42 @@ remove_3D(Vertex_handle v, VertexRemover& remover, OutputItCells fit) { CGAL_precondition(dimension() == 3); + // Collect all vertices on the boundary of the hole + std::vector adj_vertices; + adj_vertices.reserve(64); + adjacent_vertices(v, std::back_inserter(adj_vertices)); + std::vector hole; hole.reserve(64); + incident_cells(v, std::back_inserter(hole)); // Construct the set of vertex triples on the boundary // with the facet just behind - Vertex_triple_Facet_map outer_map; - Vertex_triple_Facet_map inner_map; - - make_hole_3D(v, outer_map, hole); + Vertex_triple_Facet_map outer_map = create_hole_outer_map(v, hole); CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); // Output the hidden points. - for(typename std::vector::iterator hi = hole.begin(), - hend = hole.end(); - hi != hend; ++hi) + for(auto ch: hole) { - remover.add_hidden_points(*hi); + remover.add_hidden_points(ch); } - bool inf = false; - unsigned int i; - - // collect all vertices on the boundary - std::vector vertices; - vertices.reserve(64); - adjacent_vertices(v, std::back_inserter(vertices)); - - // create a Delaunay triangulation of the points on the boundary + // Create a Delaunay triangulation of the points on the boundary // and make a map from the vertices in remover.tmp towards the vertices // in *this - Vertex_handle_unique_hash_map vmap; - Cell_handle ch = Cell_handle(); - for(i=0; ipoint(), ch); - ch = vh->cell(); - vmap[vh] = vertices[i]; - } - else - { - inf = true; - } - } - - if(remover.tmp.dimension()==2) - { - Vertex_handle fake_inf = remover.tmp.insert(v->point()); - vmap[fake_inf] = infinite_vertex(); - } - else - { - vmap[remover.tmp.infinite_vertex()] = infinite_vertex(); - } - - CGAL_assertion(remover.tmp.dimension() == 3); + const auto ret = fill_auxiliary_triangulation_with_vertices_around_v(remover.tmp, v, adj_vertices); + const auto& vmap = ret.vmap; + const bool inf = ret.vertex_is_incident_to_infinity; // Construct the set of vertex triples of remover.tmp // We reorient the vertex triple so that it matches those from outer_map // Also note that we use the vertices of *this, not of remover.tmp - - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt] = f; - } - } - } else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt] = f; - } - } - } + const Vertex_triple_Facet_map inner_map = create_triangulation_inner_map(remover.tmp, vmap, inf); // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - while(is_infinite(oit->first.first) || - is_infinite(oit->first.second) || - is_infinite(oit->first.third)) - { - ++oit; - // otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } + copy_triangulation_into_hole(vmap, std::move(outer_map), inner_map, fit); - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = - inner_map.find(o_vt_f_pair.first); - CGAL_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - *fit++ = new_ch; - - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - // for the other faces check, if they can also be glued - for(i = 0; i < 4; i++) - { - if(i != i_i) - { - Facet f = std::pair(new_ch,i); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - std::swap(vt.second, vt.third); - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second, vt.third); - outer_map[vt]= f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2, new_ch); - new_ch->set_neighbor(i, o_ch2); - outer_map.erase(oit2); - } - } - } - } tds().delete_vertex(v); tds().delete_cells(hole.begin(), hole.end()); @@ -5956,166 +5676,45 @@ move_if_no_collision(Vertex_handle v, const Point& p, std::vector hole; hole.reserve(64); + incident_cells(v, std::back_inserter(hole)); // Construct the set of vertex triples on the boundary // with the facet just behind - Vertex_triple_Facet_map outer_map; - Vertex_triple_Facet_map inner_map; - - make_hole_3D(v, outer_map, hole); + Vertex_triple_Facet_map outer_map = create_hole_outer_map(v, hole); CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); // Output the hidden points. - for(typename std::vector::iterator hi = hole.begin(), - hend = hole.end(); hi != hend; ++hi) + for(auto ch: hole) { - remover.add_hidden_points(*hi); + remover.add_hidden_points(ch); } - bool inf = false; - unsigned int i; - // collect all vertices on the boundary - std::vector vertices; - vertices.reserve(64); - adjacent_vertices(v, std::back_inserter(vertices)); + std::vector adj_vertices; + adj_vertices.reserve(64); + adjacent_vertices(v, std::back_inserter(adj_vertices)); // create a Delaunay triangulation of the points on the boundary // and make a map from the vertices in remover.tmp towards the vertices // in *this - Vertex_handle_unique_hash_map vmap; - Cell_handle ch = Cell_handle(); - for(i=0; i < vertices.size(); i++) - { - if(! is_infinite(vertices[i])) - { - Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch); - ch = vh->cell(); - vmap[vh] = vertices[i]; - } - else - { - inf = true; - } - } - - if(remover.tmp.dimension() == 2) - { - Vertex_handle fake_inf = remover.tmp.insert(v->point()); - vmap[fake_inf] = infinite_vertex(); - } - else - { - vmap[remover.tmp.infinite_vertex()] = infinite_vertex(); - } - - CGAL_assertion(remover.tmp.dimension() == 3); + const auto ret = fill_auxiliary_triangulation_with_vertices_around_v(remover.tmp, v, adj_vertices); + const auto& vmap = ret.vmap; + const bool inf = ret.vertex_is_incident_to_infinity; // Construct the set of vertex triples of remover.tmp // We reorient the vertex triple so that it matches those from outer_map // Also note that we use the vertices of *this, not of remover.tmp - - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first],vmap[vt_aux.third],vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } + const Vertex_triple_Facet_map inner_map = create_triangulation_inner_map(remover.tmp, vmap, inf); // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - while(is_infinite(oit->first.first) || - is_infinite(oit->first.second) || - is_infinite(oit->first.third)) - { - ++oit; - // otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } - - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = - inner_map.find(o_vt_f_pair.first); - CGAL_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - // for the other faces check, if they can also be glued - for(i = 0; i < 4; i++) - { - if(i != i_i) - { - Facet f = std::pair(new_ch,i); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - std::swap(vt.second,vt.third); - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second,vt.third); - outer_map[vt]= f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2,new_ch); - new_ch->set_neighbor(i, o_ch2); - outer_map.erase(oit2); - } - } - } - } + copy_triangulation_into_hole(vmap, std::move(outer_map), inner_map, Emptyset_iterator{}); // fixing pointer std::vector cells_pt; cells_pt.reserve(64); incident_cells(inserted, std::back_inserter(cells_pt)); - std::size_t size = cells_pt.size(); - for(std::size_t i=0; iset_vertex(c->index(inserted), v); @@ -6395,180 +5994,57 @@ move_if_no_collision_and_give_new_cells(Vertex_handle v, const Point& p, std::vector cells_tmp; cells_tmp.reserve(64); incident_cells(inserted, std::back_inserter(cells_tmp)); - int size = cells_tmp.size(); - for(int i=0; i hole; hole.reserve(64); + incident_cells(v, std::back_inserter(hole)); + + for(auto ch : hole) + { + cells_set.erase(ch); + } // Construct the set of vertex triples on the boundary // with the facet just behind - Vertex_triple_Facet_map outer_map; - Vertex_triple_Facet_map inner_map; - - make_hole_3D(v, outer_map, hole); - - for(typename std::vector::const_iterator ib = hole.begin(), - iend = hole.end(); - ib != iend; ib++) - { - cells_set.erase(*ib); - } + Vertex_triple_Facet_map outer_map = create_hole_outer_map(v, hole); CGAL_assertion(remover.hidden_points_begin() == remover.hidden_points_end()); // Output the hidden points. - for(typename std::vector::iterator hi = hole.begin(), - hend = hole.end(); - hi != hend; ++hi) + for(auto ch: hole) { - remover.add_hidden_points(*hi); + remover.add_hidden_points(ch); } - bool inf = false; - unsigned int i; - // Collect all vertices on the boundary - std::vector vertices; - vertices.reserve(64); - adjacent_vertices(v, std::back_inserter(vertices)); + std::vector adj_vertices; + adj_vertices.reserve(64); + adjacent_vertices(v, std::back_inserter(adj_vertices)); // Create a Delaunay triangulation of the points on the boundary // and make a map from the vertices in remover.tmp towards the vertices // in *this - Vertex_handle_unique_hash_map vmap; - Cell_handle ch = Cell_handle(); - for(i=0; i < vertices.size(); i++) - { - if(! is_infinite(vertices[i])) - { - Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch); - ch = vh->cell(); - vmap[vh] = vertices[i]; - }else { - inf = true; - } - } - - if(remover.tmp.dimension()==2) - { - Vertex_handle fake_inf = remover.tmp.insert(v->point()); - vmap[fake_inf] = infinite_vertex(); - } - else - { - vmap[remover.tmp.infinite_vertex()] = infinite_vertex(); - } - - CGAL_assertion(remover.tmp.dimension() == 3); + const auto ret = fill_auxiliary_triangulation_with_vertices_around_v(remover.tmp, v, adj_vertices); + const auto& vmap = ret.vmap; + const bool inf = ret.vertex_is_incident_to_infinity; // Construct the set of vertex triples of remover.tmp // We reorient the vertex triple so that it matches those from outer_map // Also note that we use the vertices of *this, not of remover.tmp - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(i=0; i < 4; i++) - { - Facet f = std::pair(it,i); - Vertex_triple vt_aux = make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } + const Vertex_triple_Facet_map inner_map = create_triangulation_inner_map(remover.tmp, vmap, inf); // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - while(is_infinite(oit->first.first) || - is_infinite(oit->first.second) || - is_infinite(oit->first.third)) - { - ++oit; - // otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } - - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = - inner_map.find(o_vt_f_pair.first); - CGAL_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - *fit++ = new_ch; - - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - // for the other faces check, if they can also be glued - for(i = 0; i < 4; i++) - { - if(i != i_i) - { - Facet f = std::pair(new_ch, i); - Vertex_triple vt = make_vertex_triple(f); - make_canonical_oriented_triple(vt); - std::swap(vt.second,vt.third); - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second,vt.third); - outer_map[vt] = f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2,new_ch); - new_ch->set_neighbor(i, o_ch2); - outer_map.erase(oit2); - } - } - } - } + copy_triangulation_into_hole(vmap, std::move(outer_map), inner_map, fit); // fixing pointer std::vector cells_pt; cells_pt.reserve(64); incident_cells(inserted, std::back_inserter(cells_pt)); - size = cells_pt.size(); - for(int i=0; iset_vertex(c->index(inserted), v); @@ -6592,7 +6068,7 @@ template < class Gt, class Tds, class Lds > void Triangulation_3:: _make_big_hole_3D(Vertex_handle v, - std::map& outer_map, + Vertex_triple_Facet_map& outer_map, std::vector& hole, std::vector& vertices, std::map& vstates) @@ -6705,13 +6181,12 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem vstates[v] = PROCESSED; // here, we make the hole for the cluster with v inside - typedef std::map Vertex_triple_Facet_map; std::vector hole; - std::vector vertices; + std::vector adj_vertices; hole.reserve(64); - vertices.reserve(32); + adj_vertices.reserve(32); Vertex_triple_Facet_map outer_map; - _make_big_hole_3D(v, outer_map, hole, vertices, vstates); + _make_big_hole_3D(v, outer_map, hole, adj_vertices, vstates); // the connectivity is totally lost, we need to rebuild if(!outer_map.size()) @@ -6721,7 +6196,7 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem return false; } - std::size_t vsi = vertices.size(); + std::size_t vsi = adj_vertices.size(); bool inf = false; std::size_t i; @@ -6735,7 +6210,7 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem std::map mp_vps; for(i=0; iis_infinite(vv)) { vps.push_back(vv->point()); @@ -6768,7 +6243,7 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem vmap[vh] = vv; } - if(remover.tmp.dimension()==2) + if(remover.tmp.dimension() == 2) { Vertex_handle fake_inf = remover.tmp.insert(v->point()); vmap[fake_inf] = this->infinite_vertex(); @@ -6782,11 +6257,11 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem { for(i=0; i < vsi; i++) { - if(!this->is_infinite(vertices[i])) + if(!this->is_infinite(adj_vertices[i])) { - Vertex_handle vh = remover.tmp.insert(vertices[i]->point(), ch); + Vertex_handle vh = remover.tmp.insert(adj_vertices[i]->point(), ch); ch = vh->cell(); - vmap[vh] = vertices[i]; + vmap[vh] = adj_vertices[i]; } else { @@ -6794,7 +6269,7 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem } } - if(remover.tmp.dimension()==2) + if(remover.tmp.dimension() == 2) { Vertex_handle fake_inf = remover.tmp.insert(v->point()); vmap[fake_inf] = this->infinite_vertex(); @@ -6805,105 +6280,10 @@ _remove_cluster_3D(InputIterator first, InputIterator beyond, VertexRemover& rem } } - Vertex_triple_Facet_map inner_map; - - if(inf) - { - for(All_cells_iterator it = remover.tmp.all_cells_begin(), - end = remover.tmp.all_cells_end(); it != end; ++it) - { - for(unsigned int index=0; index < 4; index++) - { - Facet f = std::pair(it,index); - Vertex_triple vt_aux = this->make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - this->make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } - else - { - for(Finite_cells_iterator it = remover.tmp.finite_cells_begin(), - end = remover.tmp.finite_cells_end(); it != end; ++it) - { - for(unsigned int index=0; index < 4; index++) - { - Facet f = std::pair(it,index); - Vertex_triple vt_aux = this->make_vertex_triple(f); - Vertex_triple vt(vmap[vt_aux.first], vmap[vt_aux.third], vmap[vt_aux.second]); - this->make_canonical_oriented_triple(vt); - inner_map[vt]= f; - } - } - } + const Vertex_triple_Facet_map inner_map = create_triangulation_inner_map(remover.tmp, vmap, inf); // Grow inside the hole, by extending the surface - while(! outer_map.empty()) - { - typename Vertex_triple_Facet_map::iterator oit = outer_map.begin(); - - while(this->is_infinite(oit->first.first) || - this->is_infinite(oit->first.second) || - this->is_infinite(oit->first.third)) - { - ++oit; - // otherwise the lookup in the inner_map fails - // because the infinite vertices are different - } - - typename Vertex_triple_Facet_map::value_type o_vt_f_pair = *oit; - outer_map.erase(oit); - Cell_handle o_ch = o_vt_f_pair.second.first; - unsigned int o_i = o_vt_f_pair.second.second; - - typename Vertex_triple_Facet_map::iterator iit = - inner_map.find(o_vt_f_pair.first); - CGAL_assertion(iit != inner_map.end()); - typename Vertex_triple_Facet_map::value_type i_vt_f_pair = *iit; - Cell_handle i_ch = i_vt_f_pair.second.first; - unsigned int i_i = i_vt_f_pair.second.second; - - // create a new cell and glue it to the outer surface - Cell_handle new_ch = tds().create_cell(); - new_ch->set_vertices(vmap[i_ch->vertex(0)], vmap[i_ch->vertex(1)], - vmap[i_ch->vertex(2)], vmap[i_ch->vertex(3)]); - - o_ch->set_neighbor(o_i,new_ch); - new_ch->set_neighbor(i_i, o_ch); - - for(int j=0; j<4; j++) - new_ch->vertex(j)->set_cell(new_ch); - - // for the other faces check, if they can also be glued - for(unsigned int index = 0; index < 4; index++) - { - if(index != i_i) - { - Facet f = std::pair(new_ch,index); - Vertex_triple vt = this->make_vertex_triple(f); - this->make_canonical_oriented_triple(vt); - std::swap(vt.second,vt.third); - typename Vertex_triple_Facet_map::iterator oit2 = outer_map.find(vt); - if(oit2 == outer_map.end()) - { - std::swap(vt.second,vt.third); - outer_map[vt]= f; - } - else - { - // glue the faces - typename Vertex_triple_Facet_map::value_type o_vt_f_pair2 = *oit2; - Cell_handle o_ch2 = o_vt_f_pair2.second.first; - int o_i2 = o_vt_f_pair2.second.second; - o_ch2->set_neighbor(o_i2,new_ch); - new_ch->set_neighbor(index, o_ch2); - outer_map.erase(oit2); - } - } - } - - } + copy_triangulation_into_hole(vmap, std::move(outer_map), inner_map, Emptyset_iterator{}); this->tds().delete_cells(hole.begin(), hole.end()); remover.tmp.clear(); From 89cf5c55470ed3052af061269351a97ee7f965cb Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 6 Feb 2023 10:13:11 +0100 Subject: [PATCH 52/60] Fix CMAKE_NO_SYSTEM_FROM_IMPORTED --- Installation/lib/cmake/CGAL/CGALConfig.cmake | 28 +++++++++----------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/Installation/lib/cmake/CGAL/CGALConfig.cmake b/Installation/lib/cmake/CGAL/CGALConfig.cmake index b807ad3c412..b9030ecc4dc 100644 --- a/Installation/lib/cmake/CGAL/CGALConfig.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfig.cmake @@ -115,6 +115,18 @@ include(${CGAL_MODULES_DIR}/CGAL_enable_end_of_configuration_hook.cmake) set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake) +include(${CGAL_CONFIG_DIR}/CGALConfigVersion.cmake) + +# Temporary? Change the CMAKE module path +cgal_setup_module_path() + +include(${CGAL_MODULES_DIR}/CGAL_target_use_TBB.cmake) + +if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE ) + # Do not use -isystem for CGAL include paths + set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE) +endif() + foreach(comp ${CGAL_FIND_COMPONENTS}) if(NOT comp MATCHES "Core|ImageIO|Qt5") message(FATAL_ERROR "The requested CGAL component ${comp} does not exist!") @@ -184,19 +196,3 @@ if (NOT TARGET CGAL::CGAL_Basic_viewer) INTERFACE_LINK_LIBRARIES CGAL::CGAL_Qt5) endif() -include(${CGAL_CONFIG_DIR}/CGALConfigVersion.cmake) - -# -# -# - -# Temporary? Change the CMAKE module path -cgal_setup_module_path() - -set(CGAL_USE_FILE ${CGAL_MODULES_DIR}/UseCGAL.cmake) -include(${CGAL_MODULES_DIR}/CGAL_target_use_TBB.cmake) - -if( CGAL_DEV_MODE OR RUNNING_CGAL_AUTO_TEST OR CGAL_TEST_SUITE ) - # Do not use -isystem for CGAL include paths - set(CMAKE_NO_SYSTEM_FROM_IMPORTED TRUE) -endif() From 789f2c3b6053e7a3bf607e4c3c764bbcdef93e5a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 7 Feb 2023 06:58:56 +0000 Subject: [PATCH 53/60] Polygon is already defined in a windows.h --- Polygon/test/Polygon/issue7228.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polygon/test/Polygon/issue7228.cpp b/Polygon/test/Polygon/issue7228.cpp index 2740f7afa42..d6616ecb2f8 100644 --- a/Polygon/test/Polygon/issue7228.cpp +++ b/Polygon/test/Polygon/issue7228.cpp @@ -7,13 +7,13 @@ typedef CGAL::Simple_cartesian K; typedef K::Point_2 Point; -typedef CGAL::Polygon_2 Polygon; +typedef CGAL::Polygon_2 Polygon_2; typedef Polygon::Vertex_circulator Vertex_circulator; int main() { std::array points = { Point(0,0), Point(1,0), Point(1,1), Point(0,1) }; - Polygon poly(points.begin(), points.end()); + Polygon_2 poly(points.begin(), points.end()); Vertex_circulator vc = poly.vertices_circulator(); From 1ba1810816580c13a0e0fd4bed0d7731a76bacb4 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 7 Feb 2023 14:47:01 +0100 Subject: [PATCH 54/60] mention mesh_3 --- Installation/CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index a8e5332db23..fc0ebf78787 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -21,7 +21,7 @@ Release date: June 2023 which have output iterators for vertices and faces as parameter. They are replaced by overloads with two additional named parameters. - Added the function `CGAL::Polygon_mesh_processing::surface_Delaunay_remeshing()`, that remeshes a surface triangle mesh following the -CGAL tetrahedral Delaunay refinement algorithm. +CGAL tetrahedral Delaunay refinement algorithm, using the 3D mesh generation package. - Added the function `CGAL::Polygon_mesh_processing::remove_almost_degenerate_faces()` to remove badly shaped triangles faces in a mesh. From 66c1fb0a8313cd86321cd75afbaee111c8793529 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 7 Feb 2023 14:51:50 +0100 Subject: [PATCH 55/60] improve changes --- Installation/CHANGES.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index fc0ebf78787..ea7da392a23 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -20,8 +20,8 @@ Release date: June 2023 `CGAL::Polygon_mesh_processing::triangulate_and_refine_hole()`, and `CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole()` which have output iterators for vertices and faces as parameter. They are replaced by overloads with two additional named parameters. -- Added the function `CGAL::Polygon_mesh_processing::surface_Delaunay_remeshing()`, that remeshes a surface triangle mesh following the -CGAL tetrahedral Delaunay refinement algorithm, using the 3D mesh generation package. +- Added the function `CGAL::Polygon_mesh_processing::surface_Delaunay_remeshing()`, that remeshes a surface triangle mesh using + the Delaunay refinement algorithm from the 3D Mesh Generation package. - Added the function `CGAL::Polygon_mesh_processing::remove_almost_degenerate_faces()` to remove badly shaped triangles faces in a mesh. From 0379f9c74e576f35ff14efa6ead3861206b6665a Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 8 Feb 2023 07:34:06 +0000 Subject: [PATCH 56/60] Why the hell did I not compile to test the 'trivial fix' --- Polygon/test/Polygon/issue7228.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polygon/test/Polygon/issue7228.cpp b/Polygon/test/Polygon/issue7228.cpp index d6616ecb2f8..623a8633130 100644 --- a/Polygon/test/Polygon/issue7228.cpp +++ b/Polygon/test/Polygon/issue7228.cpp @@ -8,7 +8,7 @@ typedef CGAL::Simple_cartesian K; typedef K::Point_2 Point; typedef CGAL::Polygon_2 Polygon_2; -typedef Polygon::Vertex_circulator Vertex_circulator; +typedef Polygon_2::Vertex_circulator Vertex_circulator; int main() { From 01e75ef34568170228bd036d259fa1cc41ae2cbb Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 14 Feb 2023 13:27:46 +0100 Subject: [PATCH 57/60] Fix with -DCGAL_NO_DEPRECATED_CODE --- Triangulation_2/include/CGAL/Constrained_triangulation_2.h | 1 + .../internal/Polyline_constraint_hierarchy_2.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index 37c27cb81a8..80d7a197e3e 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -622,6 +622,7 @@ public: #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS auto display_vertex(Vertex_handle v) const { With_point_tag point_tag; + using CGAL::IO::oformat; return oformat(v, point_tag); } #endif // CGAL_CDT_2_DEBUG_INTERSECTIONS diff --git a/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h b/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h index 8870458b042..7178b1dc5fa 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2/internal/Polyline_constraint_hierarchy_2.h @@ -862,6 +862,7 @@ insert_constraint(T va, T vb){ Context_list* fathers; #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + using CGAL::IO::oformat; std::cerr << CGAL::internal::cdt_2_indent_level << "C_hierachy.insert_constraint( " << oformat(va) << ", " << oformat(vb) << ")\n"; @@ -896,6 +897,7 @@ insert_constraint_old_API(T va, T vb){ Context_list* fathers; #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + using CGAL::IO::oformat; std::cerr << CGAL::internal::cdt_2_indent_level << "C_hierachy.insert_constraint_old_API( " << oformat(va) << ", " << oformat(vb) << ")\n"; @@ -928,6 +930,7 @@ append_constraint(Constraint_id cid, T va, T vb){ Context_list* fathers; #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + using CGAL::IO::oformat; std::cerr << CGAL::internal::cdt_2_indent_level << "C_hierachy.append_constraint( ..., " << oformat(va) << ", " << oformat(vb) << ")\n"; @@ -1044,6 +1047,7 @@ void Polyline_constraint_hierarchy_2:: add_Steiner(T va, T vb, T vc){ #ifdef CGAL_CDT_2_DEBUG_INTERSECTIONS + using CGAL::IO::oformat; std::cerr << CGAL::internal::cdt_2_indent_level << "C_hierachy.add_Steinter( " << oformat(va) << ", " << oformat(vb) << ", " << oformat(vc) From 166ff0fdc71e9287a9c77e36e047f21b45fce529 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 14 Feb 2023 13:28:07 +0100 Subject: [PATCH 58/60] Try to fix compilation with MSVC++ --- STL_Extension/include/CGAL/Base_with_time_stamp.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/STL_Extension/include/CGAL/Base_with_time_stamp.h b/STL_Extension/include/CGAL/Base_with_time_stamp.h index 1e2dbeff088..cbed66de81f 100644 --- a/STL_Extension/include/CGAL/Base_with_time_stamp.h +++ b/STL_Extension/include/CGAL/Base_with_time_stamp.h @@ -20,13 +20,6 @@ template class Base_with_time_stamp : public Base { std::size_t time_stamp_ = -1; public: - using Base::Base; - - Base_with_time_stamp(const Base_with_time_stamp& other) : - Base(other), - time_stamp_(other.time_stamp_) - {} - typedef CGAL::Tag_true Has_timestamp; std::size_t time_stamp() const { From 097b14d055eb94beaf8c4b6a50efc93d245c925c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 16 Feb 2023 10:20:31 +0100 Subject: [PATCH 59/60] add missing include directive --- Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h b/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h index 91adc9fa970..f82c6b68d66 100644 --- a/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h +++ b/Stream_support/include/CGAL/IO/OFF/File_scanner_OFF.h @@ -25,6 +25,7 @@ #include +#include #include #include #include From 3c2ce13dd98acb9386b127338ba0c46060b73f50 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 16 Feb 2023 13:18:03 +0100 Subject: [PATCH 60/60] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index ce30c5ee6d7..03e9c354bc3 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -21,11 +21,11 @@ LC_CTYPE=en_US.UTF-8 # "master" alone 0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/master.git --do-it --public || echo ERROR # "integration" -0 21 * * Mon,Tue,Wed,Thu cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --do-it || echo ERROR +0 21 * * Mon,Tue,Wed cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --do-it || echo ERROR # from branch 5.5 0 21 * * Fri cd $HOME/CGAL/create_internal_release-5.5-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.5-branch.git --public --do-it || echo ERROR # from branch 5.4 -0 21 * * Sat cd $HOME/CGAL/create_internal_release-5.4-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.4-branch.git --public --do-it || echo ERROR +0 21 * * Sat,Thu cd $HOME/CGAL/create_internal_release-5.4-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.4-branch.git --public --do-it || echo ERROR ## Older stuff