generate boost::program_options object for the routing part
| 96 | |
| 97 | // generate boost::program_options object for the routing part |
| 98 | bool generateDataStoreOptions(const int argc, |
| 99 | const char *argv[], |
| 100 | std::string &verbosity, |
| 101 | std::filesystem::path &base_path, |
| 102 | int &max_wait, |
| 103 | std::string &dataset_name, |
| 104 | bool &list_datasets, |
| 105 | bool &list_blocks, |
| 106 | bool &only_metric, |
| 107 | std::vector<storage::FeatureDataset> &disable_feature_dataset) |
| 108 | { |
| 109 | // declare a group of options that will be allowed only on command line |
| 110 | boost::program_options::options_description generic_options("Options"); |
| 111 | generic_options.add_options() // |
| 112 | ("version,v", "Show version") // |
| 113 | ("help,h", "Show this help message") // |
| 114 | ("list-inputs", "List required and optional input file extensions") // |
| 115 | ("verbosity,l", |
| 116 | boost::program_options::value<std::string>(&verbosity)->default_value("INFO"), |
| 117 | std::string("Log verbosity level: " + util::LogPolicy::GetLevels()).c_str()) // |
| 118 | ("remove-locks,r", "Remove locks") // |
| 119 | ("spring-clean,s", "Spring-cleaning all shared memory regions"); |
| 120 | |
| 121 | // declare a group of options that will be allowed both on command line |
| 122 | // as well as in a config file |
| 123 | boost::program_options::options_description config_options("Configuration"); |
| 124 | config_options.add_options() // |
| 125 | ("max-wait", |
| 126 | boost::program_options::value<int>(&max_wait)->default_value(-1), |
| 127 | "Maximum number of seconds to wait on a running data update " |
| 128 | "before aquiring the lock by force.") // |
| 129 | ("dataset-name", |
| 130 | boost::program_options::value<std::string>(&dataset_name)->default_value(""), |
| 131 | "Name of the dataset to load into memory. This allows having multiple datasets in memory " |
| 132 | "at the same time.") // |
| 133 | ("disable-feature-dataset", |
| 134 | boost::program_options::value<std::vector<storage::FeatureDataset>>( |
| 135 | &disable_feature_dataset) |
| 136 | ->multitoken(), |
| 137 | "Disables a feature dataset from being loaded into memory if not needed. Options: " |
| 138 | "ROUTE_STEPS, ROUTE_GEOMETRY") // |
| 139 | ("list", |
| 140 | boost::program_options::value<bool>(&list_datasets) |
| 141 | ->default_value(false) |
| 142 | ->implicit_value(true), |
| 143 | "List all OSRM datasets currently in memory") // |
| 144 | ("list-blocks", |
| 145 | boost::program_options::value<bool>(&list_blocks) |
| 146 | ->default_value(false) |
| 147 | ->implicit_value(true), |
| 148 | "List all OSRM datasets currently in memory")( |
| 149 | "only-metric", |
| 150 | boost::program_options::value<bool>(&only_metric) |
| 151 | ->default_value(false) |
| 152 | ->implicit_value(true), |
| 153 | "Only reload the metric data without updating the full dataset. This is an " |
| 154 | "optimization " |
| 155 | "for traffic updates."); |
no test coverage detected