Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure Doxygen to hide certain names or keywords

Tags:

c

doxygen

I'm just getting started with Doxygen, and have done considerable searching on this, so forgive me if there's an obvious answer.

I'm working on an embedded project where functions can be tagged as debug or nodebug before the return type. In most of our libraries, we use a conditional macro to set libname_debug to either debug or nodebug at the top of the file, and then each function is prefaced with libname_debug.

For documentation purposes, I'd like to have Doxygen leave libname_debug out of the function documentation. It clutters up the function list and makes it harder to see the return types of each function.

Is it possible to tag the file in some way so Doxygen will leave that symbol out? At the moment, I'm wrapping each instance in @cond/@endcond:

/** @cond */ libname_debug /** @endcond */

But that's a pain and adds extra markup to the source.

like image 509
tomlogic Avatar asked Jun 25 '10 17:06

tomlogic


1 Answers

There is also a doxygen page explaining how to handle such situations. You would enable MACRO_EXPANSION (which defaults to NO), tell doxygen to only expand some macros (EXPAND_ONLY_PREDEF) and add your symbol as macro with an empty expansion:

ENABLE_PREPROCESSING   = YES
MACRO_EXPANSION        = YES
EXPAND_ONLY_PREDEF     = YES
PREDEFINED             = libname_debug=
like image 100
Micha Wiedenmann Avatar answered Sep 28 '22 06:09

Micha Wiedenmann