diff --git a/src/argparse_utils.h b/src/argparse_utils.h index 18f4f952bf..e102bad15d 100644 --- a/src/argparse_utils.h +++ b/src/argparse_utils.h @@ -21,6 +21,7 @@ * @param config The config which will be populated here * @param log The logging config node's key. If empty, logging will not be configured. * @param use_threads Whether this program multi-threads + * @param extra_help Optional function pointer to print more stuff to the end of the help message. * * @returns true if the program should continue, false if we should EXIT_SUCCESS * @throws cxxopts::exceptions::exception Thrown if there's no valid configuration @@ -30,9 +31,13 @@ bool parse_common_args(const std::string& program, const cxxopts::ParseResult& result, boost::property_tree::ptree& conf, const std::string& log, - const bool use_threads = false) { + const bool use_threads = false, + std::function extra_help = nullptr) { if (result.count("help")) { std::cout << opts.help() << "\n"; + if (extra_help) { + extra_help(); + }; return false; } diff --git a/src/mjolnir/valhalla_build_tiles.cc b/src/mjolnir/valhalla_build_tiles.cc index 0ef39323e5..3269cdf05c 100644 --- a/src/mjolnir/valhalla_build_tiles.cc +++ b/src/mjolnir/valhalla_build_tiles.cc @@ -57,7 +57,7 @@ int main(int argc, char** argv) { options.parse_positional({"input_files"}); options.positional_help("OSM PBF file(s)"); auto result = options.parse(argc, argv); - if (!parse_common_args(program, options, result, config, "mjolnir.logging", true)) + if (!parse_common_args(program, options, result, config, "mjolnir.logging", true, &list_stages)) return EXIT_SUCCESS; // Convert stage strings to BuildStage