File: dep_graph.cmake

package info (click to toggle)
pcl 1.13.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 143,524 kB
  • sloc: cpp: 518,578; xml: 28,792; ansic: 13,676; python: 334; lisp: 93; sh: 49; makefile: 30
file content (32 lines) | stat: -rw-r--r-- 1,246 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
###############################################################################
# Make a dependency graph dot file
function(MAKE_DEP_GRAPH)
    set(_dot_file "${PROJECT_BINARY_DIR}/pcl.dot")
    file(WRITE ${_dot_file} "digraph pcl {\n")
    foreach(_ss ${PCL_SUBSYSTEMS})
      if(NOT _ss STREQUAL "global_tests" AND
         NOT _ss STREQUAL "apps" AND
         NOT _ss STREQUAL "tools" AND
         NOT _ss STREQUAL "test" AND
         NOT _ss STREQUAL "python" AND
         NOT _ss STREQUAL "documentation")
        PCL_GET_SUBSYS_STATUS(_status ${_ss})
        if(_status)
            file(APPEND ${_dot_file}
                "  \"${_ss}\" [style=\"filled\" fillcolor=\"#008000\" shape=\"box\"];\n ")
        else()
            file(APPEND ${_dot_file}
                "  \"${_ss}\" [style=\"filled\" fillcolor=\"#D40000\" shape=\"box\"];\n ")
        endif()
        GET_IN_MAP(_deps PCL_SUBSYS_DEPS ${_ss})
        foreach(_dep ${_deps})
            file(APPEND ${_dot_file} "  \"${_ss}\" -> \"${_dep}\";\n")
        endforeach()
      endif()
    endforeach()

    #file(APPEND ${_dot_file}
    #    "  \"test\" [style=\"filled\" fillcolor=\"#A3A27C\" shape=\"box\"];\n ")
    file(APPEND ${_dot_file} "}\n")
endfunction(MAKE_DEP_GRAPH)