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.
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=
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With