45 lines
1.5 KiB
C++
45 lines
1.5 KiB
C++
#include "server/sparkd/md/cme/CMEActivSession.h"
|
|
#include "lib/testing/catch_test_runner.h"
|
|
#include "lib/utils/init_spark_lib.h"
|
|
#include "server/sparkd/cmds/AdminReport.h"
|
|
#include "server/sparkd/cmds/ConfigCmd.h"
|
|
#include "server/sparkd/cmds/KeyCmd.h"
|
|
#include "server/sparkd/cmds/Md.h"
|
|
#include "server/sparkd/cmds/QuickTest.h"
|
|
#include "server/sparkd/cmds/Run.h"
|
|
#include "server/sparkd/cmds/Web.h"
|
|
#include "server/sparkd/cmds/crypto/CryptoCmd.h"
|
|
#include <CLI11/CLI11.hpp>
|
|
|
|
#include <iostream>
|
|
#include <string>
|
|
|
|
using namespace bts;
|
|
|
|
int main(int argc, char **argv) {
|
|
utils::SparkLibInit init;
|
|
|
|
// The catch testing framework has its own command line parser so
|
|
// if we are testing we just forward the entire command to catch
|
|
if (argc > 1 && std::string(argv[1]) == "test")
|
|
return run_tests(argc, argv);
|
|
else {
|
|
CLI::App app("Futures trading system", "sparkd");
|
|
app.require_subcommand();
|
|
app.add_subcommand(CLI::App_p(new cmds::AdminReport()));
|
|
app.add_subcommand(CLI::App_p(new cmds::CryptoCmd()));
|
|
app.add_subcommand(CLI::App_p(new cmds::ConfigCmd()));
|
|
app.add_subcommand(CLI::App_p(new cmds::Md()));
|
|
app.add_subcommand(CLI::App_p(new cmds::QuickTest()));
|
|
app.add_subcommand(CLI::App_p(new cmds::Run()));
|
|
app.add_subcommand(CLI::App_p(new cmds::KeyCmd()));
|
|
app.add_subcommand(CLI::App_p(new cmds::Web()));
|
|
|
|
|
|
|
|
app.add_subcommand(
|
|
"test", "Run unit test(s)"); // so this shows up in help
|
|
CLI11_PARSE(app, argc, argv);
|
|
}
|
|
}
|