This new structure provides several benefits:
* Allows us to install multiple CMake projects in the same destination
dir (without include path conflicts).
- This makes shipping the trading algo sdk a trivial excercise. Simply
copy the lib and include dirs from the install dest. That's it!
* Puts us in a position to break up the monolithic libspark into smaller
modules, which are easier to manage.
Windows specific notes:
* Get rid of unnecessary script vs_filters.cmake
* Define WebsocketConnectionGateway directly in cs (instead of proto)
- The proto would no longer be in the include path passed to protoc.
Moving it to c# because there wasn't a compelling reason for it to
be a proto in the first place.
* Set spark output prefix to "lib" on windows
- So we get "libspark.dll" instead of "spark.dll", which conflicts
with the csharp lib, "Spark.dll".
* Copy libspark.dll to net8.0 & net8.0-windows in a single cmake build
target
fix build: Copy libspark to both dirs net8.0, net8.0-windows
39 lines
1010 B
C++
39 lines
1010 B
C++
#include "ConfigCmd.h"
|
|
#include "spark/config/ConfigQuerier.h"
|
|
#include "spark/config/config.h"
|
|
|
|
namespace bts::cmds {
|
|
|
|
using bts::config::ConfigQuerier;
|
|
using std::string;
|
|
using std::vector;
|
|
|
|
struct ConfigCmd::Args {
|
|
bool all;
|
|
bool list_keys;
|
|
bool verbose;
|
|
vector<string> keys;
|
|
vector<string> excluded_keys;
|
|
};
|
|
|
|
ConfigCmd::ConfigCmd()
|
|
: CLI::App("Query Spark configuration", "config"),
|
|
args_(std::make_unique<Args>()) {
|
|
add_option(
|
|
"--query", args_->keys, "Keys to query (supports regular expressions)");
|
|
add_option(
|
|
"--exclude", args_->excluded_keys,
|
|
"Keys to exclude from query (supports regular expressions)");
|
|
add_flag("--list-keys", args_->list_keys, "List available keys");
|
|
add_flag("--verbose", args_->verbose, "Show verbose output");
|
|
callback([&] {
|
|
ConfigQuerier::run(
|
|
args_->keys, args_->excluded_keys, args_->all, args_->list_keys,
|
|
args_->verbose);
|
|
});
|
|
}
|
|
|
|
ConfigCmd::~ConfigCmd() {}
|
|
|
|
} // namespace bts::cmds
|