From 21dabf1b1bac3bb4ad65dd5c9bb573d8ca379f7b Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 16 Nov 2017 18:38:15 +0100 Subject: [PATCH] Add compilation tests for demos --- AABB_tree/demo/AABB_tree/CMakeLists.txt | 2 ++ Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt | 3 +++ .../demo/Arrangement_on_surface_2/CMakeLists.txt | 2 ++ CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt | 6 ++++++ Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt | 3 +++ GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt | 3 +++ GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt | 3 +++ GraphicsView/demo/Bounding_volumes/CMakeLists.txt | 3 +++ GraphicsView/demo/Circular_kernel_2/CMakeLists.txt | 3 +++ GraphicsView/demo/Generator/CMakeLists.txt | 2 ++ GraphicsView/demo/GraphicsView/CMakeLists.txt | 2 ++ GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt | 3 +++ GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt | 2 ++ .../demo/Periodic_2_triangulation_2/CMakeLists.txt | 3 +++ GraphicsView/demo/Polygon/CMakeLists.txt | 2 ++ GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt | 2 ++ .../demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt | 3 ++- GraphicsView/demo/Snap_rounding_2/CMakeLists.txt | 3 +++ GraphicsView/demo/Spatial_searching_2/CMakeLists.txt | 2 ++ GraphicsView/demo/Stream_lines_2/CMakeLists.txt | 3 +++ GraphicsView/demo/Triangulation_2/CMakeLists.txt | 8 ++++++++ .../modules/CGAL_CreateSingleSourceCGALProgram.cmake | 4 +++- Installation/cmake/modules/CGAL_add_test.cmake | 7 +++++-- .../demo/Linear_cell_complex/CMakeLists.txt | 2 ++ Mesh_2/demo/Mesh_2/CMakeLists.txt | 4 ++++ .../CMakeLists.txt | 2 ++ .../demo/Periodic_3_triangulation_3/CMakeLists.txt | 2 ++ .../demo/Periodic_Lloyd_3/CMakeLists.txt | 2 ++ Polyhedron/demo/Polyhedron/CMakeLists.txt | 2 ++ Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake | 3 ++- .../demo/Polyline_simplification_2/CMakeLists.txt | 3 +++ .../demo/Principal_component_analysis/CMakeLists.txt | 2 ++ Surface_mesher/demo/Surface_mesher/CMakeLists.txt | 3 +++ Triangulation_3/demo/Triangulation_3/CMakeLists.txt | 3 +++ 34 files changed, 97 insertions(+), 5 deletions(-) diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt index b1982342c50..9a6df4d988f 100644 --- a/AABB_tree/demo/AABB_tree/CMakeLists.txt +++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt @@ -73,6 +73,8 @@ if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FO add_to_cached_list( CGAL_EXECUTABLE_TARGETS AABB_demo ) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(AABB_demo) else (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt index 46aa698a649..8cdba7ede94 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt @@ -49,6 +49,9 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_ target_link_libraries( Alpha_shape_3 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ) target_link_libraries( Alpha_shape_3 ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Alpha_shapes_3) + else() message(STATUS "NOTICE: This demo requires CGAL, the QGLViewer, OpenGL and Qt5, and will not be compiled.") 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 dfd592b8fc0..3b37175bdc2 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 @@ -79,6 +79,8 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND CGAL_Core_FOUND) add_to_cached_list( CGAL_EXECUTABLE_TARGETS arrangement_2 ) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(arrangement_2) else() message(STATUS "NOTICE: This demo requires CGAL, CGAL-Core and Qt5, and will not be compiled.") diff --git a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt index f4a09f16191..a68eee82968 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt @@ -143,6 +143,12 @@ if ( CGAL_FOUND ) add_to_cached_list(CGAL_EXECUTABLE_TARGETS simple_triangulation) target_link_libraries(simple_triangulation ${IPE_LIBRARIES}) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + + foreach(target ${CGAL_IPELETS} simple_triangulation) + cgal_add_compilation_test(${target}) + endforeach() + else() message(STATUS "NOTICE: This program 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 b7dd9bb6df0..ab169b82319 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt +++ b/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt @@ -32,6 +32,9 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_ target_link_libraries( Circular_kernel_3 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ) target_link_libraries( Circular_kernel_3 ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Circular_kernel_3) + else() message(STATUS "NOTICE: This demo requires CGAL, the QGLViewer, OpenGL and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt index 86babafc5f6..9447b871c51 100644 --- a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt +++ b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt @@ -46,6 +46,9 @@ target_link_libraries( Alpha_shapes_2 ${QT_LIBRARIES} ) # Link with CGAL target_link_libraries( Alpha_shapes_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +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.") diff --git a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt index 83485e3f757..ec328e4447c 100644 --- a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt @@ -44,6 +44,9 @@ target_link_libraries( Apollonius_graph_2 ${QT_LIBRARIES} ) # Link with CGAL target_link_libraries( Apollonius_graph_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +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.") diff --git a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt index bf235ac0cee..9d423733976 100644 --- a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt +++ b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt @@ -49,6 +49,9 @@ target_link_libraries( Bounding_volumes ${QT_LIBRARIES} ) # Link with CGAL target_link_libraries( Bounding_volumes ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Bounding_volumes) + else() message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt index c15198e20f4..520ee942668 100644 --- a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt +++ b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt @@ -49,6 +49,9 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) # Link with CGAL target_link_libraries( Circular_kernel_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Circular_kernel_2) + else() message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/Generator/CMakeLists.txt b/GraphicsView/demo/Generator/CMakeLists.txt index f7aae77eb35..7ffac10b8f8 100644 --- a/GraphicsView/demo/Generator/CMakeLists.txt +++ b/GraphicsView/demo/Generator/CMakeLists.txt @@ -46,6 +46,8 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) # And with CGAL libraries target_link_libraries( Generator_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Generator_2) else() message(STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/GraphicsView/CMakeLists.txt b/GraphicsView/demo/GraphicsView/CMakeLists.txt index 1f0d99fa60a..49eedf37dcc 100644 --- a/GraphicsView/demo/GraphicsView/CMakeLists.txt +++ b/GraphicsView/demo/GraphicsView/CMakeLists.txt @@ -31,6 +31,8 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) # Link with CGAL target_link_libraries( min ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(min) else() message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt index 7c982c56450..3c9468f8b32 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt @@ -48,6 +48,9 @@ target_link_libraries( L1_voronoi_diagram_2 ${QT_LIBRARIES} ) # Link with CGAL target_link_libraries( L1_voronoi_diagram_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(L1_voronoi_diagram_2) + else() message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt index b92aa15732d..7f5811ffb1f 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt +++ b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt @@ -47,6 +47,8 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) # And with CGAL libraries target_link_libraries( Largest_empty_rectangle_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Largest_empty_rectangle_2) else() message(STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt index 1e2f7e03778..7b8747f63ee 100644 --- a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt @@ -57,6 +57,9 @@ add_to_cached_list( CGAL_EXECUTABLE_TARGETS Periodic_2_Delaunay_triangulation_2 target_link_libraries( Periodic_2_Delaunay_triangulation_2 ${QT_LIBRARIES} ) # Link with CGAL target_link_libraries( Periodic_2_Delaunay_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) + +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Periodic_2_Delaunay_triangulation_2) else() message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index 3407967833e..68d49da1b10 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -55,6 +55,8 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) # And with CGAL libraries target_link_libraries( Polygon_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) + 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.") diff --git a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt index 91cce05ddd6..df1da6ec47a 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt @@ -54,6 +54,8 @@ target_link_libraries( Segment_voronoi_2 ${QT_LIBRARIES} ) # Link with CGAL target_link_libraries( Segment_voronoi_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Segment_voronoi_2) else() diff --git a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt index 8a36ec8eba7..5f1d3f672bb 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt @@ -54,7 +54,8 @@ target_link_libraries( Segment_voronoi_linf_2 ${QT_LIBRARIES} ) # Link with CGAL target_link_libraries( Segment_voronoi_linf_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) - +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.") diff --git a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt index c5bbc72d7e1..153ff1c7b50 100644 --- a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt +++ b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt @@ -46,6 +46,9 @@ target_link_libraries( Snap_rounding_2 ${QT_LIBRARIES} ) # Link with CGAL target_link_libraries( Snap_rounding_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +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.") diff --git a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt index 146dddd1499..de1ea04a6f6 100644 --- a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt +++ b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt @@ -48,6 +48,8 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND ) # And with CGAL libraries target_link_libraries( Spatial_searching_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Spatial_searching_2) else() message(STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt index 66eea5405ff..37a66d104a4 100644 --- a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt +++ b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt @@ -47,6 +47,9 @@ target_link_libraries( Stream_lines_2 ${QT_LIBRARIES} ) # Link with CGAL target_link_libraries( Stream_lines_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Stream_lines_2) + else() message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") diff --git a/GraphicsView/demo/Triangulation_2/CMakeLists.txt b/GraphicsView/demo/Triangulation_2/CMakeLists.txt index f7699f144a0..2d1bd2eda96 100644 --- a/GraphicsView/demo/Triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Triangulation_2/CMakeLists.txt @@ -102,6 +102,14 @@ target_link_libraries( Regular_triangulation_2 ${QT_LIBRARIES} ) # Link with CGAL target_link_libraries( Regular_triangulation_2 ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES}) +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +foreach(target + Constrained_Delaunay_triangulation_2 + Delaunay_triangulation_2 + Regular_triangulation_2) + cgal_add_compilation_test(${target}) +endforeach() + else() message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") diff --git a/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake b/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake index 8168a4baf47..b7612e0d861 100644 --- a/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake +++ b/Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgram.cmake @@ -54,7 +54,9 @@ function(create_single_source_cgal_program firstfile ) if(NOT NO_TESTING) cgal_add_test(${exe_name}) - endif(NOT NO_TESTING) + else() + cgal_add_test(${exe_name} NO_EXECUTION) + endif() add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${exe_name} ) diff --git a/Installation/cmake/modules/CGAL_add_test.cmake b/Installation/cmake/modules/CGAL_add_test.cmake index 10fc5efa338..d0dbc13f71e 100644 --- a/Installation/cmake/modules/CGAL_add_test.cmake +++ b/Installation/cmake/modules/CGAL_add_test.cmake @@ -169,7 +169,7 @@ function(cgal_add_test exe_name) cgal_add_compilation_test(${exe_name}) cmake_parse_arguments("cgal_add_test" # prefix - "" # optional arguments + "NO_EXECUTION" # optional arguments "TEST_NAME" # single arguments "ARGUMENTS" # multivalue arguments ${ARGN}) @@ -180,7 +180,7 @@ function(cgal_add_test exe_name) set(test_name "execution___of__${exe_name}") endif() # message(" test_name: ${test_name}") - if(TEST ${test_name}) + if(cgal_add_test_NO_EXECUTION OR TEST ${test_name}) return() endif() # message("Add test ${test_name}") @@ -252,3 +252,6 @@ function(cgal_add_test exe_name) set_property(TEST "${test_name}" APPEND PROPERTY LABELS "${PROJECT_NAME}") endfunction() + +function(CGAL_add_compilation_tests_for_all_targets) +endfunction() diff --git a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt index 6b30ce5de8c..74d15fc18dc 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt @@ -83,4 +83,6 @@ target_link_libraries(Linear_cell_complex_3_demo ${QT_LIBRARIES} target_link_libraries(Linear_cell_complex_3_demo ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ) +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Linear_cell_complex_3_demo) endif() diff --git a/Mesh_2/demo/Mesh_2/CMakeLists.txt b/Mesh_2/demo/Mesh_2/CMakeLists.txt index 79bb1f9e367..aecb9489257 100644 --- a/Mesh_2/demo/Mesh_2/CMakeLists.txt +++ b/Mesh_2/demo/Mesh_2/CMakeLists.txt @@ -30,6 +30,10 @@ if ( CGAL_FOUND ) target_link_libraries(mesh ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS mesh ) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(conform) + cgal_add_compilation_test(mesh) + else() message(STATUS "NOTICE: This demo requires CGAL 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 2bffa62e81b..09980d5a240 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 @@ -104,6 +104,8 @@ if(CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Otr2_demo ) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Otr2_demo) else (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND ) set(OTR2_MISSING_DEPS "") 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 6d6d31c3a54..969af20278f 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 @@ -76,6 +76,8 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND OPENGL_FOUND AND Qt5_FOUND AND QGLVIEWER_F # Link the executable to CGAL and third-party libraries target_link_libraries(periodic_3_triangulation_3_demo ${CGAL_LIBRARIES} ${CGAL_3RD_PARTY_LIBRARIES} ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(periodic_3_triangulation_3_demo) else () set(PERIODIC_TRIANGULATION_MISSING_DEPS "") 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 38d9859f4c4..912762418df 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt @@ -66,6 +66,8 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_ target_link_libraries( Periodic_Lloyd_3 ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ) target_link_libraries( Periodic_Lloyd_3 ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(Periodic_Lloyd_3) else( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND QT_QCOLLECTIONGENERATOR_EXECUTABLE ) set(PERIODIC_LLOYD_MISSING_DEPS "") diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 8a91d10e7e3..767c2ee62e1 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -233,6 +233,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) add_library(${item_name} SHARED ${ARGN}) qt5_use_modules(${item_name} OpenGL Gui Xml Script Widgets) target_link_libraries(${item_name} demo_framework ${CGAL_LIBRARIES} ${Boost_LIBRARIES}) + cgal_add_compilation_test(${item_name}) endmacro(add_item) add_item(scene_c2t3_item Scene_c2t3_item.cpp) @@ -344,6 +345,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) add_executable ( Polyhedron_3 Polyhedron_3.cpp ) target_link_libraries( Polyhedron_3 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 fe32b0522a1..906af2ebab8 100644 --- a/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake +++ b/Polyhedron/demo/Polyhedron/polyhedron_demo_macros.cmake @@ -1,5 +1,5 @@ include(AddFileDependencies) -include (CGAL_Macros) +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) macro(polyhedron_demo_plugin plugin_name plugin_implementation_base_name) list_split(option ARGN_TAIL ${ARGN} ) @@ -27,6 +27,7 @@ include (CGAL_Macros) set_property(TARGET ${plugin_name} PROPERTY LIBRARY_OUTPUT_DIRECTORY "${CGAL_POLYHEDRON_DEMO_PLUGINS_DIR}") + cgal_add_compilation_test(${plugin_name}) add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${plugin_name} ) # Link with Qt diff --git a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt index 4f2b9d856b3..6374c5b4baa 100644 --- a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt +++ b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt @@ -47,6 +47,9 @@ target_link_libraries( Polyline_simplification_2 ${CGAL_LIBRARIES} ${CGAL_3RD_P add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polyline_simplification_2 ) +include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) +cgal_add_compilation_test(Polyline_simplification_2) + else() message(STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.") diff --git a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt index c6aae1b2173..c44d3192219 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt @@ -64,6 +64,8 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) add_to_cached_list( CGAL_EXECUTABLE_TARGETS PCA_demo ) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(PCA_demo) else (CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) diff --git a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt index 5e43c51068f..d578c8b6333 100644 --- a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt +++ b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt @@ -122,6 +122,9 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND CGAL_ImageIO_FOUND) target_link_libraries( ${prj} ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${VTK_LIBS}) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(${prj}) + else( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND OPENGL_GLU_FOUND ) message(STATUS "NOTICE: This demo needs libQGLViewer, and will not be compiled.") endif( QGLVIEWER_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND OPENGL_GLU_FOUND ) diff --git a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt index 5240855e912..6cb46752a00 100644 --- a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt @@ -81,6 +81,9 @@ if ( CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_ target_link_libraries( T3_demo ${QT_LIBRARIES} ${QGLVIEWER_LIBRARIES} ${TBB_LIBRARIES}) target_link_libraries( T3_demo ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) + include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake) + cgal_add_compilation_test(T3_demo) + else( CGAL_FOUND AND Qt5_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND ) set(TRIANGULATION_3_MISSING_DEPS "")