This is the recommended way of adding new Opts in our documentation for using custom main, but we did not compile the code to see if it works. We now compile the example as part of the BUILD_EXAMPLES option. Fixes #2787