将库的文档与重叠的后缀结合起来

Combine docs of libraries with overlapping postfix

我想合并两个库的文档:BarMyBar。但是,这会导致重叠路径出现奇怪的问题。

考虑这个项目:

Doxyfile
Bar/config.h
MyBar/config.h

Doxyfile

INPUT = Bar MyBar

Bar/config.h:

/**
Lorem ipsum

\file Bar/config.h
*/

/**
Some bar lib.
*/
namespace Bar {

} // namespace Bar

MyBar/config.h:

/**
Lorem ipsum

\file MyBar/config.h
*/

#include <Bar/config.h>

/**
Some other library
*/
namespace MyBar {

} // namespace MyBar

使用 doxygen 1.9.1 构建会出现以下警告:

Bar/config.h:4: warning: the name 'Bar/config.h' supplied as the argument in the \file statement matches the following input files:
   /myprojectdir/Bar/config.h
   /myprojectdir/MyBar/config.h
Please use a more specific name by including a (larger) part of the path!

我真的不知道如何解决这个问题:没有指定更大的路径部分(相对而言)。

\file 中目录名称的使用是潜在的问题来源。 当文件的文档块在文件本身中时,有 2 种解决方案:

  1. 使用不带文件名的\file命令
  2. 在没有目录的情况下使用\file命令

就我个人而言,我会选择第一个解决方案,因为在重命名文件的情况下,这也不必使用 \file 命令来完成。