Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AABB_tree/package_info/AABB_tree/dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ BGL
Cartesian_kernel
Circulator
Distance_2
Distance_3
Installation
Intersections_2
Intersections_3
Expand All @@ -16,4 +17,3 @@ Property_map
STL_Extension
Spatial_searching
Stream_support
Distance_3
3 changes: 1 addition & 2 deletions Convex_hull_2/package_info/Convex_hull_2/dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Kernel_23
Modular_arithmetic
Number_types
Profiling_tools
Property_map
STL_Extension
Stream_support
Property_map

2 changes: 1 addition & 1 deletion Convex_hull_d/package_info/Convex_hull_d/dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Algebraic_foundations
Circulator
Convex_hull_d
Distance_2
Distance_3
Hash_map
Installation
Intersections_2
Expand All @@ -14,4 +15,3 @@ Number_types
Profiling_tools
STL_Extension
Stream_support
Distance_3
1 change: 1 addition & 0 deletions Geomview/package_info/Geomview/dependencies
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Algebraic_foundations
Circulator
Geomview
Installation
Interval_support
Kernel_23
Expand Down
2 changes: 0 additions & 2 deletions GraphicsView/package_info/GraphicsView/dependencies
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Algebraic_foundations
Distance_2
GraphicsView
Hash_map
Installation
Intersections_2
Interval_support
Expand All @@ -11,4 +10,3 @@ Number_types
Profiling_tools
STL_Extension
Stream_support
Triangulation_2
35 changes: 28 additions & 7 deletions Installation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,9 @@ ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_Qt5_3RD_PARTY_DEFINITIONS} \
${CGAL_DEFINITIONS}"
)
message("COMPILATION OPTIONS ARE : ${compile_options}")

if(CGAL_HEADER_ONLY)
set(compile_options "${compile_options} -DCGAL_HEADER_ONLY=1")
endif()
if(NOT RS_FOUND AND NOT RS3_FOUND)
set(compile_options "${compile_options} \
-DCGAL_ALGEBRAIC_KERNEL_RS_GMPZ_D_1=1 \
Expand Down Expand Up @@ -1175,18 +1177,22 @@ You must disable CGAL_ENABLE_CHECK_HEADERS.")
execute_process(COMMAND "${CMAKE_COMMAND}" -DDOXYGEN_EXECUTABLE=${DOXYGEN_EXECUTABLE} "${CMAKE_SOURCE_DIR}/Documentation/doc"
WORKING_DIRECTORY "${DOC_DIR}"
)
execute_process(COMMAND "${CMAKE_COMMAND}" --build . --target "doc"
include(ProcessorCount)
ProcessorCount(NPROCS)
execute_process(COMMAND "${CMAKE_COMMAND}" --build . --target "doc" -j${NPROCS}
WORKING_DIRECTORY "${DOC_DIR}" )

#Get the list of the documented headers

file(GLOB html_files RELATIVE "${DOC_DIR}/doc_output/" "${DOC_DIR}/doc_output/*/*.html")
file(GLOB example_files RELATIVE "${CMAKE_SOURCE_DIR}/" "${CMAKE_SOURCE_DIR}/*/examples/*/*.cpp")
find_program(AWK awk)
set(awk_arguments [=[{ match($0, /# *include *(&lt;|[<"])(CGAL\/[^>&"]*)([>"]|&gt;)/,arr); if(arr[2]!="") print arr[2] }]=])
message("listing headers from html files")
foreach(f ${html_files})
execute_process(COMMAND "${AWK}" "${awk_arguments}" "${DOC_DIR}/doc_output/${f}"
execute_process(COMMAND
"${AWK}"
-f "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/documented_headers.awk"
"${DOC_DIR}/doc_output/${f}"
OUTPUT_VARIABLE tmp_list)
if (NOT "${tmp_list}" STREQUAL "")
string(REPLACE "\n" ";" tmp_list ${tmp_list})
Expand All @@ -1195,7 +1201,10 @@ You must disable CGAL_ENABLE_CHECK_HEADERS.")
endforeach()
message("listing headers from examples files")
foreach(f ${example_files})
execute_process(COMMAND "${AWK}" "${awk_arguments}" "${CMAKE_SOURCE_DIR}/${f}"
execute_process(COMMAND
"${AWK}"
-f "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/documented_headers.awk"
"${CMAKE_SOURCE_DIR}/${f}"
OUTPUT_VARIABLE tmp_list)
if (NOT "${tmp_list}" STREQUAL "")
string(REPLACE "\n" ";" tmp_list ${tmp_list})
Expand Down Expand Up @@ -1332,7 +1341,6 @@ ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/${header}"
list(REMOVE_DUPLICATES packages_deps)
endif()
endforeach() # loop on packages

#Now check that a cpp file including all documented headers compiles
file(WRITE ${CGAL_BINARY_DIR}/test_headers.cpp "#define BOOST_PARAMETER_MAX_ARITY 12 \n")
foreach(header ${list_of_headers_to_test})
Expand All @@ -1353,6 +1361,17 @@ ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/${header}"
)

add_custom_target(packages_dependencies DEPENDS ${packages_deps})

configure_file(${CGAL_MODULES_DIR}/dependencies_graph/build-graphs.sh.in
${CGAL_BINARY_DIR}/build-graphs.sh @ONLY)
file(COPY ${CGAL_MODULES_DIR}/dependencies_graph/html DESTINATION ${CGAL_BINARY_DIR}/package_info)
add_custom_command(OUTPUT
${CGAL_BINARY_DIR}/package_info/html/deps.svg
${CGAL_BINARY_DIR}/package_info/html/deps-unfiltered.svg
COMMAND bash ${CGAL_BINARY_DIR}/build-graphs.sh
DEPENDS packages_dependencies
WORKING_DIRECTORY ${CGAL_BINARY_DIR})
add_custom_target(dependency_graphs DEPENDS ${CGAL_BINARY_DIR}/package_info/html/deps.svg)
message( " \n\
You can now check the headers with the target `check_headers`\n\
and the package dependencies with the target `packages_dependencies`.\n\
Expand All @@ -1361,7 +1380,9 @@ ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/${header}"
- package_info/<package>/dependencies\n\
- package_info/<package>/included_headers\n\
- package_info/<package>/check_headers/ (error messages from \
the headers checks)\n")
the headers checks)\n\n\
If you have 'bash' and the graphviz tools suite, then the target \n\
`dependency_graphs` will also build HTML pages in `package_info/html/`.\n")
message( "== Setting header checking (DONE) ==\n" )
endif()
endif( CGAL_BRANCH_BUILD )
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

set -e

path=@CGAL_MODULES_DIR@/dependencies_graph

bash ${path}/deps_to_graphiz.sh | sed -f ${path}/filter.sed | tred | dot -Txdot | gvpr -c -f ${path}/filter.gvpr | dot -Tsvg -o package_info/html/deps.svg
bash ${path}/deps_to_graphiz.sh | sed -f ${path}/minimal_filter.sed | tred | dot -Txdot | gvpr -c -f ${path}/filter.gvpr | dot -Tsvg -o package_info/html/deps-unfiltered.svg
65 changes: 65 additions & 0 deletions Installation/cmake/modules/dependencies_graph/deps_to_graphiz.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/bash

if [ -n "$1" ]; then
set > $1
fi

printf "strict digraph CGAL_Dependencies {\n rank=source\n rankdir=LR\n"
echo <<EOF
subgraph Foundations {
label=Foundation
node [shape=box]
Algebraic_foundations
Algebraic_kernel_d
Arithmetic_kernel
BGL
Cartesian_kernel
CGAL_Core
CGAL_ImageIO
Circulator
Combinatorial_map
Distance_2
Distance_3
Filtered_kernel
Generator
Geomview
HalfedgeDS
Hash_map
Homogeneous_kernel
Installation
Intersections_2
Intersections_3
Interval_support
Inventor
Kernel_23
Kernel_d
LEDA
Modifier
Modular_arithmetic
NewKernel_d
Number_types
OpenNL
Optimisation_basic
Polygon
Polynomial
Profiling_tools
Property_map
Random_numbers
Solver_interface
Spatial_sorting
STL_Extension
Stream_support
Subdivision_method_3
Testsuite
Union_find
}
EOF
for f in package_info/*/dependencies; do
pkg=${f#package_info/}
pkg=${pkg%/dependencies}
printf " %s;\n" $pkg
for dep in $(cat $f); do
printf " %s -> %s;\n" $pkg $dep
done
done
printf "}\n"
6 changes: 6 additions & 0 deletions Installation/cmake/modules/dependencies_graph/filter.gvpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/gvpr -c

N[outdegree==0]{color="orange"}
N[indegree==0]{color="green"}
N[outdegree==0 && indegree==0]{color="blue"}
E[$.tail.X > $.head.X] {color="red"}
63 changes: 63 additions & 0 deletions Installation/cmake/modules/dependencies_graph/filter.sed
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/sed -f

s/build-check-deps/BUILD_DIR/g;

#
# LGPL packages
#
s/Algebraic_foundations/Foundation_packages__LGPL_/g;
s/Algebraic_kernel_d/Foundation_packages__LGPL_/g;
s/Arithmetic_kernel/Foundation_packages__LGPL_/g;
s/BGL/Foundation_packages__LGPL_/g;
s/Cartesian_kernel/Foundation_packages__LGPL_/g;
s/CGAL_Core/Foundation_packages__LGPL_/g;
s/CGAL_ImageIO/Foundation_packages__LGPL_/g;
s/Circulator/Foundation_packages__LGPL_/g;
s/Combinatorial_map/Foundation_packages__LGPL_/g;
s/Conic_2/Foundation_packages__LGPL_/g;
s/Distance_2/Foundation_packages__LGPL_/g;
s/Distance_3/Foundation_packages__LGPL_/g;
s/Filtered_kernel/Foundation_packages__LGPL_/g;
s/Generator/Foundation_packages__LGPL_/g;
s/Geomview/Foundation_packages__LGPL_/g;
s/HalfedgeDS/Foundation_packages__LGPL_/g;
s/Hash_map/Foundation_packages__LGPL_/g;
s/Homogeneous_kernel/Foundation_packages__LGPL_/g;
s/Installation/Foundation_packages__LGPL_/g;
s/Intersections_2/Foundation_packages__LGPL_/g;
s/Intersections_3/Foundation_packages__LGPL_/g;
s/Interval_support/Foundation_packages__LGPL_/g;
s/Inventor/Foundation_packages__LGPL_/g;
s/Kernel_23/Foundation_packages__LGPL_/g;
s/\bKernel_d\b/Foundation_packages__LGPL_/g;
s/LEDA/Foundation_packages__LGPL_/g;
s/Modifier/Foundation_packages__LGPL_/g;
s/Modular_arithmetic/Foundation_packages__LGPL_/g;
s/NewKernel_d/Foundation_packages__LGPL_/g;
s/Number_types/Foundation_packages__LGPL_/g;
s/OpenNL/Foundation_packages__LGPL_/g;
s/Optimisation_basic/Foundation_packages__LGPL_/g;
s/\bPolygon\b/Foundation_packages__LGPL_/g;
s/Polynomial/Foundation_packages__LGPL_/g;
s/Profiling_tools/Foundation_packages__LGPL_/g;
s/Property_map/Foundation_packages__LGPL_/g;
s/Random_numbers/Foundation_packages__LGPL_/g;
s/Solver_interface/Foundation_packages__LGPL_/g;
s/Spatial_sorting/Foundation_packages__LGPL_/g;
s/STL_Extension/Foundation_packages__LGPL_/g;
s/Stream_support/Foundation_packages__LGPL_/g;
s/Subdivision_method_3/Foundation_packages__LGPL_/g;
s/Testsuite/Foundation_packages__LGPL_/g;
s/Union_find/Foundation_packages__LGPL_/g;

#
# Special LGPL packages
#
s/CGAL_ipelets/Ipelets__LGPL__/g;
s/Linear_cell_complex/Linear_cell_complex__LGPL__/g;
s/Generalized_map/Generalized_map__LGPL__/g;
s/Kinetic_data_structures/Kinetic__LGPL__/g;
s/Kinetic_framework/Kinetic__LGPL__/g;

# renaming
s/Principal_component_analysis_LGPL/PCA__LGPL_files__/g;
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright (c) 2015 Mountainstorm
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

/* this element needs tooltip positioning to work */
.graphviz-svg {
position: relative;
}

/* stop tooltips wrapping */
.graphviz-svg .tooltip-inner {
white-space: nowrap;
}

/* stop people selecting text on nodes */
.graphviz-svg text {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
cursor: default;
}
Loading