From f89ed648a51d0db56725b5405a10ba599684a0cb Mon Sep 17 00:00:00 2001 From: Jarryd Beck Date: Mon, 13 Oct 2014 09:20:10 +1100 Subject: [PATCH] update readme --- README | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README b/README index 17ef513..c1f9101 100644 --- a/README +++ b/README @@ -1,3 +1,5 @@ +== Quick start == + This is a lightweight C++ option parser library, supporting the standard GNU style syntax for options. @@ -27,7 +29,8 @@ Then use add_options. ("f,file", "File name", cxxopts::value()) Options can be declared with a short and/or long option. A description must be -provided. The third argument is the value, if omitted it is boolean. +provided. The third argument is the value, if omitted it is boolean. Any type +can be given as long as it can be parsed, with operator>>. To parse the command line do: @@ -41,9 +44,19 @@ it appeared, and to get its value. If "opt" doesn't exist, or isn't of the right type, then an exception will be thrown. +== Linking == + +Compile with -lcxxopts. + +== Requirements == + +The only build requirement is a C++ compiler that supports C++11 regular +expressions. For example GCC >= 4.9 or clang with libc++. + == TODO list == * Allow unrecognised options. * Print help: format description properly * Option groups. +* INSTALL library.