排除Doxygen的目录 [英] Excluding directories for Doxygen

查看:104
本文介绍了排除Doxygen的目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望Doxygen忽略,跳过而不是搜索项目的以下目录:

I want Doxygen to ignore, bypass, not search the following directories of my project:

*/.svn/*
*/docs/*
*/Properties/*
*/bin/*

根据 Doxygen常见问题解答

How can I exclude all test directories from my directory tree?

Simply put an exclude pattern like this in the configuration file:

EXCLUDE_PATTERNS = */test/*

因此,我的Doxygen文件如下所示:

So, my Doxygen file looks like this:

# If the value of the INPUT tag contains directories, you can use the 
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
# certain files from those directories. Note that the wildcards are matched 
# against the file with absolute path, so to exclude all test directories 
# for example use the pattern */test/*

EXCLUDE_PATTERNS       = */.svn/* \
                         */docs/* \
                         */published/* \
                         */bin/* \
                         */obj/*

Doxygen的输出为:

The output from Doxygen is:

Searching for include files...
Searching for example files...
Searching for images...
Searching for files in directory c:/Test_Fixtures/pc_application/docs
Searching for files in directory c:/Test_Fixtures/pc_application/docs/.svn
Searching for files in directory c:/Test_Fixtures/pc_application/docs/.svn/prop-base
Searching for files in directory c:/Test_Fixtures/pc_application/docs/.svn/props
Searching for files in directory c:/Test_Fixtures/pc_application/docs/.svn/text-base
Searching for files in directory c:/Test_Fixtures/pc_application/docs/.svn/tmp
Searching for files in directory c:/Test_Fixtures/pc_application/docs/.svn/tmp/prop-base
Searching for files in directory c:/Test_Fixtures/pc_application/docs/.svn/tmp/props
Searching for files in directory c:/Test_Fixtures/pc_application/docs/.svn/tmp/text-base
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/.svn
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/.svn/prop-base
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/.svn/props
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/.svn/text-base
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/.svn/tmp
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/.svn/tmp/prop-base
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/.svn/tmp/props
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/.svn/tmp/text-base
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/search
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/search/.svn
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/search/.svn/prop-base
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/search/.svn/props
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/search/.svn/text-base
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/search/.svn/tmp
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/search/.svn/tmp/prop-base
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/search/.svn/tmp/props
Searching for files in directory c:/Test_Fixtures/pc_application/docs/html/search/.svn/tmp/text-base
Searching for files in directory c:/Test_Fixtures/pc_application/docs/rtf
Searching for files in directory c:/Test_Fixtures/pc_application/docs/rtf/.svn
Searching for files in directory c:/Test_Fixtures/pc_application/docs/rtf/.svn/prop-base
Searching for files in directory c:/Test_Fixtures/pc_application/docs/rtf/.svn/props
Searching for files in directory c:/Test_Fixtures/pc_application/docs/rtf/.svn/text-base
Searching for files in directory c:/Test_Fixtures/pc_application/docs/rtf/.svn/tmp
Searching for files in directory c:/Test_Fixtures/pc_application/docs/rtf/.svn/tmp/prop-base
Searching for files in directory c:/Test_Fixtures/pc_application/docs/rtf/.svn/tmp/props
Searching for files in directory c:/Test_Fixtures/pc_application/docs/rtf/.svn/tmp/text-base

这清楚地表明EXCLUDE_PATTERNS无法正常工作。
我还将EXCLUDE选项设置为:

Which clearly shows that the EXCLUDE_PATTERNS is not working. I also have the EXCLUDE option set as:

# The EXCLUDE tag can be used to specify files and/or directories that should 
# excluded from the INPUT source files. This way you can easily exclude a 
# subdirectory from a directory tree whose root is specified with the INPUT tag.

EXCLUDE                = ../.svn \
                         ../docs \
                         ../published \
                         ../docs/.svn \
                         ../docs/.svn

两者都不起作用。

因此,USD $ 100000的问题是:如何使Doxygen排除,绕过,忽略,远离指定的目录或文件夹(最好是起作用的)?

So, the USD$ 100000 question is: How do I make Doxygen exclude, bypass, ignore, stay clear of specified directories or folders (preferably something that works)?

我正在64位CPU平台上的Windows 7上使用Doxygen向导和Doxygen 1.7.3。

I am using the Doxygen Wizard on Windows 7 on 64-bit CPU platform, and Doxygen 1.7.3.

推荐答案


请注意,通配符与具有绝对路径的文件匹配

Note that the wildcards are matched against the file with absolute path

因此,只需使用绝对路径进行排除即可;)

So, just use absolute paths for your exclusions ;)

PS:顺便说一句,我为此付出了很多努力。在doxyfile的注释中很少提及这一点似乎经常被忽略。

PS: BTW, I have struggled too many times with that. This small mention on the doxyfile's comment seems to go unnoticed too often.

糟糕,我错过了您已经尝试过的细节。也许是多行值的问题:尝试仅使用空格作为分隔符来内联所有路径。在最近使用doxygen的少数系统上,这(加上绝对模式)就足够了。

Oops, I missed the detail that you had already tried that. Maybe it's an issue with the multi-line value: try inlining all the paths, using just a space as separator. That (plus absolute patterns) is enough on the few systems I have been using doxygen lately.

我已经做得更深入了测试,还再次查看了doxyfile的文档。
正确的语法是使用空格分隔。如果您确实想使用多行,则受支持和记录的语法将是:

I have done some deeper testing, and also taken another look at the doxyfile's documentation. The correct syntax is using space for separation. If you really want to go multi-line, the supported and documented syntax would be:

EXCLUDE_PATTERNS       = */.svn/*
EXCLUDE_PATTERNS      += */docs/*
EXCLUDE_PATTERNS      += */published/*
# and so on

另外,仔细看看排除模式是如何工作的:包含目录本身,然后将根据排除模式测试其中的所有内容,(因为它将始终匹配) 按文件逐个排除

Also, take a closer look at how exclude patterns work: the directory itself is included, then everything within it will be tested against the exclude patterns and (since it will always match), be excluded on a file-per-file basis.

因此,请仔细查看您的输出:目录中的文件应该存在(doxygen会搜索该目录,但在目录上什么也找不到,因为所有内容都被排除在外);您是否获得个文件的解析代码为这些目录中的任何内容生成的文档?如果您没有得到任何提示,则表示一切工作正常(已搜索目录,但不包含任何目录)。如果确实包含这些文件,请尝试使用空格或 + = 语法。我在文档上什么也没有看到,甚至暗示您的 \ 语法可以工作(当然,我可能忽略了某些东西)。

So take a closer look at your output: the Searching for files in directory lines are supposed to be there (doxygen will search the directory, but find nothing on it because everything is being excluded); are you getting Parsing code for file or Generating docs for for any of the contents on those directories? If you don't get any of those, this means that everything is working fine (directories are searched, but nothing on them is included). If the files are indeed being included, give the space separation or the += syntax a try. I see nothing on the docs even hinting that your \ syntax could work (of course, I may have overlooked something).

这篇关于排除Doxygen的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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