Jarryd Beck
3c3d2003ca
add help for positional parameters
2017-04-26 18:16:00 +10:00
Mario Badr
e005d07656
Use cmake interface library
...
Fixes #33 .
This PR uses cmake's interface library feature:
An INTERFACE library target does not directly create build output,
though it may have properties set on it and it may be installed,
exported and imported.
This makes it easier to include the header only library in a cmake
project. After using add_subdirectory on the cxxopts directory, one
simply needs to include cxxopts in their target_link_libraries, which
will allow the user's target to inherit the properties of the cxxopts
header library (see changes to example and test).
2016-12-03 07:50:14 +11:00
Jarryd Beck
a04284fc2c
fix Unicode build
2016-11-30 18:05:34 +11:00
Jarryd Beck
d92988c6a2
Allow for numbers in options
...
Closes #32 . This adds numbers as allowed values in all parts
of short and long option specifiers.
2016-11-16 18:03:35 +11:00
Jarryd Beck
c45bcc3858
Hide positional parameters that are a container.
...
Closes #26 . Don't show positional parameters that are a container,
because they are designed for chewing up any extra parameters.
2016-08-29 18:37:15 +10:00
Jarryd Beck
9e3f3115d2
Don't overwrite positional arguments.
...
Fixes #30 . The positional arguments are not overwritten when they
have already been given on the command line.
2016-08-29 18:11:18 +10:00
Jarryd Beck
bef3e67cb8
Fix uninitialised m_next_positional
...
This fixes the runtime error in Travis Job 17.2.
The variable Options::m_next_positional was not initialised when no
positional parameters were set.
2016-08-26 20:13:49 +10:00
Jarryd Beck
c6554ddc49
ignore built files
2016-08-26 08:26:42 +10:00
Jarryd Beck
55bfe49aa0
options test
2016-08-26 08:22:04 +10:00
Jarryd Beck
abab8ce325
I27 vector<string> doesn't parse
...
Reorder the `parse_value` functions so that the vector-specific
function can see all of the other specific parsers.
2016-07-05 08:29:20 +10:00
Jarryd Beck
21489b233d
fix long line
2016-07-04 19:17:54 +10:00
Pavel Medvedev
2e157e9881
Skip empty lines in option groups help
...
Also use single character \n for end of line instead of string literal.
2016-07-01 00:57:59 +03:00
Kevin Brightwell
774d455dc7
Update CMakeLists to be more configurable
...
* Add cxxopts.hpp as a source file to executable
* Add msvc options for compiling
* Add CXXOPTS_BUILD_EXAMPLES option to CMake build
* This is helpful when using CMake's ExternalProject_add()
* It is ON by default, but configurable from the command-line.
2016-06-15 20:32:32 -04:00
Jarryd Beck
7081d81890
add cstring for some compilers
2016-06-03 11:35:48 +10:00
Taylor Braun-Jones
7eb1bfbec1
Don't count default values
2016-05-23 15:49:52 -04:00
Nicholas Parker
ff3798f25c
Remove log output
...
Looked like it was left over from something? Saw it when testing "--some-int-val string"
2016-04-30 09:24:04 -07:00
Jarryd Beck
81f1f440ed
count arguments
2016-01-22 17:44:00 +11:00
Jarryd Beck
3ce8cbd1ae
add support for --
2016-01-22 17:43:20 +11:00
Jarryd Beck
b2e7efe7f4
positional arguments parse into multiple options
2015-09-25 16:49:06 +10:00
Kostya Bazhanov
9205d9093b
Disable -Wnon-virtual-dtor warning for GCC and Clang.
2015-04-23 22:05:19 +03:00
Kostya Bazhanov
9c59bb25ff
Fix Clang -Wsign-conversion and -Wshorten-64-to-32 warnings.
2015-04-18 21:50:12 +03:00
Kostya Bazhanov
2e9aab5cd0
Remove trailing spaces.
2015-04-18 21:43:37 +03:00
Baptiste Wicht
7611711651
Better support for spaces
...
This fixes support for options such as --file="folder with spaces/file".
2015-02-13 10:55:26 +01:00
Nagy Zsolt
44de7726f8
Fix remaining character check
2015-01-23 18:25:17 +01:00
Jarryd Beck
2144fbcc58
comment about Unicode
2014-11-08 15:30:32 +11:00
Jarryd Beck
f62ebb9688
formatting, inline
2014-10-31 08:30:50 +11:00
Baptiste Wicht
5492f17969
Add some getter
...
* Get list of groups
* Get help details for groups
2014-10-30 18:14:08 +01:00
Jarryd Beck
f4c429390f
Merge remote-tracking branch 'remotes/origin/master'
...
Conflicts:
src/cxxopts.hpp
2014-10-30 08:56:29 +11:00
Baptiste Wicht
164095cc0c
Macro to disable RTTI
2014-10-29 17:52:30 +01:00
Baptiste Wicht
4e4e91c37d
Fix warnings
2014-10-29 17:35:42 +01:00
Baptiste Wicht
0639e086ea
Finalize help
2014-10-29 17:04:53 +01:00
Baptiste Wicht
e09bb9052a
Enhance example
2014-10-29 16:59:57 +01:00
Baptiste Wicht
9a2749f692
Merge branch 'master' into default_values
...
Conflicts:
src/cxxopts.hpp
src/example.cpp
2014-10-29 16:42:59 +01:00
Jarryd Beck
1a558d76bd
custom argument help
2014-10-29 12:35:05 +11:00
Baptiste Wicht
9642317b08
Fix implicit and short
2014-10-28 21:36:33 +01:00
Baptiste Wicht
32be452302
Fix compilation
2014-10-28 21:27:29 +01:00
Baptiste Wicht
cc65ebb4fc
Fix warning
2014-10-27 19:25:44 +01:00
Baptiste Wicht
65093e0432
Cleanup
2014-10-27 19:19:54 +01:00
Baptiste Wicht
387e51dc16
Merge branch 'master' into default_values
...
Conflicts:
src/cxxopts.hpp
2014-10-27 19:09:41 +01:00
Jarryd Beck
8d7c4ea43e
unicode configuration
2014-10-27 22:06:24 +11:00
Jarryd Beck
8234766bca
better help example
2014-10-27 16:47:21 +11:00
Jarryd Beck
3707c91a01
unicode help
2014-10-27 16:46:16 +11:00
Jarryd Beck
9509ca94f2
unicode
2014-10-27 16:45:13 +11:00
Jarryd Beck
9d1a4dfcdc
more icu::UnicodeString
2014-10-27 15:20:12 +11:00
Jarryd Beck
f514d7d71e
start converting to String for Unicode
2014-10-27 13:30:22 +11:00
jarro2783
0cd24a7e6b
Merge pull request #7 from wichtounet/space_between_groups
...
Add an eol between each option groups
2014-10-27 10:59:41 +11:00
Baptiste Wicht
456ea951ab
Add support for implicit values
2014-10-26 22:05:24 +01:00
Baptiste Wicht
b343ad9855
Make the model more powerful
2014-10-26 21:31:16 +01:00
Baptiste Wicht
7e8f2e0b26
Complete the help
2014-10-26 21:18:54 +01:00
Baptiste Wicht
22ab9836d4
Add basic support for default options
2014-10-26 21:01:18 +01:00