5 #ifndef LODESTAR_BASICCLI_HPP
6 #define LODESTAR_BASICCLI_HPP
8 #include <CLI11/CLI11.hpp>
9 #include <Lodestar/blocks/aux/Executor.hpp>
10 #include <LodestarConfig.hpp>
27 app.description(
"A Lodestar application.");
28 app.add_flag(
"-v,--version", opts.version,
"Lodestar version");
29 app.add_flag(
"-g,--graph", opts.graph,
"Display graph");
30 app.add_flag(
"-d,--dot-file", opts.dotFile,
"Output graph as dot file");
36 runApp(
int argc,
char **argv, CLI::App &app, BasicCLIOptions &opts)
38 CLI11_PARSE(app, argc, argv);
42 ::std::stringstream ss;
43 opts.ex->makeDotFile(ss);
44 ::std::cout << ss.str() << ::std::endl;
46 ::std::cout << opts.ex->getAsciiGraph(
true,
true) << ::std::endl;
48 }
else if (opts.version) {
49 ::std::cout <<
"Lodestar v" << LS_VERSION_MAJOR <<
"." << LS_VERSION_MAJOR <<
"."
50 << LS_VERSION_PATCH << ::std::endl;
60 #endif //LODESTAR_BASICCLI_HPP