Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
排除Doxygen的目录_Doxygen - Fatal编程技术网

排除Doxygen的目录

排除Doxygen的目录,doxygen,Doxygen,我希望Doxygen忽略、绕过、而不是搜索我的项目的以下目录: */.svn/* */docs/* */Properties/* */bin/* 根据报告: 因此,我的Doxygen文件如下所示: # 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 # c

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

*/.svn/*
*/docs/*
*/Properties/*
*/bin/*
根据报告:

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

# 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的输出为:

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
这清楚地表明排除模式不起作用。 我还将排除选项设置为:

# 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
这也不起作用

因此,10万美元的问题是:如何让Doxygen排除、绕过、忽略、远离指定的目录或文件夹(最好是能够工作的)

我正在64位CPU平台上的Windows7和Doxygen1.7.3上使用Doxygen向导

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

所以,只需使用绝对路径进行排除;)

顺便说一句,我已经为此挣扎了太多次了。doxyfile评论中的这一小部分内容似乎经常被忽视

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


我已经做了一些更深入的测试,并再次查看了doxyfile的文档。 正确的语法是使用空格分隔。如果您真的想使用多行,那么支持的和文档化的语法将是:

EXCLUDE_PATTERNS       = */.svn/*
EXCLUDE_PATTERNS      += */docs/*
EXCLUDE_PATTERNS      += */published/*
# and so on
另外,仔细看看排除模式是如何工作的:包括目录本身,然后将根据排除模式测试其中的所有内容(因为它始终匹配),并根据每个文件排除


因此,请仔细查看您的输出:
搜索目录中的文件
行应该在那里(doxygen将搜索目录,但在目录上找不到任何内容,因为所有内容都被排除在外);您是否正在为文件获取解析代码,或为这些目录中的任何内容生成文档?如果你没有得到任何这些,这意味着一切都很好(目录被搜索,但其中没有任何内容)。如果文件确实包含在内,请尝试使用空格分隔或
+=
语法。我在文档中看不到任何东西,甚至没有暗示您的
\
语法可以工作(当然,我可能忽略了一些东西)。

请注意,我在使用doxygen时可以看到类似的现象。但是,当工具搜索示例文件和图像时会发生这种情况:

Searching for example files...
Searching for files in directory .../wpkg/mainline/documentation
Searching for files in directory .../wpkg/mainline/documentation/.svn
Searching for files in directory .../wpkg/mainline/documentation/.svn/prop-base
[...]
Searching for images...
Searching for files in directory .../wpkg/mainline/documentation
Searching for files in directory .../wpkg/mainline/documentation/.svn
Searching for files in directory .../wpkg/mainline/documentation/.svn/prop-base
[...]
因为您有排除模式设置来忽略.svn子目录。我想这是doxygen中的一个bug,在扫描示例和图像时应该检查这些排除

此外,它看起来可能会打印屏幕上的所有目录,但会正确地忽略它们,就像使用它们之前一样,它会检查排除模式。但这只是一个猜测;虽然似乎有人说这就是它的工作方式:

如何使Doxygen排除、绕过、忽略、远离指定的目录或文件夹(最好是工作正常的目录或文件夹)

使用
输入
配置选项

INPUT = src other_folder README.md

AS,排除模式仍将考虑目录中的文件,而不是基于匹配ReGEX解析它们。指定要考虑的文件夹和文件将实现一开始甚至不搜索文件夹的预期结果,这可以显著缩短生成时间

请注意,这需要
EXCLUDE
指令为空,否则将进行搜索

的精度:

更准确地说,将目录添加到EXCLUDE指令会导致搜索该目录中的所有内容。您可以排除特定文件(否则会被输入指令命中),而无需中断搜索过程


不幸的是,它仍然在每个.svn文件夹下的所有子文件夹中搜索。我认为这是不对的,排除家长应该自动排除所有孩子(甚至不搜索他们)。有没有办法排除Doxygen搜索的所有.svn文件夹和子文件夹?@noisefree:我用了另一种方法。我关闭了doxygen中的递归搜索,并指定了它应该扫描的目录。因为我只有基本目录和包含目录,所以它只需要两个条目。如果要扫描的目录和子目录太多,可能无法正常工作。如果目录名有空间,我该怎么办?例如,如果是测试文件。请注意,Subversion更改了它们的方案,而不是每个目录都有一个.svn子目录,现在根目录中只有一个。这意味着我们现在可以在子目录中运行doxygen而不会产生subversion的副作用(至少从Ubuntu 13.04开始)。强调“这需要排除指令为空”更准确地说,在
排除
指令中添加一个目录会导致搜索该目录中的所有内容。您可以排除特定文件(否则会被
输入
指令命中),而无需中断搜索过程。
INPUT = src other_folder README.md