- the “dot” GraphViz program converts the .dot files to PNG, SVG, etc. This is typically available on Linux, Homebrew, Windows MSYS2, Cygwin, WSL, etc.
- Since CMake needs to configure and generate, the compiler and generator needed by the CMake project must be working. However the project does not need to be compiled before generating the dependency graph.
h5fortran HDF5 object-oriented Fortran dependency graph is below. SVG can be a useful format since it’s vector and can be zoomed arbitrarily large in a web browser, while PNG is viewable by almost anything.
cmake -B build --graphviz=foo.dot dot -Tpng -o foo.png foo.dot dot -Tsvg -o foo.svg foo.dot
The “dependers” files show only the nodes depending on a node.