gsamaras gsamaras - 1 year ago 66
C++ Question

Make doxygen doxument the #ifdef parts too

As suggested here, I have some parts in my code, that are enabled by a compilation flag.

For example I have this piece of code:


Doxygen will leave them out, because they are omitted, since
is not defined. I solved it, with adding a

However this is not nice, because in the future (I am planning to extend the project), when the time comes to re-generate my documentation, maybe I will have forgotten about this.

Is there any way to say to Doxygen (ideally via doxywizard) to take into account these parts of my code too?

Answer Source

I think you just need to disable preprocessing at all by setting ENABLE_PREPROCESSING to NO in doxygen configuration file.

In doxywizard go to Expert -> Preprocessor and you will find ENABLE_PREPROCESSING. Just uncheck it to set it to NO.

More information about preprocessing in doxygen can be found in documentation here.