Commit Graph

9 Commits

Author SHA1 Message Date
Pranav Srinivas Kumar
716ec60291 Added flag() shorthand function 2023-10-27 16:37:20 -05:00
Pranav Srinivas Kumar
22d57ac9ba Added C++17 requirement to samples CMakeLists 2023-10-27 11:33:09 -05:00
cobyj33
1a7a1dfd43 Change parse_args examples to catch const std::exception instead of std::runtime_error
parse_args can throw exceptions that are not based on std::runtime_error, and the
error message should show on all errors.
2023-10-25 20:33:24 -05:00
Sean Robinson
9377e0d3b2 Use return in place of exit() in README and samples
Only those places in the README where an error is explicitly found in the
main function have been updated.  Other uses of exit are left untouched as
there is not enough context to know if return will work in that location.

Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2023-03-29 08:42:12 -07:00
Sean Robinson
7af2342d94 Remove link library from add_sample function
Resolves the following build error:

  CMake Error at CMakeLists.txt:26 (ADD_EXECUTABLE):
    Target "ARGPARSE_SAMPLE_custom_assignment_characters" links to target
    "argparse::argparse" but the target was not found.  Perhaps a
    find_package() call is missing for an IMPORTED target, or an
    ALIAS target is missing?

Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2022-10-06 13:57:25 -07:00
Sean Robinson
74b95bc11a Add an explicit MIT license to each sample source file
Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2022-09-23 08:10:06 -07:00
Pranav Srinivas Kumar
b1c7483cf5 Added additional samples and fixed parse_known_args API 2022-09-21 19:08:06 -07:00
Pranav Srinivas Kumar
6f1e89885e Added nargs to help output, added test samples 2022-09-21 18:48:11 -07:00
Pranav Srinivas Kumar
05232b7487 Started adding samples 2022-09-21 18:09:25 -07:00