update readme
This commit is contained in:
parent
4f8ded2a39
commit
f89ed648a5
15
README
15
README
@ -1,3 +1,5 @@
|
|||||||
|
== Quick start ==
|
||||||
|
|
||||||
This is a lightweight C++ option parser library, supporting the standard GNU
|
This is a lightweight C++ option parser library, supporting the standard GNU
|
||||||
style syntax for options.
|
style syntax for options.
|
||||||
|
|
||||||
@ -27,7 +29,8 @@ Then use add_options.
|
|||||||
("f,file", "File name", cxxopts::value<std::string>())
|
("f,file", "File name", cxxopts::value<std::string>())
|
||||||
|
|
||||||
Options can be declared with a short and/or long option. A description must be
|
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:
|
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
|
to get its value. If "opt" doesn't exist, or isn't of the right type, then an
|
||||||
exception will be thrown.
|
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 ==
|
== TODO list ==
|
||||||
|
|
||||||
* Allow unrecognised options.
|
* Allow unrecognised options.
|
||||||
* Print help: format description properly
|
* Print help: format description properly
|
||||||
* Option groups.
|
* Option groups.
|
||||||
|
* INSTALL library.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user