I want to document a configuration macro with doxygen. That macro is not defined in source code but is required to be defined using compiler definition settings.
Since I have no definition I tried something like the following which I found in the doxygen manual (I added this snippet to the header that is using the macro for conditional compilation):
/*! \def MY_CONFIG_MACRO
Got the very same problem, it was resolved like this:
In the doxygen configuration file, add:
PREDEFINED = IN_DOXYGEN
Somewhere in the source code, add:
/* Exporting cmake compilation flags to doxygen, so they get documented. */ #ifdef IN_DOXYGEN #define MY_CONFIG_MACRO #endif /* IN_DOXYGEN */
Then the documentation for MY_CONFIG_MACRO is picked up properly.