I'm using Doxygen version 1.8.11 and trying to doc my X macro:
#define COLOR_VARIABLES\
COLOR__X(RED /*!< "RED COLOR" */)\
COLOR__X(BLUE /*!< "BLUE COLOR" */)\
Then I use it in an enum:
/** COLOR doc */
typedef enum {
#define COLOR__X(name) name,
COLOR_VARIABLES
#undef COLOR__X
} color;
I have the MACRO_EXPANSION and ENABLE_PREPROCESSING set to YES and the @file
at the beginning of my file.
I'd like the HTML created with the doxygen to show the documentation for each variable defined with the x macro. Can it be done?
Edit:
So after some suggestions here, I noticed that in my doxyfile I have the following configurations:
MACRO_EXPANSION = YES
EXPAND_ONLY_PREDEF = YES
ENABLE_PREPROCESSING = YES
PREDEFINED = INNER_FUNC(msg)=
If I change the EXPAND_ONLY_PREDEF
to No it will work but it causes other problems in my project. I have tried to do the following options but it didn't work:
Option 1:
PREDEFINED = INNER_FUNC(msg)= /
COLOR__X(name)=name, /
COLOR__X:=COLOR__X
Option 2:
EXPAND_AS_DEFINED = COLOR__X(name) /
COLOR__X