Authors | Project |
---|---|
N. Curti | parse args |
Windows CI | MacOS CI | Linux CI |
---|---|---|
C supported compilers:
This project implements a simple command line parser for C++ softwares inspired to the argparse Python package.
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.
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.
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/
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.
See also the list of contributors who participated in this project.
The parse_args
package is licensed under the MIT "Expat" License.
Thanks goes to all contributors of this project.
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}},
}