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:
#ifdef MYPROJ_HAS_BOOST
...
#endif
Doxygen will leave them out, because they are omitted, since MYPROJ_HAS_BOOST
is not defined. I solved it, with adding a #define MYPROJ_HAS_BOOST
.
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?
In your Doxyfile
(or whatever you've renamed it to) add the lines
PREDEFINED = MYPROJ_HAS_BOOST
You can also do this in doxywizard by setting the variable PREDEFINED
to include MYPROJ_HAS_BOOST
.
My understanding today is, that doxygen supports the defines. In your case you should enable
ENABLE_PREPROCESSING = YES
and set
PREDEFINED = MYPROJ_HAS_BOOST
or
PREDEFINED = MYPROJ_HAS_BOOST=1
If you want to reverse it (as you wanted it in your example) change to
PREDEFINED = MYPROJ_HAS_BOOST=0
Is is explained in more details here.
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.
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