3

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?

Carneiro
  • 3,479
  • 5
  • 24
  • 36
  • I'd very much just write this myself. There's a markdown plugin for Doxygen IIRC. You could reuse the markdown somewhere in your documentation. – sehe Dec 26 '13 at 21:55
  • The key here is that Doxygen would read from my option_description variables instead of my documentation, therefore, it would always be up to date. Implementing this is definitely a big project. – Carneiro Dec 27 '13 at 01:54
  • How would it ever be a big project? It's not like the program_options configuration is soooo extensive? – sehe Dec 27 '13 at 01:57

1 Answers1

1

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.

David Steinhauer
  • 2,076
  • 2
  • 16
  • 14
  • definitely a useful suggestion. But I was looking for something more complete that would actually leverage the knowledge from boost::program_options. – Carneiro Feb 27 '14 at 21:26