Joel Grunbaum
2022-01-11 83c048d1295b9df59d90a7513953c99a267eb1f5
CYA Cmake, compiling on remote box
2 files modified
1 files deleted
2 files added
57 ■■■■ changed files
.gitignore 3 ●●●● patch | view | raw | blame | history
CMakeLists.txt 26 ●●●●● patch | view | raw | blame | history
Makefile 26 ●●●●● patch | view | raw | blame | history
click patch | view | raw | blame | history
protocol.cpp 2 ●●● patch | view | raw | blame | history
.gitignore
@@ -7,4 +7,5 @@
bid
ask
oneshot
build
build
test
CMakeLists.txt
File was deleted
Makefile
New file
@@ -0,0 +1,26 @@
CXX=g++
CXXFLAGS=-g -Wall -static
#LDFLAGS=-rpath=/lib64/libstdc++.so.6
json=json.o
ws=easywsclient/easywsclient.o
main=${json} ${ws} protocol.o book.o
default: test click bot
test: test.o strat.o ${main}
    ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^
click: click.o ${main}
    ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^
bot: bot.o strat.o ${main}
    ${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^
%.o: %.cpp
    ${CXX} ${CXXFLAGS} -c -o $@ $^
.PHONY: clean
clean:
    rm -f ${main} test click bot
click
Binary files differ
protocol.cpp
@@ -170,7 +170,7 @@
void tradeOrder(std::unordered_map<std::string, book::Book>& bs,
                json::TradeMessage* message)
{
    if (bs.contains(message->passiveOrder)) {
    if (bs.find(message->passiveOrder) != bs.end()) {
        if (message->tradeType == json::BUY_AGGRESSOR) {
            if (message->passiveOrderRemaining > 0) {
                bs[message->product].askSide.at(message->passiveOrder).volume =