Doxygen生成的文档中的相对文件路径 [英] Relative files paths in doxygen-generated documentation

查看:447
本文介绍了Doxygen生成的文档中的相对文件路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows上使用Doxygen 1.7.4。

I am using Doxygen 1.7.4 for Windows.

在生成文档的文件列表页中,我想查看相对的路径。
我已经设置了 FULL_PATH_NAMES = YES ,除了不带路径的文件名之外,还有更多的东西,但这提供了完整的绝对路径。

In the File List page of generated documentation I'd like to see relative paths. I have set FULL_PATH_NAMES = YES, to have something more, than just filename without path, but this gives full, absolute paths.

我只想要相对于项目目录的路径。我知道,我可以使用 STRIP_FROM_PATH ,但是通配符有问题。我需要这种路径剥离方法,因为该项目是在多台PC上完成的(作为git repo),所以路径可以不同。

I want only paths relative to project directory. I know, that I can use STRIP_FROM_PATH but I have problem with wildcards. I need that kind of path-stripping, because this project is made on multiple PCs (as git repo), so paths can be different.

是否可以使用通配符对于此设置,还是我必须为每个工作站设置doxyfile,并且要删除部分绝对路径?

Is it possible to use wildcards for this setting, or do I have to set doxyfile for each workstation with part of absolute path to strip?

编辑:

我在doxygen网站上找到了所需的东西: STRIP_FROM_PATH = $(QTDIR)/

I've found something like what I need on the doxygen website: STRIP_FROM_PATH = $(QTDIR)/

也许可以使用doxyfile的变量之一?

Maybe it is possible to use one of doxyfile's variables?

推荐答案

我不确定Windows,但在Linux和OS上,XI可以在文件列表中生成输出,例如

I'm not sure about Windows, but on Linux and OS X I can produce outputs in the file list like


  • src / Utils.cpp [代码]

  • src / Utils.h [代码]

  • src / VectorMath.h [代码]

  • test / src / test.cpp [代码]

  • src/Utils.cpp [code]
  • src/Utils.h [code]
  • src/VectorMath.h [code]
  • test/src/test.cpp [code]

通过设置 FULL_PATH_NAMES STRIP_FROM_PATH ../ .. (即p的目录路径roject的根目录,这是我创建文档的两个目录)。您可能需要将目录分隔符交换到Windows上。

By setting FULL_PATH_NAMES to YES and STRIP_FROM_PATH to ../.. (i.e. the directory path of project's root which is two directories up from where I'm building the docs). You may need to swap the directory separator to the windows one.

您还需要注意的是,如果移动文档,则更新了Doxyfile。

You'll also need to watch out that you update the Doxyfile if you move the docs around.

这篇关于Doxygen生成的文档中的相对文件路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆