From f05ee0d8909ae7d2f150524ed10a701ce49b5bb6 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 13 Apr 2017 15:14:53 +0200 Subject: [PATCH 1/8] Fix the detection of packages directories --- Installation/CMakeLists.txt | 2 +- Maintenance/package_info/Maintenance/maintainer | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Maintenance/package_info/Maintenance/maintainer diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 94e81674b45..942d83d99f9 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -81,7 +81,7 @@ if ( CGAL_BRANCH_BUILD ) foreach (package ${CGAL_CONFIGURED_PACKAGES}) if (NOT IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${package}") list(APPEND CGAL_WRONG_PACKAGES ${package}) - elseif(NOT IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${package}/package_info") + elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/${package}/package_info/${package}/maintainer") list(APPEND CGAL_WRONG_PACKAGES ${package}) endif() endforeach() diff --git a/Maintenance/package_info/Maintenance/maintainer b/Maintenance/package_info/Maintenance/maintainer new file mode 100644 index 00000000000..15bc0c12a34 --- /dev/null +++ b/Maintenance/package_info/Maintenance/maintainer @@ -0,0 +1 @@ +Laurent Rineau From 38c6f6a64eba162ec2b174c333b3d61478b73f80 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 13 Apr 2017 15:16:27 +0200 Subject: [PATCH 2/8] test `check_headers` in Travis CHECK job --- .travis/build_package.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis/build_package.sh b/.travis/build_package.sh index e4fa027e13d..6bbd9824dd1 100755 --- a/.travis/build_package.sh +++ b/.travis/build_package.sh @@ -54,7 +54,11 @@ do if [ "$ARG" = "CHECK" ] then zsh $ROOT/Scripts/developer_scripts/test_merge_of_branch HEAD - + mkdir -p build-travis + pushd build-travis + cmake -DCGAL_ENABLE_CHECK_HEADERS=ON .. + make -j2 check_headers + popd #parse current matrix and check that no package has been forgotten old_IFS=$IFS IFS=$'\n' From 87c9afd486fb38b2283f6c9dcceaaf67f041784b Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 13 Apr 2017 15:56:51 +0200 Subject: [PATCH 3/8] Fix the compilation of individual headers - in most cases, that was just adding missing #include - I have removed the use of --- BGL/include/CGAL/boost/graph/split_graph_into_polylines.h | 5 +++-- Combinatorial_map/include/CGAL/Cell_attribute.h | 3 +++ .../include/CGAL/Combinatorial_map_constructors.h | 2 ++ Combinatorial_map/include/CGAL/Dart.h | 1 + Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h | 2 ++ .../include/CGAL/predicates/predicates_for_mixed_complex_3.h | 1 + .../include/CGAL/Regular_triangulation_euclidean_traits_2.h | 2 +- 7 files changed, 13 insertions(+), 3 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/split_graph_into_polylines.h b/BGL/include/CGAL/boost/graph/split_graph_into_polylines.h index 9d5c99d12b0..b1811992a5e 100644 --- a/BGL/include/CGAL/boost/graph/split_graph_into_polylines.h +++ b/BGL/include/CGAL/boost/graph/split_graph_into_polylines.h @@ -21,11 +21,12 @@ #define CGAL_SPLIT_GRAPH_INTO_POLYLINES #include -#include +#include +#include #include #include -#include #include +#include namespace CGAL { diff --git a/Combinatorial_map/include/CGAL/Cell_attribute.h b/Combinatorial_map/include/CGAL/Cell_attribute.h index 5d7b048a6fa..c6692f22e9e 100644 --- a/Combinatorial_map/include/CGAL/Cell_attribute.h +++ b/Combinatorial_map/include/CGAL/Cell_attribute.h @@ -20,6 +20,9 @@ #ifndef CGAL_CELL_ATTRIBUTE_H #define CGAL_CELL_ATTRIBUTE_H 1 +#include +#include + namespace CGAL { template diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_constructors.h b/Combinatorial_map/include/CGAL/Combinatorial_map_constructors.h index 6ebb50f4503..3761d306f88 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_constructors.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_constructors.h @@ -20,6 +20,8 @@ #ifndef CGAL_COMBINATORIAL_MAP_CONSTRUCTORS_H #define CGAL_COMBINATORIAL_MAP_CONSTRUCTORS_H 1 +#include + #ifndef CGAL_NO_DEPRECATED_CODE namespace CGAL { diff --git a/Combinatorial_map/include/CGAL/Dart.h b/Combinatorial_map/include/CGAL/Dart.h index 04304ab8780..e2e9055ff90 100644 --- a/Combinatorial_map/include/CGAL/Dart.h +++ b/Combinatorial_map/include/CGAL/Dart.h @@ -21,6 +21,7 @@ #define CGAL_DART_H 1 #include +#include #include #include diff --git a/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h b/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h index 297467c0171..a5cceef5a19 100644 --- a/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h +++ b/Mesh_3/include/CGAL/Mesh_constant_domain_field_3.h @@ -31,6 +31,8 @@ #include #include #include +#include +#include namespace CGAL { diff --git a/Skin_surface_3/include/CGAL/predicates/predicates_for_mixed_complex_3.h b/Skin_surface_3/include/CGAL/predicates/predicates_for_mixed_complex_3.h index 4459772577f..d8b253d504a 100644 --- a/Skin_surface_3/include/CGAL/predicates/predicates_for_mixed_complex_3.h +++ b/Skin_surface_3/include/CGAL/predicates/predicates_for_mixed_complex_3.h @@ -25,6 +25,7 @@ #include +#include #include #include diff --git a/Triangulation_2/include/CGAL/Regular_triangulation_euclidean_traits_2.h b/Triangulation_2/include/CGAL/Regular_triangulation_euclidean_traits_2.h index 18b18849620..de8bf483071 100644 --- a/Triangulation_2/include/CGAL/Regular_triangulation_euclidean_traits_2.h +++ b/Triangulation_2/include/CGAL/Regular_triangulation_euclidean_traits_2.h @@ -25,7 +25,7 @@ #include -#include +#include namespace CGAL { From 33348ca968a7108adc919eebac3f09e9f68728d9 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 14 Apr 2017 15:53:13 +0200 Subject: [PATCH 4/8] Fix the relative path to the Git root directory --- .travis/build_package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/build_package.sh b/.travis/build_package.sh index 6bbd9824dd1..4db46faba23 100755 --- a/.travis/build_package.sh +++ b/.travis/build_package.sh @@ -56,7 +56,7 @@ do zsh $ROOT/Scripts/developer_scripts/test_merge_of_branch HEAD mkdir -p build-travis pushd build-travis - cmake -DCGAL_ENABLE_CHECK_HEADERS=ON .. + cmake -DCGAL_ENABLE_CHECK_HEADERS=ON ../.. make -j2 check_headers popd #parse current matrix and check that no package has been forgotten From 6493e66e7264d677a7f3281799305c8553144328 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 14 Apr 2017 17:14:43 +0200 Subject: [PATCH 5/8] Better use of CMP0057, to support CMake<3.3 --- Installation/CMakeLists.txt | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 942d83d99f9..3aa8dd441b5 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -1151,12 +1151,12 @@ You must disable CGAL_ENABLE_CHECK_HEADERS and CGAL_COMPUTE_DEPENDENCIES.") endif() foreach(header ${${package}_HEADERS}) set(skip_hdr FALSE) - if(POLICY CMP0057 - AND has_list_of_documented_headers - AND NOT header IN_LIST list_of_documented_headers - ) - message(STATUS "Skip non-documented header \"${header}\".") - set(skip_hdr TRUE) + if(POLICY CMP0057) + if(has_list_of_documented_headers + AND NOT header IN_LIST list_of_documented_headers) + message(STATUS "Skip non-documented header \"${header}\".") + set(skip_hdr TRUE) + endif() endif() string(REGEX MATCH "CGAL/leda_.*" is_a_leda_header ${header}) if(NOT LEDA_FOUND AND is_a_leda_header) @@ -1164,11 +1164,12 @@ You must disable CGAL_ENABLE_CHECK_HEADERS and CGAL_COMPUTE_DEPENDENCIES.") LEDA_FOUND is false.") set(skip_hdr TRUE) endif() - if(POLICY CMP0057 - AND has_list_of_whitelisted_headers - AND header IN_LIST list_of_whitelisted_headers) - message(STATUS "Skip whitelisted header \"${header}\".") - set(skip_hdr TRUE) + if(POLICY CMP0057) + if(has_list_of_whitelisted_headers + AND header IN_LIST list_of_whitelisted_headers) + message(STATUS "Skip whitelisted header \"${header}\".") + set(skip_hdr TRUE) + endif() endif() if(NOT skip_hdr) string(REPLACE "/" "__" header2 "${header}") From 685947ddec7ecb8d0ab9e491a67d5854326911d5 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 14 Apr 2017 17:15:06 +0200 Subject: [PATCH 6/8] Install cmake 3.7 from a ppa --- .travis.yml | 4 +++- .travis/template.txt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 68f2e218ccd..7f319eec64b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,7 +58,9 @@ compiler: - clang - gcc addons: - apt: + apt: + sources: + - sourceline: 'ppa:ppsspp/cmake' packages: - zsh - cmake diff --git a/.travis/template.txt b/.travis/template.txt index 8cb7b7e5857..4f5fec1d660 100644 --- a/.travis/template.txt +++ b/.travis/template.txt @@ -18,7 +18,9 @@ compiler: - clang - gcc addons: - apt: + apt: + sources: + - sourceline: 'ppa:ppsspp/cmake' packages: - zsh - cmake From cf987b51babf57d541e8467cb4038b45a28b0422 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 14 Apr 2017 17:41:10 +0200 Subject: [PATCH 7/8] Skip Three headers if QGLViewer is missing --- Installation/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 3aa8dd441b5..f8fadb610dc 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -1158,6 +1158,14 @@ You must disable CGAL_ENABLE_CHECK_HEADERS and CGAL_COMPUTE_DEPENDENCIES.") set(skip_hdr TRUE) endif() endif() + if(NOT QGLVIEWER_FOUND) + string(REGEX MATCH "CGAL/Three/.*" is_a_three_header ${header}) + if(is_a_three_header) + message(STATUS "Skip LEDA header \"${header}\" because \ +QGLVIEWER_FOUND_FOUND is false.") + set(skip_hdr TRUE) + endif() + endif() string(REGEX MATCH "CGAL/leda_.*" is_a_leda_header ${header}) if(NOT LEDA_FOUND AND is_a_leda_header) message(STATUS "Skip LEDA header \"${header}\" because \ From 860e7c564fd22ad4ee9cef049327a8a170ebad1c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 14 Apr 2017 18:11:43 +0200 Subject: [PATCH 8/8] Fix errors detected by Travis - What happens when VTK is missing... - `clang++ -syntax-only` is more picky than g++ --- Envelope_3/include/CGAL/Env_sphere_traits_3.h | 1 + Installation/CMakeLists.txt | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Envelope_3/include/CGAL/Env_sphere_traits_3.h b/Envelope_3/include/CGAL/Env_sphere_traits_3.h index 107a6a2e22d..287e5f476d7 100644 --- a/Envelope_3/include/CGAL/Env_sphere_traits_3.h +++ b/Envelope_3/include/CGAL/Env_sphere_traits_3.h @@ -32,6 +32,7 @@ #include #include #include +#include namespace CGAL { diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index f8fadb610dc..f2694b3c55b 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -1161,8 +1161,16 @@ You must disable CGAL_ENABLE_CHECK_HEADERS and CGAL_COMPUTE_DEPENDENCIES.") if(NOT QGLVIEWER_FOUND) string(REGEX MATCH "CGAL/Three/.*" is_a_three_header ${header}) if(is_a_three_header) - message(STATUS "Skip LEDA header \"${header}\" because \ -QGLVIEWER_FOUND_FOUND is false.") + message(STATUS "Skip Three header \"${header}\" because \ +QGLVIEWER_FOUND is false.") + set(skip_hdr TRUE) + endif() + endif() + if(NOT VTK_FOUND) + string(REGEX MATCH ".*vtk.*" is_a_vtk_header ${header}) + if(is_a_vtk_header) + message(STATUS "Skip VTK header \"${header}\" because \ +VTK_FOUND is false.") set(skip_hdr TRUE) endif() endif()