3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 12:28:44 +00:00

allow --help, --version, etc as valid parameter names

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-12-04 15:48:28 -08:00
parent 89385b4e9a
commit f6a3ec58e5

View file

@ -93,6 +93,11 @@ void display_usage() {
#ifdef Z3DEBUG
std::cout << " -dbg:tag enable assertions tagged with <tag>.\n";
#endif
std::cout << "\nParameter setting:\n";
std::cout << "Global and module parameters can be set in the command line.\n";
std::cout << " param_name=value for setting global parameters.\n";
std::cout << " module_name.param_name=value for setting module parameters.\n";
std::cout << "Use 'z3 -p' for the complete list of global and module parameters.\n";
}
void parse_cmd_line_args(int argc, char ** argv) {
@ -126,6 +131,9 @@ void parse_cmd_line_args(int argc, char ** argv) {
#endif
) {
char * opt_name = arg + 1;
// allow names such as --help
if (*opt_name == '-')
opt_name++;
char * opt_arg = 0;
char * colon = strchr(arg, ':');
if (colon) {