Excluding directories for Doxygen

How do I make Doxygen exclude, bypass, ignore, stay clear of specified directories or folders (preferably something that works)?

Use the INPUT configuration option!

INPUT = src other_folder README.md

As mentioned, exclude patterns will still consider the files in the directories, and not parse them based on it matching the regex. Specifying folders and files to be considered will achieve the desired result of not even searching the folders in the first place, which can dramatically improve generation time.

Note that this needs the EXCLUDE directive to be empty, or the searching will happen.

Precisions from David C.'s comment:

More precisely, adding a directory to the EXCLUDE directive causes everything in that directory to be searched. You can exclude specific files (that would otherwise by hit by the INPUT directive) without blowing up the search process.


Note that I can see a similar phenomenon when I use doxygen. However, that happens when the tool searches for example files and images:

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
[...]

As you have the the EXCLUDE_PATTERNS setup to ignore the .svn sub-directories. I suppose that's a bug in doxygen which should check for those exclusions when scanning for examples and images.

Also it looks like it could be that it prints all the directories on the screen, but properly ignores them as before using them it checks the exclusion patterns. But that is just a guess; although it seems someone says that's the way it works here:

http://doxygen.10944.n7.nabble.com/EXCLUDE-DIRECTORY-PATTERN-td2185.html


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

So, just use absolute paths for your exclusions ;)

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

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.


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.

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).

Tags:

Doxygen