SNode.C
Loading...
Searching...
No Matches
configtest.cpp
Go to the documentation of this file.
1#include "log/Logger.h"
2
3#ifndef DOXYGEN_SHOULD_SKIP_THIS
4
5#ifdef __GNUC__
6#pragma GCC diagnostic push
7#pragma GCC diagnostic ignored "-Wfloat-equal"
8#ifdef __has_warning
9#if __has_warning("-Wweak-vtables")
10#pragma GCC diagnostic ignored "-Wweak-vtables"
11#endif
12#if __has_warning("-Wcovered-switch-default")
13#pragma GCC diagnostic ignored "-Wcovered-switch-default"
14#endif
15#endif
16#endif
17#include "utils/CLI11.hpp"
18#ifdef __GNUC__
19#pragma GCC diagnostic pop
20#endif
21
22#endif // DOXYGEN_SHOULD_SKIP_THIS
23
24#include <string>
25
26int main(int argc, char* argv[]) {
27 CLI::App app("ConfigTest");
28
29 CLI::Option* allHelpOpt = app.set_help_all_flag("--help-all", "Expand all help");
30 allHelpOpt->configurable(false);
31
32 CLI::App* subApp = app.add_subcommand("test", "Test SubCommand");
33
34 std::string filename;
35 CLI::Option* filenameOpt = subApp->add_option("-f", filename, "A Filename");
36 // filenameOpt->default_val("Filenameeeeee");
37
38 VLOG(1) << "Filename: " << filename;
39
40 // app.needs(subApp);
41 // subApp->needs(filenameOpt);
42 subApp->required();
43 filenameOpt->required();
44
45 CLI11_PARSE(app, argc, argv)
46
47 return 0;
48}
int main(int argc, char *argv[])