Exporting arguments from boost program options to doxygen

204 Views Asked by At

I am writing a tool with command line options coordinated by boost program options. The API is well documented with Doxygen, but I would like Doxygen to also document the command line options for the tools extracting the information from the boost program_options variables. This would make the HTML useful also for the users, not just the developers.

Does anyone know if there is such an integration between boost program_options and doxygen? If not, is there some other tool out there that produces HTML command line usage based on boost program_options?

1

There are 1 best solutions below

1
On

Here's an easy way that I included my application's boost::program_options documentation in my doxygen documentation:

  1. Run your executable with the --help option, and send the output to a text file.
  2. Then in your doxygen documentation in one of your source files, use the \verbinclude command to bring in the text file that you made.

It doesn't have HTML formatting, but it does the job.

I personally put these steps under a "docs" target in my Makefile, rather than writing a script.