Skip to content

C ARGument Obtainer. Alternative command line parser to getopt.

License

Notifications You must be signed in to change notification settings

JoakimSoderberg/cargo

Repository files navigation

Travis CI build status (Linux) Appveyor Build status (Windows) drone.io Build Status (verbose) Circle CI Semaphore Build Status Shippable Build Status Solano build status Coveralls Status Codecov Status Coverity Statical Analysis Status Codeship Status for JoakimSoderberg/cargo Documentation Status

cargo

C ARGument Obtainer. Alternative command line parser to getopt.

Designed to be small and easy to drop into any program without much configuration.

cargo is license under the MIT License

Documentation

Documentation is available at http://cargo.readthedocs.org/en/latest

It was generated using mkdocs and can be found under the docs/ directory.

If you'd rather learn by example see examples/

Compiling

The recommended way to compile and run the tests is to use the CMake project on all platforms. This will also build libraries and the examples.

Both for Windows and Linux ###########################

$ mkdir build && cd build
$ cmake ..        # Add -DCARGO_DEBUG=<level> for debugging output.
$ cmake --build . # You can use 'make' also, but not with Visual Studio.
$ ctest           # Run the tests.

Compiling manually

If you'd rather compile manually without using CMake, either simply add it to your own build system, or follow the steps below.

Simply drop into your project and compile, no configuration needed.

To compile the tests simply define CARGO_TEST. For example using gcc:

$ gcc -DCARGO_TEST=1 cargo.c

Or on Windows using the visual studio command line:

> cl.exe /DCARGO_TEST cargo.c

About

C ARGument Obtainer. Alternative command line parser to getopt.

Resources

License

Stars

Watchers

Forks

Packages

No packages published