I'm writing a small program in C and I want to document it so others could change some details. I wrote a config.h file with #define
s that enable some operation or not, some of them are mutually exclusive, others aren't.
Example of not mutually exclusive:
#define USE_A
#define USE_B
#define USE_C
Example of mutually exclusive:
#define BUILD_FULL
#define BUILD_COMPACT
Until now I selected the configuration of the program to compile by documenting out the features I don't want to use, for example:
//#define BUILD_FULL
#define BUILD_COMPACT
to build a COMPACT executable.
How can I write documentation for the commented out features?
I tried:
#define USE_A //!< Special Feature
#define USE_B //!< Special Feature
//#define USE_C //!< Special Feature
I compiled it without USE_C
but obviously I lost the documentation because doxygen didn't parse it. How would you rewrite the #define
flow if I misunderstand the right way of using defines?