diff options
| -rw-r--r-- | src/caskbench.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/caskbench.cpp b/src/caskbench.cpp index cf88e06..6fe9823 100644 --- a/src/caskbench.cpp +++ b/src/caskbench.cpp @@ -65,6 +65,7 @@ typedef struct _caskbench_options { int max_swap_interval; int match_native_pixmap; int deferred_canvas; + int short_help; const char **tests; } caskbench_options_t; @@ -293,6 +294,9 @@ process_options(caskbench_options_t *opt, int argc, char *argv[]) {"drawing-lib", 'D', POPT_ARG_STRING, &opt->drawing_lib, 0, "Drawing libraries to be used for drawing (e.g. 'cairo', 'cairo,skia')", NULL}, + {"short-help", 'h', POPT_ARG_NONE, &opt->short_help, 0, + "Display brief usage message", + NULL}, POPT_AUTOHELP {NULL} }; @@ -324,6 +328,11 @@ process_options(caskbench_options_t *opt, int argc, char *argv[]) } } + if (opt->short_help) { + poptPrintHelp(pc, stdout, 0); + exit(0); + } + // Remaining args are the tests to be run, or all if this list is empty opt->tests = poptGetArgs(pc); |