From 15fd5ce293a6baeca134feed1c70a80cec738007 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 1 Aug 2019 13:14:17 +0200 Subject: [PATCH 1/9] Lock resources between the 2 triangulate_hole tests to prevent the results from generate_mesh_with_hole to be cleaned before the end. --- .../test/Polygon_mesh_processing/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index 6ffde721a7d..5e9ffb8e54c 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -113,3 +113,9 @@ if(OpenMesh_FOUND) target_link_libraries( remeshing_test_P_SM_OM PRIVATE ${OPENMESH_LIBRARIES} ) endif() +if(BUILD_TESTING) + set_tests_properties( + execution___of__triangulate_hole_Polyhedron_3_no_delaunay_test + execution___of__triangulate_hole_Polyhedron_3_test + PROPERTIES RESOURCE_LOCK Triangulation_with_hole) +endif() From 92b6a98e4357704ffb2a5351e48a0303e15c6cfa Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 8 Aug 2019 15:47:50 +0200 Subject: [PATCH 2/9] lock resources in Circular_kernel_2 --- Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt b/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt index dc4bb0315ef..ba53b08efa6 100644 --- a/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt +++ b/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt @@ -36,3 +36,10 @@ else() endif() +if(BUILD_TESTING) + set_tests_properties( + execution___of__test_Circular_kernel_basic + execution___of__test_Exact_circular_kernel_basic + PROPERTIES RESOURCE_LOCK Circular_kernel_basic) +endif() + From a4b171d77f78692e6c50485775644224bf8d0638 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 14 Aug 2019 13:02:49 +0200 Subject: [PATCH 3/9] Add a compilation_test for demo_framework in the Polyhedorn_Demo and make everythink else depend on it, to try and fix the truncated file errors in the testsuite --- Polyhedron/demo/Polyhedron/CMakeLists.txt | 6 ++++++ Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index fdd2436a975..3a42075d74f 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -192,6 +192,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND ) target_link_libraries(demo_framework PUBLIC Qt5::OpenGL Qt5::Widgets Qt5::Gui Qt5::Script ) + cgal_add_compilation_test(demo_framework) # Let's define `three_EXPORT` during the compilation of `demo_framework`, # in addition of `demo_framework_EXPORT` (defined automatically by # CMake). That is to deal with the visibility of symbols of @@ -226,6 +227,11 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND ) PUBLIC demo_framework ${CGAL_LIBRARIES} Qt5::OpenGL Qt5::Gui Qt5::Script Qt5::Widgets) cgal_add_compilation_test(${item_name}) + if(BUILD_TESTING) + set_tests_properties( + compilation_of__${item_name} + PROPERTIES DEPENDS compilation__of_demo_framework) + endif() endmacro(add_item) add_item(scene_c3t3_item Scene_c3t3_item.cpp) diff --git a/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake b/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake index 852c81448cc..2d1bd37c6fd 100644 --- a/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake +++ b/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake @@ -27,7 +27,11 @@ include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) PROPERTY LIBRARY_OUTPUT_DIRECTORY "${CGAL_POLYHEDRON_DEMO_PLUGINS_DIR}") cgal_add_compilation_test(${plugin_name}) - + if(BUILD_TESTING) + set_tests_properties( + compilation_of__${plugin_name} + PROPERTIES DEPENDS compilation__of_demo_framework) + endif() add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${plugin_name} ) # Link with Qt target_link_libraries( ${plugin_name} PUBLIC ${QT_LIBRARIES} ) From 3513016dcf40220b7c8de66c1e6a45fec36deaf9 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 16 Aug 2019 12:22:11 +0200 Subject: [PATCH 4/9] Updates for ctest with visual generator --- .../Arrangement_on_surface_2/cgal_test.cmake | 1 + .../Hyperbolic_triangulation_2/CMakeLists.txt | 35 +++++++++++++++++++ Installation/CMakeLists.txt | 5 +++ .../cmake/modules/CGAL_add_test.cmake | 10 ++++-- ...GAL_enable_end_of_configuration_hook.cmake | 32 ++++++++++++++++- Installation/src/CMakeLists.txt | 5 ++- Installation/test/Installation/CMakeLists.txt | 5 ++- Polyhedron/demo/Polyhedron/CMakeLists.txt | 1 + 8 files changed, 89 insertions(+), 5 deletions(-) create mode 100644 Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake index 3d1c81422e4..59490f24b0b 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/cgal_test.cmake @@ -152,6 +152,7 @@ function(cgal_arr_2_add_target exe_name source_file) set(name ${exe_name}_${suffix}) endif() add_executable(${name} ${source_file}) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${name} ) separate_arguments(flags UNIX_COMMAND "${TESTSUITE_CXXFLAGS}") target_compile_options(${name} PRIVATE ${flags}) cgal_debug_message(STATUS "# -> target ${name} with TESTSUITE_CXXFLAGS: ${flags}") diff --git a/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt new file mode 100644 index 00000000000..891a5b6d017 --- /dev/null +++ b/Hyperbolic_triangulation_2/demo/Hyperbolic_triangulation_2/CMakeLists.txt @@ -0,0 +1,35 @@ + +cmake_minimum_required(VERSION 3.1...3.15) +project (Hyperbolic_triangulation_2_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(POLICY CMP0071) + cmake_policy(SET CMP0071 NEW) +endif() + +find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core Qt5) +find_package(LEDA QUIET) + +find_package(Qt5 QUIET COMPONENTS Widgets) + +include_directories (BEFORE include) + +if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND (CGAL_Core_FOUND OR LEDA_FOUND)) + # ui files, created with Qt Designer + qt5_wrap_ui( UIS HDT2.ui ) + + # qrc files (resources files, that contain icons, at least) + qt5_add_resources ( RESOURCE_FILES resources/Delaunay_triangulation_2.qrc ) + + # cpp files + add_executable ( HDT2 HDT2.cpp ${CGAL_Qt5_RESOURCE_FILES} ${RESOURCE_FILES} ${UIS}) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS HDT2 ) + target_link_libraries ( HDT2 CGAL::CGAL CGAL::CGAL_Qt5 CGAL::CGAL_Core Qt5::Widgets) +else() + message(STATUS "NOTICE: This demo requires CGAL, CGAL_Core (or LEDA), and Qt5 and will not be compiled.") +endif() diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 70d6cae5330..a88af9b16c4 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -950,11 +950,16 @@ endif() # #-------------------------------------------------------------------------------------------------- +if(NOT TARGET ALL_CGAL_TARGETS) + add_custom_target( ALL_CGAL_TARGETS ) +endif() + macro( add_programs subdir target ON_OFF ) cache_set( CGAL_EXECUTABLE_TARGETS "" ) add_custom_target( ${target} ) + add_dependencies( ALL_CGAL_TARGETS ${target} ) option( WITH_${target} "Select ${target}" ${ON_OFF} ) if ( WITH_${target} ) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index d1f30fcec3a..251a5e27275 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -86,15 +86,21 @@ function(cgal_add_compilation_test exe_name) return() endif() add_test(NAME "compilation_of__${exe_name}" - COMMAND ${TIME_COMMAND} "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "${exe_name}") + COMMAND ${TIME_COMMAND} "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "${exe_name}" --config "$") set_property(TEST "compilation_of__${exe_name}" APPEND PROPERTY LABELS "${PROJECT_NAME}") + if(NOT TARGET ALL_CGAL_TARGETS) + add_custom_target( ALL_CGAL_TARGETS ) + endif() if(NOT TARGET cgal_check_build_system) add_custom_target(cgal_check_build_system) + add_dependencies( ALL_CGAL_TARGETS cgal_check_build_system ) endif() if(NOT TEST check_build_system) add_test(NAME "check_build_system" - COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "cgal_check_build_system") + COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "cgal_check_build_system" --config "$") + set_property(TEST "check_build_system" + APPEND PROPERTY LABELS "Installation") if(POLICY CMP0066) # cmake 3.7 or later set_property(TEST "check_build_system" PROPERTY FIXTURES_SETUP "check_build_system_SetupFixture") diff --git a/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake b/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake index 6f8e423af1d..ebd518c8ab0 100644 --- a/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake +++ b/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake @@ -9,7 +9,7 @@ get_property(PROPERTY_CGAL_run_at_the_end_of_configuration_INCLUDED GLOBAL PROPERTY CGAL_run_at_the_end_of_configuration_INCLUDED) -if(PROPERTY_CGAL_run_at_the_end_of_configuration_INCLUDED) +if(CGAL_SKIP_CMAKE_HOOKS OR PROPERTY_CGAL_run_at_the_end_of_configuration_INCLUDED) return() endif() @@ -17,6 +17,36 @@ function(CGAL_run_at_the_end_of_configuration variable access value current_list if(NOT access STREQUAL "MODIFIED_ACCESS") return() endif() + if(current_list_file STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt" + AND NOT current_list_file STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt" OR NOT stack STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt" + AND stack STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt") OR stack MATCHES doc/CMakeLists.txt + OR stack MATCHES demo/Polyhedron/) + return() + endif() + get_property(_targets DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY BUILDSYSTEM_TARGETS) + if(CGAL_CHECK_UNREFERENCES_TARGETS) + set(_list_of_deps) + set(_special_targets demos examples tests ALL_CGAL_TARGETS CGAL_Qt5_moc_and_resources uninstall install_FindCGAL) + foreach(t ${_special_targets}) + if(NOT TARGET ${t}) + continue() + endif() + get_property(_deps TARGET ${t} PROPERTY MANUALLY_ADDED_DEPENDENCIES) + message(" deps of ${t}: ${_deps}") + list(APPEND _list_of_deps ${_deps}) + endforeach() + list(APPEND _list_of_deps ${CGAL_EXECUTABLE_TARGETS}) + message(STATUS " all deps: ${_list_of_deps}") + foreach(target ${_targets}) + message(STATUS " new target: ${target}") + if(${target} IN_LIST _special_targets) + continue() + endif() + if(NOT ${target} IN_LIST _list_of_deps) + message(AUTHOR_WARNING " orphan target: ${target}") + endif() + endforeach() + endif() if(CGAL_CHECK_UNUSED_CPP_FILES AND NOT current_list_file STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt" AND stack STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt") diff --git a/Installation/src/CMakeLists.txt b/Installation/src/CMakeLists.txt index caf995799b3..4cc0ae360e7 100644 --- a/Installation/src/CMakeLists.txt +++ b/Installation/src/CMakeLists.txt @@ -68,7 +68,10 @@ function (collect_cgal_library LIBRARY_NAME ADDITIONAL_FILES) # CMakeLists.txt can be the target like if it was an imported # target. add_library(CGAL::${LIBRARY_NAME} ALIAS ${LIBRARY_NAME}) - + if(NOT TARGET ALL_CGAL_TARGETS) + add_custom_target( ALL_CGAL_TARGETS ) + endif() + add_dependencies( ALL_CGAL_TARGETS ${LIBRARY_NAME} ) if(CGAL_AUTO_LINK_ENABLED) if (NOT CGAL_HEADER_ONLY) set_target_properties( ${LIBRARY_NAME} PROPERTIES diff --git a/Installation/test/Installation/CMakeLists.txt b/Installation/test/Installation/CMakeLists.txt index 4727106e2e6..fb9093d880e 100644 --- a/Installation/test/Installation/CMakeLists.txt +++ b/Installation/test/Installation/CMakeLists.txt @@ -23,7 +23,9 @@ macro(create_link_to_program COMPONENT ) else() target_link_libraries(link_to_${COMPONENT} CGAL::${COMPONENT} ${CGAL_3RD_PARTY_LIBRARIES} ${${COMPONENT}_3RD_PARTY_LIBRARIES} ) endif() - + + add_to_cached_list( CGAL_EXECUTABLE_TARGETS link_to_${COMPONENT} ) + endmacro() find_package(CGAL QUIET COMPONENTS Core) @@ -85,6 +87,7 @@ if ( CGAL_FOUND ) add_executable(test_gmp_mpfr_dll test_gmp_mpfr_dll.cpp) target_link_libraries(test_gmp_mpfr_dll version) CGAL_add_test(test_gmp_mpfr_dll) + add_to_cached_list( CGAL_EXECUTABLE_TARGETS test_gmp_mpfr_dll ) endif() find_package( LEDA QUIET) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 3a42075d74f..1eb28efb128 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -232,6 +232,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND ) compilation_of__${item_name} PROPERTIES DEPENDS compilation__of_demo_framework) endif() + add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${item_name} ) endmacro(add_item) add_item(scene_c3t3_item Scene_c3t3_item.cpp) From abc42299b84d7c8387bd26662efeea3e026f6d8c Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 16 Aug 2019 13:05:22 +0200 Subject: [PATCH 5/9] Fix Polyline_simplification_2 demo UI file --- .../Polyline_simplification_2.ui | 281 +++++++----------- 1 file changed, 113 insertions(+), 168 deletions(-) diff --git a/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.ui b/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.ui index 1d0451ab4cc..f770b2c5467 100644 --- a/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.ui +++ b/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.ui @@ -1,8 +1,9 @@ - + + GeometryFactory Polyline_simplification_2 - - + + 0 0 @@ -10,259 +11,211 @@ 600 - + CGAL Polyline Simplification - - + + :/cgal/logos/cgal_icon:/cgal/logos/cgal_icon - - - - - File Tools - - - TopToolBarArea - - - false - - - - - - - - - + + + + + Qt::StrongFocus - + Qt::ScrollBarAlwaysOn - + Qt::ScrollBarAlwaysOn - + QGraphicsView::NoAnchor - - - - + + + + File Tools + + + TopToolBarArea + + + false + + + + + + Visualization Tools - + TopToolBarArea - + false - - - - - - - - - - Error or % value: - - - - - - 50 - - + + + + + + + + - - - + + TopToolBarArea - + false - - - true - - - Stop at % - - - - - Stop at Error - - - - - + + TopToolBarArea - + false - - - true - - - Abs - - - - - Rel - - - - - Mixed - - - - - + + 0 0 - 800 - 19 + 1000 + 20 - - + + &File - - - + + + - - + + - - + + &Tools - - - - - - + + + + + + - - + + - - + + &About - - + + About &CGAL - - + + &Quit - + Ctrl+Q - - + + true - + true - - + + :/cgal/Input/inputPolyline.png:/cgal/Input/inputPolyline.png - + &Insert Polyline - + Insert Point or Polyline - + Left: Insert vtx | Right: Final vtx | Del: Delete vtx - - - + + + :/cgal/fileToolbar/fileNew.png:/cgal/fileToolbar/fileNew.png - + &Clear - + Ctrl+C - - + + true - - - :/cgal/Actions/icons/triangulation.png:/cgal/Actions/icons/triangulation.png - + + + :/cgal/Actions/icons/triangulation.png:/cgal/Actions/icons/triangulation.png - + Show &triangulation - + Ctrl+T - - - + + + :/cgal/fileToolbar/fileOpen.png:/cgal/fileToolbar/fileOpen.png - + &Load... - + Ctrl+L - - - + + + :/cgal/Input/zoom-best-fit:/cgal/Input/zoom-best-fit - + Re&center the viewport - + Ctrl+R - - + + Simplify polylines - + Ctrl+S @@ -273,20 +226,12 @@ - - - - - + + + + - - - thresholdSlider - valueChanged(int) - MainWindow - setThreshold(int) - - + setThreshold(int) From ba9adf4aa955cf9cef379b2219f843cbba08b3f8 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 16 Aug 2019 13:08:00 +0200 Subject: [PATCH 6/9] Fix typo --- .../modules/CGAL_enable_end_of_configuration_hook.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake b/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake index ebd518c8ab0..7678282783e 100644 --- a/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake +++ b/Installation/cmake/modules/CGAL_enable_end_of_configuration_hook.cmake @@ -18,8 +18,10 @@ function(CGAL_run_at_the_end_of_configuration variable access value current_list return() endif() if(current_list_file STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt" - AND NOT current_list_file STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt" OR NOT stack STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt" - AND stack STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt") OR stack MATCHES doc/CMakeLists.txt + AND NOT current_list_file STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt" + OR NOT stack STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt" + AND stack STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt" + OR stack MATCHES doc/CMakeLists.txt OR stack MATCHES demo/Polyhedron/) return() endif() From d0e94eca497bbf0aa89bcec5baf7bee481a3da77 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 16 Aug 2019 13:57:27 +0200 Subject: [PATCH 7/9] Add missing instruction to Polyline_simplification demo that prevented ctest from finding the UI. --- .../Polyline_simplification_2/CMakeLists.txt | 2 + .../Polyline_simplification_2.ui | 281 +++++++++++------- 2 files changed, 170 insertions(+), 113 deletions(-) diff --git a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt index 3b076bd0f77..a08935b843d 100644 --- a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt +++ b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt @@ -13,6 +13,8 @@ find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Widgets Svg) include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include) diff --git a/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.ui b/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.ui index f770b2c5467..1d0451ab4cc 100644 --- a/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.ui +++ b/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.ui @@ -1,9 +1,8 @@ - - + GeometryFactory Polyline_simplification_2 - - + + 0 0 @@ -11,211 +10,259 @@ 600 - + CGAL Polyline Simplification - - + + :/cgal/logos/cgal_icon:/cgal/logos/cgal_icon - - - - - + + + + + File Tools + + + TopToolBarArea + + + false + + + + + + + + + Qt::StrongFocus - + Qt::ScrollBarAlwaysOn - + Qt::ScrollBarAlwaysOn - + QGraphicsView::NoAnchor - - - - File Tools - - - TopToolBarArea - - - false - - - - - - + + + + Visualization Tools - + TopToolBarArea - + false - - - - - - - - + + + + + + + + + + Error or % value: + + + + + + 50 + + - - + + + TopToolBarArea - + false + + + true + + + Stop at % + + + + + Stop at Error + + - - + + + TopToolBarArea - + false + + + true + + + Abs + + + + + Rel + + + + + Mixed + + - - + + + 0 0 - 1000 - 20 + 800 + 19 - - + + &File - - - + + + - - + + - - + + &Tools - - - - - - + + + + + + - - + + - - + + &About - - + + About &CGAL - - + + &Quit - + Ctrl+Q - - + + true - + true - - + + :/cgal/Input/inputPolyline.png:/cgal/Input/inputPolyline.png - + &Insert Polyline - + Insert Point or Polyline - + Left: Insert vtx | Right: Final vtx | Del: Delete vtx - - - + + + :/cgal/fileToolbar/fileNew.png:/cgal/fileToolbar/fileNew.png - + &Clear - + Ctrl+C - - + + true - - - :/cgal/Actions/icons/triangulation.png:/cgal/Actions/icons/triangulation.png + + + :/cgal/Actions/icons/triangulation.png:/cgal/Actions/icons/triangulation.png + - + Show &triangulation - + Ctrl+T - - - + + + :/cgal/fileToolbar/fileOpen.png:/cgal/fileToolbar/fileOpen.png - + &Load... - + Ctrl+L - - - + + + :/cgal/Input/zoom-best-fit:/cgal/Input/zoom-best-fit - + Re&center the viewport - + Ctrl+R - - + + Simplify polylines - + Ctrl+S @@ -226,12 +273,20 @@ - - - - + + + + + - + + + thresholdSlider + valueChanged(int) + MainWindow + setThreshold(int) + + setThreshold(int) From e2299db86459a75443076b9261c775f5ee8e533c Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 3 Sep 2019 16:41:59 +0200 Subject: [PATCH 8/9] Add a target depending on all the items, and make every plugin test depend on it. This way we hope to prevent multiple ans simultaneous compilation of the same target, which leads to the "truncated file" bug. --- Polyhedron/demo/Polyhedron/CMakeLists.txt | 14 ++++++++------ .../demo/Polyhedron/polyhedron_demo_macros.cmake | 5 ++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 1eb28efb128..d968059cff6 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -221,16 +221,20 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND ) target_link_libraries(point_dialog PUBLIC Qt5::OpenGL Qt5::Gui Qt5::Script Qt5::Widgets) + if(BUILD_TESTING) + add_custom_target(test_items) + cgal_add_compilation_test(test_items) + set_property(TEST compilation_of__test_items + APPEND PROPERTY DEPENDS compilation_of__demo_framework) + endif(BUILD_TESTING) + macro(add_item item_name) add_library(${item_name} SHARED ${ARGN}) target_link_libraries(${item_name} PUBLIC demo_framework ${CGAL_LIBRARIES} Qt5::OpenGL Qt5::Gui Qt5::Script Qt5::Widgets) - cgal_add_compilation_test(${item_name}) if(BUILD_TESTING) - set_tests_properties( - compilation_of__${item_name} - PROPERTIES DEPENDS compilation__of_demo_framework) + add_dependencies(test_items ${item_name}) endif() add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${item_name} ) endmacro(add_item) @@ -322,7 +326,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND ) CGAL_target_use_TBB(scene_points_with_normal_item) endif() - foreach( lib demo_framework scene_basic_objects @@ -345,7 +348,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND ) add_executable ( Polyhedron_3 Polyhedron_3.cpp ) target_link_libraries( Polyhedron_3 PRIVATE polyhedron_demo ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polyhedron_3 ) - cgal_add_compilation_test(polyhedron_demo) if( POLYHEDRON_QTSCRIPT_DEBUGGER ) if(TARGET Qt5::ScriptTools) diff --git a/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake b/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake index 2d1bd37c6fd..e9bfb55ef8a 100644 --- a/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake +++ b/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake @@ -28,9 +28,8 @@ include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) "${CGAL_POLYHEDRON_DEMO_PLUGINS_DIR}") cgal_add_compilation_test(${plugin_name}) if(BUILD_TESTING) - set_tests_properties( - compilation_of__${plugin_name} - PROPERTIES DEPENDS compilation__of_demo_framework) + set_property(TEST compilation_of__${plugin_name} + APPEND PROPERTY DEPENDS compilation_of__test_items) endif() add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${plugin_name} ) # Link with Qt From 0d2f7a7204cb411b954a9e61b2f8e3bfe54996bf Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 6 Sep 2019 11:53:44 +0200 Subject: [PATCH 9/9] More time for test_items --- Polyhedron/demo/Polyhedron/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index d968059cff6..c25395fb197 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -226,6 +226,8 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND ) cgal_add_compilation_test(test_items) set_property(TEST compilation_of__test_items APPEND PROPERTY DEPENDS compilation_of__demo_framework) + set_property(TEST compilation_of__test_items + APPEND PROPERTY TIMEOUT 1700) endif(BUILD_TESTING) macro(add_item item_name)