Search code examples
c++doxygenscons

How to generate Doxygen documentation for a specific build configuration


The current build system is Scons and it is C/C++ project.

Scons take options to build specific versions of product, the defines that are being used for each source file depend on build options given.(defines given to some files are different to defines given to other files)

How can I generate doxygen documentation to reflect the code that is being built.


Solution

  • On the wiki page http://scons.org/wiki/ToolsIndex you can find a whole list of external tools for SCons, and Doxygen is amongst them. Just download and install the external package as described at the top of the page, and you should be ready to go.

    If you then want to support a, let's say, "debug" and "release" build with different variable/define settings, that should get reflected by the created Doxygen documentation, you have to create your docs twice, too. Just setup variant dirs, as described in the UserGuide, chap. 15 "Separating Source and Build Directories", or refer to the "exvar" example of my PyCon.DE 2013 talk at https://bitbucket.org/dirkbaechle/scons_talks/ .