1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
# Parsing command line arguments with Sharg {#tutorial_argument_parser}
<!-- SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
SPDX-License-Identifier: CC-BY-4.0
-->
We have separated the feature of parsing command line arguments to its own project:
### The Sharg Parser
* GitHub Repository: https://github.com/seqan/sharg-parser
* API Documentation: https://docs.seqan.de/sharg.html
* Tutorials: https://docs.seqan.de/sharg/main_user/usergroup1.html
---
## Sharg & SeqAn
You can easily set up Sharg parallel to SeqAn as we use the same infrastructure.
If you have completed the \ref setup, do the following to also include the Sharg parser:
1. In the `tutorial` directory, clone the Sharg parser
```
git clone https://github.com/seqan/sharg-parser.git
```
Your directory structure now looks like this:
```
tutorial
├── build
├── seqan3
└── sharg-parser
└── source
```
2. Adapt your CMake script:
<!-- Parsing the snippet like this to avoid verbatim includes of the snippet identifiers if we used nested snippets. -->
<!-- Snippet start -->
\dontinclude test/external_project/seqan3_setup_tutorial_with_sharg/CMakeLists.txt
\skipline cmake_minimum_required
\until target_link_libraries
<!-- Snippet end -->
Done!
**Now you can do the [basic tutorial of the Sharg parser](https://docs.seqan.de/sharg/main_user/tutorial_parser.html)
to learn how to access command line arguments conveniently.**
|