Friday, 27 July 2012

Creating graphs and diagrams with Doxygen

Install Doxygen and GraphViz.

Open Doxywizard.

In Wizard tab, click on Diagrams topic. Enable Use dot tool from the GraphViz package and select desired graphs to generate.

In Expert tab, click on Project topic. Enable SHORT_NAMES.

In Expert tab, click on Dot topic. Enable HAVE_DOT and set DOT_PATH to relative path to GraphViz binaries (e.g. ../../../Program Files/Graphviz 2.28/bin). Set other attributes by your needs.

When run, Doxygen will create image files for all specified diagrams and create hyperlinks to them across the generated html files.

How to exclude directory from Doxygen parsing

Let's say we want to generate documentation for some code which is at the following path:


This project might be using some module (e.g. 3rd party code) which is contained in project1's subdirectory:


How to exclude module1 from Doxygen parser? In Doxywizard, open Expert tab and click on Input topic. Find EXCLUDE_PATTERNS attribute and type:


INPUT attribute should be set to the absolute path to the code of our project: