diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt index b1982342c50..d17a40894f3 100644 --- a/AABB_tree/demo/AABB_tree/CMakeLists.txt +++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt @@ -6,14 +6,12 @@ project( AABB_tree_Demo ) set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() diff --git a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt index 46aa698a649..b15bdba99c7 100644 --- a/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt +++ b/Alpha_shapes_3/demo/Alpha_shapes_3/CMakeLists.txt @@ -7,13 +7,11 @@ project (Alpha_shapes_3_Demo) set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) 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 dfd592b8fc0..fc73f917578 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 @@ -2,13 +2,11 @@ project( Arrangement_on_surface_2_Demo ) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Core Qt5 ) include( ${CGAL_USE_FILE} ) diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index 6f81059c200..bb99beeddef 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -7,11 +7,6 @@ project( BGL_Tests ) cmake_minimum_required(VERSION 2.8.11) -if ( COMMAND cmake_policy ) - - cmake_policy( SET CMP0003 NEW ) - -endif() # CGAL and its components find_package( CGAL QUIET COMPONENTS ) diff --git a/Boolean_set_operations_2/archive/demo/Boolean_set_operations_2_GraphicsView/CMakeLists.txt b/Boolean_set_operations_2/archive/demo/Boolean_set_operations_2_GraphicsView/CMakeLists.txt index e6fcc010d28..87cc1896278 100644 --- a/Boolean_set_operations_2/archive/demo/Boolean_set_operations_2_GraphicsView/CMakeLists.txt +++ b/Boolean_set_operations_2/archive/demo/Boolean_set_operations_2_GraphicsView/CMakeLists.txt @@ -3,13 +3,11 @@ project( Boolean_set_operations_2_GraphicsView_Demo ) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5 Core ) diff --git a/CGAL_Core/examples/Core/CMakeLists.txt b/CGAL_Core/examples/Core/CMakeLists.txt index b8b6c154e22..d51b2ae90b7 100644 --- a/CGAL_Core/examples/Core/CMakeLists.txt +++ b/CGAL_Core/examples/Core/CMakeLists.txt @@ -4,11 +4,6 @@ project( Core_Examples ) cmake_minimum_required(VERSION 2.8.11) -if ( COMMAND cmake_policy ) - - cmake_policy( SET CMP0003 NEW ) - -endif() # CGAL and its components find_package( CGAL QUIET COMPONENTS Core ) diff --git a/CGAL_ImageIO/archive/demo/CGALimageIO/CMakeLists.txt b/CGAL_ImageIO/archive/demo/CGALimageIO/CMakeLists.txt index 45e75e952bd..0d395812e09 100644 --- a/CGAL_ImageIO/archive/demo/CGALimageIO/CMakeLists.txt +++ b/CGAL_ImageIO/archive/demo/CGALimageIO/CMakeLists.txt @@ -1,12 +1,10 @@ project(CGALimageIO_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() set(PACKAGE_ROOT ../..) diff --git a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt index f4a09f16191..d737ffa2aff 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt +++ b/CGAL_ipelets/demo/CGAL_ipelets/CMakeLists.txt @@ -1,12 +1,10 @@ project(CGAL_ipelets_Demo) cmake_minimum_required(VERSION 3.1) -if(POLICY CMP0053) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() macro( remove_leading_zero var ) string(SUBSTRING "${${var}}" 0 1 ONECHAR) diff --git a/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt b/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt index 2ad87f2dc0a..dc4bb0315ef 100644 --- a/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt +++ b/Circular_kernel_2/test/Circular_kernel_2/CMakeLists.txt @@ -6,10 +6,6 @@ project( Circular_kernel_2_Tests ) CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11) -if ( COMMAND cmake_policy ) - cmake_policy( SET CMP0003 NEW ) -endif() - find_package(CGAL QUIET) if ( CGAL_FOUND ) diff --git a/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt b/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt index b7dd9bb6df0..6614a2fe820 100644 --- a/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt +++ b/Circular_kernel_3/demo/Circular_kernel_3/CMakeLists.txt @@ -1,12 +1,10 @@ project (Circular_kernel_3_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/Circular_kernel_3/test/Circular_kernel_3/CMakeLists.txt b/Circular_kernel_3/test/Circular_kernel_3/CMakeLists.txt index eb503afbafd..02e799605db 100644 --- a/Circular_kernel_3/test/Circular_kernel_3/CMakeLists.txt +++ b/Circular_kernel_3/test/Circular_kernel_3/CMakeLists.txt @@ -6,10 +6,6 @@ project( Circular_kernel_3_Tests ) CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11) -if ( COMMAND cmake_policy ) - cmake_policy( SET CMP0003 NEW ) -endif() - find_package(CGAL QUIET COMPONENTS Core ) if ( CGAL_FOUND ) diff --git a/Convex_hull_3/demo/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/demo/Convex_hull_3/CMakeLists.txt index 9869af79085..0a59e6cc867 100644 --- a/Convex_hull_3/demo/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/demo/Convex_hull_3/CMakeLists.txt @@ -4,15 +4,13 @@ project( Convex_hull_3_Demo ) -set_property(DIRECTORY PROPERTY CGAL_NO_TESTING TRUE) - -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() + +set_property(DIRECTORY PROPERTY CGAL_NO_TESTING TRUE) find_package(CGAL QUIET) diff --git a/Geomview/demo/Geomview/CMakeLists.txt b/Geomview/demo/Geomview/CMakeLists.txt index 7baf8748c0f..41df3763731 100644 --- a/Geomview/demo/Geomview/CMakeLists.txt +++ b/Geomview/demo/Geomview/CMakeLists.txt @@ -4,15 +4,13 @@ project( Geomview_Demo ) -set_property(DIRECTORY PROPERTY CGAL_NO_TESTING TRUE) - -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() + +set_property(DIRECTORY PROPERTY CGAL_NO_TESTING TRUE) find_package(CGAL QUIET) diff --git a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt index 86babafc5f6..74befb6c8d3 100644 --- a/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt +++ b/GraphicsView/demo/Alpha_shapes_2/CMakeLists.txt @@ -3,13 +3,11 @@ project (Alpha_shapes_2_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5) diff --git a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt index 83485e3f757..c471e14a301 100644 --- a/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Apollonius_graph_2/CMakeLists.txt @@ -3,13 +3,11 @@ project (Apollonius_graph_2_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5) diff --git a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt index bf235ac0cee..fe3dee88349 100644 --- a/GraphicsView/demo/Bounding_volumes/CMakeLists.txt +++ b/GraphicsView/demo/Bounding_volumes/CMakeLists.txt @@ -3,13 +3,11 @@ project (Bounding_volumes_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5) diff --git a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt index c15198e20f4..8faf940eb06 100644 --- a/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt +++ b/GraphicsView/demo/Circular_kernel_2/CMakeLists.txt @@ -3,13 +3,11 @@ project (Circular_kernel_2_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5) diff --git a/GraphicsView/demo/Generator/CMakeLists.txt b/GraphicsView/demo/Generator/CMakeLists.txt index f7aae77eb35..ee92ef751ae 100644 --- a/GraphicsView/demo/Generator/CMakeLists.txt +++ b/GraphicsView/demo/Generator/CMakeLists.txt @@ -3,13 +3,11 @@ project (Generator_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5) diff --git a/GraphicsView/demo/GraphicsView/CMakeLists.txt b/GraphicsView/demo/GraphicsView/CMakeLists.txt index 1f0d99fa60a..e1d0ecf5135 100644 --- a/GraphicsView/demo/GraphicsView/CMakeLists.txt +++ b/GraphicsView/demo/GraphicsView/CMakeLists.txt @@ -2,13 +2,11 @@ project (GraphicsView_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5) diff --git a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt index 7c982c56450..2a5579dfd2b 100644 --- a/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt +++ b/GraphicsView/demo/L1_Voronoi_diagram_2/CMakeLists.txt @@ -3,13 +3,11 @@ project (L1_Voronoi_diagram_2_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5) diff --git a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt index b92aa15732d..7d4429da9dd 100644 --- a/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt +++ b/GraphicsView/demo/Largest_empty_rect_2/CMakeLists.txt @@ -3,13 +3,11 @@ project (Largest_empty_rect_2_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5) diff --git a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt index 1e2f7e03778..b500820bea4 100644 --- a/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Periodic_2_triangulation_2/CMakeLists.txt @@ -1,12 +1,10 @@ project (Periodic_2_triangulation_2_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5) @@ -36,6 +34,12 @@ qt5_add_resources ( CGAL_Qt5_RESOURCE_FILES ./Periodic_2_triangulation_2.qrc ) qt5_generate_moc( Periodic_2_Delaunay_triangulation_2.cpp Periodic_2_triangulation_2.moc ) # find header files for projects that can show them + +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. + cmake_policy(SET CMP0053 OLD) +endif() file(GLOB headers "*.h") file(GLOB QT_headers "include/CGAL/Qt/*.h") file(GLOB P2T2_headers "../../../include/CGAL/*.h") diff --git a/GraphicsView/demo/Polygon/CMakeLists.txt b/GraphicsView/demo/Polygon/CMakeLists.txt index 3407967833e..9f7e2ff5038 100644 --- a/GraphicsView/demo/Polygon/CMakeLists.txt +++ b/GraphicsView/demo/Polygon/CMakeLists.txt @@ -3,13 +3,11 @@ project (Polygon_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5 Core) diff --git a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt index 91cce05ddd6..5aee7461e01 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_2/CMakeLists.txt @@ -3,13 +3,11 @@ project (Segment_Delaunay_graph_2_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5 Core) diff --git a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt index 8a36ec8eba7..54c06e8794c 100644 --- a/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt +++ b/GraphicsView/demo/Segment_Delaunay_graph_Linf_2/CMakeLists.txt @@ -3,13 +3,11 @@ project (Segment_Delaunay_graph_Linf_2_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5 Core) diff --git a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt index c5bbc72d7e1..a8b9e52638b 100644 --- a/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt +++ b/GraphicsView/demo/Snap_rounding_2/CMakeLists.txt @@ -3,13 +3,11 @@ project (Snap_rounding_2_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5) diff --git a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt index 146dddd1499..0aa76f63964 100644 --- a/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt +++ b/GraphicsView/demo/Spatial_searching_2/CMakeLists.txt @@ -3,13 +3,11 @@ project (Spatial_searching_2_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5) diff --git a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt index 66eea5405ff..5a0d0d8ab2e 100644 --- a/GraphicsView/demo/Stream_lines_2/CMakeLists.txt +++ b/GraphicsView/demo/Stream_lines_2/CMakeLists.txt @@ -3,13 +3,11 @@ project (Stream_lines_2_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5) diff --git a/GraphicsView/demo/Triangulation_2/CMakeLists.txt b/GraphicsView/demo/Triangulation_2/CMakeLists.txt index f7699f144a0..5b8e2f404ef 100644 --- a/GraphicsView/demo/Triangulation_2/CMakeLists.txt +++ b/GraphicsView/demo/Triangulation_2/CMakeLists.txt @@ -3,13 +3,11 @@ project (Triangulation_2_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5) diff --git a/GraphicsView/src/CGAL_Qt5/CMakeLists.txt b/GraphicsView/src/CGAL_Qt5/CMakeLists.txt index d07467d3dc0..d0077a33c88 100644 --- a/GraphicsView/src/CGAL_Qt5/CMakeLists.txt +++ b/GraphicsView/src/CGAL_Qt5/CMakeLists.txt @@ -1,11 +1,9 @@ message("Configuring libCGAL_Qt5") -if(POLICY CMP0053) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() if($ENV{CGAL_FAKE_PUBLIC_RELEASE}) add_definitions( -DCGAL_FAKE_PUBLIC_RELEASE ) diff --git a/Hash_map/benchmark/Hash_map/CMakeLists.txt b/Hash_map/benchmark/Hash_map/CMakeLists.txt index 94b6882e099..0943567d71a 100644 --- a/Hash_map/benchmark/Hash_map/CMakeLists.txt +++ b/Hash_map/benchmark/Hash_map/CMakeLists.txt @@ -13,11 +13,6 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6) endif() endif() -if ( COMMAND cmake_policy ) - - cmake_policy( SET CMP0003 NEW ) - -endif() # CGAL and its components find_package( CGAL QUIET COMPONENTS ) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 89e4a61c5f3..b2f4d35b321 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -8,26 +8,10 @@ if(NOT PROJECT_NAME) endif() # Minimal version of CMake: -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.1) # Tested version: -cmake_policy(VERSION 2.8.11) - -# -# Compatibility with CMake 3.0 -# -if(POLICY CMP0042) - # Do not enable the use of MACOSX_RPATH - # http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html - cmake_policy(SET CMP0042 OLD) -endif() - -# Compatibility with CMake 3.1 -if(POLICY CMP0054) - # http://www.cmake.org/cmake/help/v3.1/policy/CMP0054.html - # See the discussion https://github.com/CGAL/cgal/issues/189 - cmake_policy(SET CMP0054 NEW) -endif() +cmake_policy(VERSION 3.1) if(POLICY CMP0056) # http://www.cmake.org/cmake/help/v3.2/policy/CMP0056.html diff --git a/Interpolation/demo/Interpolation/CMakeLists.txt b/Interpolation/demo/Interpolation/CMakeLists.txt index 308a2877587..cfa738e0dc5 100644 --- a/Interpolation/demo/Interpolation/CMakeLists.txt +++ b/Interpolation/demo/Interpolation/CMakeLists.txt @@ -4,15 +4,13 @@ project( Interpolation_Demo ) -set_property(DIRECTORY PROPERTY CGAL_NO_TESTING TRUE) - -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() + +set_property(DIRECTORY PROPERTY CGAL_NO_TESTING TRUE) find_package(CGAL QUIET) 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 424947c0af2..e1a2e344722 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_3/CMakeLists.txt @@ -1,12 +1,10 @@ project(LCC_performance_3) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL REQUIRED) include(${CGAL_USE_FILE}) diff --git a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt index 6b30ce5de8c..14f0e227b66 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/demo/Linear_cell_complex/CMakeLists.txt @@ -4,22 +4,20 @@ project (Linear_cell_complex_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) - -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() +# Find includes in corresponding build directories +set(CMAKE_INCLUDE_CURRENT_DIR ON) +# Instruct CMake to run moc automatically when needed. +set(CMAKE_AUTOMOC ON) + ## To add expensive tests # add_definitions("-DCGAL_CHECK_EXPENSIVE") # add_definitions("-Wall -Wextra") diff --git a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt index 22358aaf17c..81738475373 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt +++ b/Linear_cell_complex/examples/Linear_cell_complex/CMakeLists.txt @@ -3,13 +3,11 @@ project( Linear_cell_complex_Examples ) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() # If you want to visualize a linear cell complex, you can use the following viewer # based on qt. Just uncomment the following two lines, plus the lines qt5_use_modules below diff --git a/Mesh_2/demo/Mesh_2/CMakeLists.txt b/Mesh_2/demo/Mesh_2/CMakeLists.txt index 79bb1f9e367..d4ad9cdcc12 100644 --- a/Mesh_2/demo/Mesh_2/CMakeLists.txt +++ b/Mesh_2/demo/Mesh_2/CMakeLists.txt @@ -3,14 +3,12 @@ project( Mesh_2_Demo ) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() - + find_package(CGAL QUIET) include( ${CGAL_USE_FILE} ) 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..a51ee9c07f8 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 @@ -2,13 +2,11 @@ project(Optimal_transportation_reconstruction_2_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() # Include this package's headers first include_directories( BEFORE ./ ./include ../../include ) 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..e54d1b9098b 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 @@ -4,13 +4,11 @@ project( Periodic_3_triangulation_3_Demo ) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() # Find CGAL find_package(CGAL COMPONENTS Qt5) 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..b3727dddfaf 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/CMakeLists.txt @@ -3,21 +3,20 @@ project (Periodic_Lloyd_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) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() +# Find includes in corresponding build directories +set(CMAKE_INCLUDE_CURRENT_DIR ON) +# Instruct CMake to run moc automatically when needed. +set(CMAKE_AUTOMOC ON) + find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt index 580b718bcd7..46b9c01221b 100644 --- a/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/benchmark/Polygon_mesh_processing/CMakeLists.txt @@ -13,11 +13,6 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6) endif() endif() -if ( COMMAND cmake_policy ) - - cmake_policy( SET CMP0003 NEW ) - -endif() # CGAL and its components find_package( CGAL QUIET COMPONENTS ) diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt index ee5492ea0f7..658ace669d0 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt @@ -13,11 +13,6 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6) endif() endif() -if ( COMMAND cmake_policy ) - - cmake_policy( SET CMP0003 NEW ) - -endif() # CGAL and its components find_package( CGAL QUIET COMPONENTS ) diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt index 4c4500eb196..758084def30 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/CMakeLists.txt @@ -13,11 +13,6 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6) endif() endif() -if ( COMMAND cmake_policy ) - - cmake_policy( SET CMP0003 NEW ) - -endif() # CGAL and its components find_package( CGAL QUIET COMPONENTS ) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 8a91d10e7e3..0066867ccab 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -1,21 +1,21 @@ # This is the CMake script for compiling the CGAL Polyhedron demo. project( Polyhedron_Demo ) + +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. + cmake_policy(SET CMP0053 OLD) +endif() +if(POLICY CMP0071) + cmake_policy(SET CMP0071 NEW) +endif() + # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) -cmake_minimum_required(VERSION 3.1) -if(POLICY CMP0053) - cmake_policy(SET CMP0053 OLD) -endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() -if(POLICY CMP0071) - cmake_policy(SET CMP0071 NEW) -endif() list(FIND CMAKE_CXX_COMPILE_FEATURES cxx_generalized_initializers has_cpp11) if(has_cpp11 LESS 0) @@ -27,13 +27,6 @@ endif() set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED TRUE) -# Compatibility with CMake 3.0 -if(POLICY CMP0042) - # Do not enable the use of MACOSX_RPATH - # http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html - cmake_policy(SET CMP0042 OLD) -endif() - #Defines flags to emulate windows behavior for linking error generation if(CMAKE_CXX_COMPILER_ID EQUAL Clang OR CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) if(UNIX OR APPLE) diff --git a/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt b/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt index f6d8e17d396..00c1bd837be 100644 --- a/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/implicit_functions/CMakeLists.txt @@ -2,13 +2,11 @@ project( Mesh_3_implicit_functions ) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() # Let plugins be compiled in the same directory as the executable. set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") diff --git a/Polyhedron_IO/demo/Polyhedron_IO/CMakeLists.txt b/Polyhedron_IO/demo/Polyhedron_IO/CMakeLists.txt index eb51b3f7604..416191162c8 100644 --- a/Polyhedron_IO/demo/Polyhedron_IO/CMakeLists.txt +++ b/Polyhedron_IO/demo/Polyhedron_IO/CMakeLists.txt @@ -4,15 +4,13 @@ project( Polyhedron_IO_Demo ) -set_property(DIRECTORY PROPERTY CGAL_NO_TESTING TRUE) - -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() + +set_property(DIRECTORY PROPERTY CGAL_NO_TESTING TRUE) find_package(CGAL QUIET) diff --git a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt index 4f2b9d856b3..53ed5c83d0c 100644 --- a/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt +++ b/Polyline_simplification_2/demo/Polyline_simplification_2/CMakeLists.txt @@ -3,13 +3,11 @@ project (Polyline_simplification_2_Demo) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() find_package(CGAL COMPONENTS Qt5) diff --git a/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt b/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt index de4dc686a8f..597a51154c7 100644 --- a/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt +++ b/Polyline_simplification_2/test/Polyline_simplification_2/CMakeLists.txt @@ -7,11 +7,6 @@ project( Polyline_simplification_2_Tests ) cmake_minimum_required(VERSION 2.8.11) -if ( COMMAND cmake_policy ) - - cmake_policy( SET CMP0003 NEW ) - -endif() # CGAL and its components find_package( CGAL QUIET COMPONENTS ) diff --git a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt index c6aae1b2173..507abf76f25 100644 --- a/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt +++ b/Principal_component_analysis/demo/Principal_component_analysis/CMakeLists.txt @@ -2,13 +2,11 @@ project( Principal_component_analysis_Demo ) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() foreach(INCDIR ../../include ../../../STL_Extension/include ../../../GraphicsView/include ../../../filtered_kernel/include ) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${INCDIR}") diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index e621f9aedef..9394ea70775 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -7,11 +7,6 @@ project( Spatial_searching_Examples ) cmake_minimum_required(VERSION 2.8.11) -if ( COMMAND cmake_policy ) - - cmake_policy( SET CMP0003 NEW ) - -endif() # CGAL and its components find_package( CGAL QUIET COMPONENTS ) diff --git a/Stream_support/benchmark/Stream_support/CMakeLists.txt b/Stream_support/benchmark/Stream_support/CMakeLists.txt index 7d3e11d6414..065eda34c45 100644 --- a/Stream_support/benchmark/Stream_support/CMakeLists.txt +++ b/Stream_support/benchmark/Stream_support/CMakeLists.txt @@ -7,11 +7,6 @@ project( Stream_support ) cmake_minimum_required(VERSION 2.8.11) -if ( COMMAND cmake_policy ) - - cmake_policy( SET CMP0003 NEW ) - -endif() # CGAL and its components find_package( CGAL QUIET COMPONENTS ) diff --git a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt index eca598d8baa..95cc6a9871b 100644 --- a/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/demo/Surface_mesh_deformation/CMakeLists.txt @@ -4,15 +4,13 @@ project( Surface_mesh_deformation_Demo ) -set_property(DIRECTORY PROPERTY CGAL_NO_TESTING TRUE) - -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() + +set_property(DIRECTORY PROPERTY CGAL_NO_TESTING TRUE) find_package(CGAL QUIET) diff --git a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt index 63e2d9e0bdf..faa1aec6750 100644 --- a/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt +++ b/Surface_mesh_segmentation/examples/Surface_mesh_segmentation/CMakeLists.txt @@ -7,11 +7,6 @@ project( Surface_mesh_segmentation_Examples ) cmake_minimum_required(VERSION 2.8.11) -if ( COMMAND cmake_policy ) - - cmake_policy( SET CMP0003 NEW ) - -endif() # CGAL and its components find_package( CGAL QUIET COMPONENTS ) diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt index 3329851de3f..1988b8adafc 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -7,11 +7,6 @@ project( Surface_mesh_simplification_Examples ) cmake_minimum_required(VERSION 2.8.11) -if ( COMMAND cmake_policy ) - - cmake_policy( SET CMP0003 NEW ) - -endif() # CGAL and its components find_package( CGAL QUIET COMPONENTS ) diff --git a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt index 2b76f7076a4..311563d93bb 100644 --- a/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/benchmark/Surface_mesh_skeletonization/CMakeLists.txt @@ -10,11 +10,6 @@ project( Mean_curvature_skeleton ) cmake_minimum_required(VERSION 2.8.11) -if ( COMMAND cmake_policy ) - - cmake_policy( SET CMP0003 NEW ) - -endif() # CGAL and its components find_package( CGAL QUIET COMPONENTS ) diff --git a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt index 5e43c51068f..87cc02645cd 100644 --- a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt +++ b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt @@ -2,18 +2,17 @@ set ( prj Surface_mesher ) project ( Surface_mesher_Demo ) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. + cmake_policy(SET CMP0053 OLD) +endif() + # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) - cmake_policy(SET CMP0053 OLD) -endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() if(POLICY CMP0071) cmake_policy(SET CMP0071 NEW) endif() diff --git a/Sweep_line_2/examples/Sweep_line_2/CMakeLists.txt b/Sweep_line_2/examples/Sweep_line_2/CMakeLists.txt index f714e059cbd..15204756bea 100644 --- a/Sweep_line_2/examples/Sweep_line_2/CMakeLists.txt +++ b/Sweep_line_2/examples/Sweep_line_2/CMakeLists.txt @@ -13,11 +13,6 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6) endif() endif() -if ( COMMAND cmake_policy ) - - cmake_policy( SET CMP0003 NEW ) - -endif() # CGAL and its components find_package( CGAL QUIET COMPONENTS ) diff --git a/Three/demo/Three/Example_plugin/CMakeLists.txt b/Three/demo/Three/Example_plugin/CMakeLists.txt index aac852f0bc0..8dfeda7fd3f 100644 --- a/Three/demo/Three/Example_plugin/CMakeLists.txt +++ b/Three/demo/Three/Example_plugin/CMakeLists.txt @@ -1,22 +1,14 @@ project( Example_plugin ) + +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. + cmake_policy(SET CMP0053 OLD) +endif() # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) - cmake_policy(SET CMP0053 OLD) -endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() - -# Compatibility with CMake 3.0 -if(POLICY CMP0042) - # Do not enable the use of MACOSX_RPATH - # http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html - cmake_policy(SET CMP0042 OLD) -endif() #Find CGAL find_package(CGAL COMPONENTS Qt5) include( ${CGAL_USE_FILE} ) diff --git a/Three/doc/Three/Three.txt b/Three/doc/Three/Three.txt index 3af25452f09..7251e6a62e9 100644 --- a/Three/doc/Three/Three.txt +++ b/Three/doc/Three/Three.txt @@ -317,17 +317,8 @@ Configure CMake as you desire and fetch the right Qt5 packages : set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) - cmake_minimum_required(VERSION 2.8.11) - if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) - endif() - - # Compatibility with CMake 3.0 - if(POLICY CMP0042) - # Do not enable the use of MACOSX_RPATH - # http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html - cmake_policy(SET CMP0042 OLD) - endif() + cmake_minimum_required(VERSION 3.1) + #Find CGAL find_package(CGAL COMPONENTS Qt5) include( ${CGAL_USE_FILE} ) @@ -364,17 +355,8 @@ Notice that an external plugin will not be automatically loaded in the Polyhedro set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) - cmake_minimum_required(VERSION 2.8.11) - if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) - endif() - - # Compatibility with CMake 3.0 - if(POLICY CMP0042) - # Do not enable the use of MACOSX_RPATH - # http://www.cmake.org/cmake/help/v3.0/policy/CMP0042.html - cmake_policy(SET CMP0042 OLD) - endif() + cmake_minimum_required(VERSION 3.1) + #Find CGAL find_package(CGAL COMPONENTS Qt5) include( ${CGAL_USE_FILE} ) diff --git a/Triangulation/applications/Triangulation/CMakeLists.txt b/Triangulation/applications/Triangulation/CMakeLists.txt index 1f49e2c545e..de87a2cedcc 100644 --- a/Triangulation/applications/Triangulation/CMakeLists.txt +++ b/Triangulation/applications/Triangulation/CMakeLists.txt @@ -15,11 +15,6 @@ endif() set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true ) -if ( COMMAND cmake_policy ) - - cmake_policy( SET CMP0003 NEW ) - -endif() # CGAL and its components find_package( CGAL QUIET COMPONENTS ) diff --git a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt index 5240855e912..297ad7ded57 100644 --- a/Triangulation_3/demo/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/demo/Triangulation_3/CMakeLists.txt @@ -3,24 +3,21 @@ project (Triangulation_3_Demo) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. + cmake_policy(SET CMP0053 OLD) +endif() +if(POLICY CMP0071) + cmake_policy(SET CMP0071 NEW) +endif() + # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) -cmake_minimum_required(VERSION 2.8.11) -if(POLICY CMP0053) - cmake_policy(SET CMP0053 OLD) -endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() -if(POLICY CMP0071) - cmake_policy(SET CMP0071 NEW) -endif() - - find_package(CGAL COMPONENTS Qt5) include(${CGAL_USE_FILE}) diff --git a/Triangulation_3/demo/Triangulation_3_Geomview_demos/CMakeLists.txt b/Triangulation_3/demo/Triangulation_3_Geomview_demos/CMakeLists.txt index c9ad70a73d1..78a70d166d1 100644 --- a/Triangulation_3/demo/Triangulation_3_Geomview_demos/CMakeLists.txt +++ b/Triangulation_3/demo/Triangulation_3_Geomview_demos/CMakeLists.txt @@ -4,13 +4,11 @@ project( Triangulation_3_Geomview_demos_Demo ) -cmake_minimum_required(VERSION 3.0) -if(POLICY CMP0053) +cmake_minimum_required(VERSION 3.1) +if(NOT POLICY CMP0070 AND POLICY CMP0053) + # Only set CMP0053 to OLD with CMake<3.10, otherwise there is a warning. cmake_policy(SET CMP0053 OLD) endif() -if(POLICY CMP0043) - cmake_policy(SET CMP0043 OLD) -endif() set_directory_properties(PROPERTIES CGAL_NO_TESTING TRUE)