Doxygen配置文件介绍

The file essentially consists of a list of assignment statements. Each statement consisisof a TAG_NAME written in capitals, followed by the equal sign(=) and one or more values. If the same tag is assigend more than once, the last assignment overwrites any earlier assignment. For tags that take a list as their argument, the += operator can be used instead of = to append new values to the list. Values are sequences of non-blanks. If the value should contain one or more blanks it must be surrounded by quotes(“…”). Multiple lines can be concatenated by inserting a backslash() as the last character of a line.

Environment variables can be expanded using the pattern ${ENV_VARIABLE_NAME}.

You can also include part of a configuration file from another configuration file using a @INCLUDE tag as follows:

@INCLUDE = config_file_name

The include file is searched in the current working directory. You can also specify a list of directories that should be searched before looking in the current working directory. Do this by putting a @INCLUDE_PATH tag with these paths before the @INCLUDE tag, e.g:

@INCLUDE_PATH = my_config_dir

The configuration options can be divided into several categories.

常用Tag

  • EXTRACT_ALL

    By default, the EXTRACT_ALL option is set to NO in the configuration file, the doxygen will only generate documentation for documented entities. If you start using doxygen for an existing project(thus without any documentation that doxygen is aware of), you can still get an idea of what the structure is and how the documented result would look like. To do so, you must set the EXTRACT_ALL tag in the configuration file to YES. Then, doxygen will pretend everything in your sources is documented. Please note that as a consequence warnings about undocumented members will not be generated as long as EXTRACT_ALL is set to YES.

  • INPUT
    • For a small project consisting of a few C and/or C++ source and header files, you can leave INPUT tag empty and doxygen will search for sources in the current directory.
    • If you have a larger project consisting of a source directory of tree you should assign the root directory or directories to the INPUT tag, and add one or more file patterns to the FILE_PATTERNS tag (for instance .cpp .h). Only files match one of the patterns will be parsed (if the patterns are ommited a list of typical patterns is used for types of files doxygen supports).
  • OUTPUT_DIRECTORY

    The default output directory is the directory in which doxygen is started. The root directory to which the output is written can be changed using the OUTPUT_DIRECTORY.

  • EXCLUDE

  • EXCLUDE_PATTERNS

Output Formats

Doxygen直接支持的输出格式有: HTML, LATEX, Man pages, RTF, XML, DocBook, 通过在configuration file中将相应的tag设置为 YES, 来控制doxygen生成相应格式的文档.

文档输出格式 在Doxyfile中对应的tag
HTML GENERATE_HTML
LATEX GENERATE_LATEX
Man pages GENERATE_MAN
RTF GENERATE_RTF
XML GENERATE_XML
Docbook GENERATE_DOCBOOK

除了上面这些doxygen直接支持的文档格式外, doxygen间接支持的文档格式还有:

  • Compiled HTML Help
  • Qt Compressed Help(.qch)
  • Eclipse Help
  • XCode DocSets
  • PostScript
  • PDF