build-eu-terminal-apps-Desktop_Qt_6_2_0_GCC_64bit-Debug/ -graphviz=eu-terminal-3.dot We generate the graph with the following commands. The above setting ignores all targets starting with test_. The option GRAPHVIZ_IGNORE_TARGETS is assigned a list of regular expressions of target names. In the final pruning step, we get rid of the test executables by adding another line to CMakeGraphVizOptions.cmake. Full dependency graph without external libraries Excluding Test Executables We generate the complete the full dependency graph this time, as it will easily fit into this post. The command results in 7 files starting with eu-terminal-2.dot – instead of the 59 files from the first run. Reading GraphViz options file: /public/Projects/eu-terminal-apps/CMakeGraphVizOptions.cmake Generate graphviz: /public/Projects/deps-eu-terminal-apps/eu-terminal-2.dot build-eu-terminal-apps-Desktop_Qt_6_2_0_GCC_64bit-Debug/ -graphviz=eu-terminal-2.dot When we run CMake with the GraphViz option, it reads the options file CMakeGraphVizOptions.cmake as shown in the output. ![]() We create the file CMakeGraphVizOptions.cmake in the directory CMAKE_SOURCE_DIR or CMAKE_BINARY_DIR with the following content. In general, test executables litter the depency graph and should be excluded (see section Excluding Test Executables) Excluding External LibrariesĮxternal libraries don’t add much to the understanding of an unfamiliar software project. Nevertheless, we discovered a little problem that we should fix. As a unit test, it should not depend on the library Machine, but use test doubles. The target test_main_model is a test executable written with QtTest. The module library QmlModuleBusinessLogicModels is a QML module and makes the C++ models from its backing library BusinessLogic available to QML. Here is the legend for the dependency graphs.Īs a composition root, the executable MainApp creates the BusinessLogic and the Machine object and links privately against the respective shared libraries. We can view the generated SVG images with the tool display. So, we generate the graph for the dependants and the dependers for the target Machine from and, respectively. The complete dependency graph is a too big to show here in the post.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |