如何在 doxygen 配置文件(例如 iostream 库)中添加不带扩展名的文件?

How to add files without extension in doxygen configuration file(e.g iostream library)?

在我的配置文件的INPUT标签中我添加了一个目录。在 iostream 里面没有任何扩展名。在 运行 配置文件之后,我没有获得与 iostream 相关的信息。我想知道如何在doxygen配置文件中添加不带扩展名的文件。

我创建了一个小测试示例(内容与此测试无关),文件 stdio:

/// the fie
void fie(void);

来自文档 (https://www.doxygen.nl/manual/config.html#cfg_extension_mapping):

EXTENSION_MAPPING

Doxygen selects the parser to use depending on the extension of the files it parses. With this tag you can assign which parser to use for a given extension. Doxygen has a built-in mapping, but you can override or extend it using this tag. The format is ext=language, where ext is a file extension, and language is one of the parsers supported by doxygen: IDL, Java, JavaScript, Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL, Fortran (fixed format Fortran: FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: Fortran. In the later case the parser tries to guess whether the code is fixed or free formatted code, this is the default for Fortran type files).

For instance to make doxygen treat .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C.

Note: For files without extension you can use no_extension as a placeholder. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.

这里我们看到 no_extension 的可能性,通过以下设置我们得到请求的信息:

EXTRACT_ALL=YES
INPUT = stdio
EXTENSION_MAPPING = no_extension=C++

我确实看到了 stdio 信息。

编辑 如果不想一一添加所有文件,则必须将 * 添加到 FILE_PATTERNS