Skip to content

Nico-Curti/parse_args

Repository files navigation

Authors Project
N. Curti parse args
Windows CI MacOS CI Linux CI
Windows ParseArgs CI MacOS ParseArgs CI Linux ParseArgs CI

GitHub pull-requests GitHub issues

GitHub stars GitHub watchers

C supported compilers:

gcc version

clang version

msvc version

Parse Command Line

Simple command line parser in C++

This project implements a simple command line parser for C++ softwares inspired to the argparse Python package.

Installation

First of all download the project or the latest release:

git clone https://github.com/Nico-Curti/parse_args
cd parse_args
git submodule update --init --recursive

The you can manually build the library using the CMake script or you can use the build scripts of the project. Example:

./build.sh

Note: The build.sh script works on Linux and macOS while the build.ps1 is reserved for the Windows users.

Import the library into other CMake project

The CMake script installation automatically creates the files required for the import of the library into other CMakeLists.

Into your CMake file you can just use the commands

find_package(ParseArgs REQUIRED)
include_directories (${ParseArgs_INCLUDE_DIR})
list (APPEND linked_libs ParseArgs::parseargs)

If your system doesn't automatically find the correct include path you can provided it in the CMake command line using the -DParseArgs_DIR:FILEPATH="/path/to/parseargs/share/parseargs/" variable.

Import the library using pkg-config

The CMake script installation automatically creates the pkg file required for the import of the library.

First of all install the pkg-config if it is not yet installed:

sudo apt install pkg-config

Then you can move the parseargs.pc file using

sudo mkdir -p /usr/local/lib/pkgconfig
sudo mv parseargs.pc /usr/local/lib/pkgconfig/

Contribution

Any contribution is more than welcome ❤️. Just fill an issue or a pull request and we will check ASAP!

See here for further informations about how to contribute with this project.

Authors

See also the list of contributors GitHub contributors who participated in this project.

License

The parse_args package is licensed under the MIT "Expat" License. License

Acknowledgments

Thanks goes to all contributors of this project.

Citation

If you have found parse_args helpful in your research, please consider citing this project repository

@misc{ParseArgs,
  author = {Curti, Nico},
  title = {ParseArgs - Simple command line parser in C++},
  year = {2021},
  publisher = {GitHub},
  howpublished = {\url{https://github.com/Nico-Curti/parse_args}},
}

About

Simple command line parser in C++

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published