mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-04-29 12:13:52 +00:00
* Adding check for style * Adding reformats * Fix syntax error in travis * Support clang-format 3.9 * Adding clang-tidy check
19 lines
408 B
C++
19 lines
408 B
C++
#include <CLI/CLI.hpp>
|
|
|
|
enum Level : std::int32_t { High, Medium, Low };
|
|
|
|
int main(int argc, char **argv) {
|
|
CLI::App app;
|
|
|
|
Level level;
|
|
app.add_set("-l,--level", level, {High, Medium, Low}, "Level settings")
|
|
->set_type_name("enum/Level in {High=0, Medium=1, Low=2}");
|
|
|
|
try {
|
|
app.parse(argc, argv);
|
|
} catch(CLI::Error const &e) {
|
|
app.exit(e);
|
|
}
|
|
return 0;
|
|
}
|