CMake option to build dependency graph (and maybe put it on nightly)
I find this graph occasionally useful. It is not too difficult to generate automatically with commands. I am documenting that here and suggesting adding it to the nightly CI.
On existing built repo in the build directory run:
cmake . --graphviz=graph.dot
On new build just append the graphviz bit.
Then on machine (ideally linux with graphviz installed, ) run:
dot -Tpng -o graph.png graph.dot
In the build directory it is useful to have a CMakeGraphVizOptions.cmake file with the following (else its too messy):
set(GRAPHVIZ_EXECUTABLES FALSE)
set(GRAPHVIZ_INTERFACE_LIBS FALSE)
set(GRAPHVIZ_MODULE_LIBS FALSE)
set(GRAPHVIZ_OBJECT_LIBS FALSE)
set(GRAPHVIZ_UNKNOWN_LIBS FALSE)
set(GRAPHVIZ_EXTERNAL_LIBS FALSE)