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?

3
  • 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, 2013 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, 2013 at 1:54
  • How would it ever be a big project? It's not like the program_options configuration is soooo extensive?
    – sehe
    Dec 27, 2013 at 1:57

1 Answer 1

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.

1
  • 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, 2014 at 21:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.