Open simonsan opened 4 years ago
cmake .. --graphviz=out.dot
dot -Tpng out.dot -o out.png
Looks currently like this :-P
Not the buildsystem, but c++ dependencies visualized as well:
cpp-dependencies.exe -dir libopenage --recursive --graph dependencies.dot
dot -Tpng dependencies.dot > dependencies.png
As I'm finding my way around the buildsystem in the last weeks I feel that we could add some more information to the documentation. Some first thoughts (more added later):
I think we should create an own folder
doc/buildsystem
and explain the different parts in detail. For example, how thefind_package
-System works, where to find the modules. How to add a new one or how to refactor a module. Maybe even some basiccall/caller-graphs
[1] to find the way more easy or to see where optimisation could be needed. I think that could be a long-term profit for everyone. For new people coming in to understand it and for people using it every day to find their way around faster.In addition to that, as we will probably need it more often, we should document processes like how to create a new
Makefile
-target and how to deal within CMake with these. What to do, if you want to add a new feature withinopenage
and/orlibopenage
. How is the buildsystem involved with the c++/python interface etc.Our documentation for the buildsystem is here right now: https://github.com/SFTtech/openage/blob/master/doc/buildsystem.md
Here is explained how a
make target
for adependency-graph
could look like. While the repository here has the DependencyGraph.cmake (and some other cool tooling).[1]:
cmake <PATH_TO_SOURCES> --graphviz=graph/test.dot
https://cmake.org/cmake/help/latest/module/CMakeGraphVizOptions.htmlGraphviz example:
Project to visualize cpp dependencies https://github.com/tomtom-international/cpp-dependencies#using-cpp-dependencies-to-make-visualized-graphs