Make doxygen doxument the #ifdef parts too

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.


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.


Doxygen defines the macro DOXYGEN which you can use.

#if defined(MYPROJ_HAS_BOOST) || DOXYGEN
  ...
#endif

If you have many macros, it might be easier to add the Doxygen macro then to sync your macros with the one in the Doxyfile.