Compare commits
22
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d6c25e9ad9 | ||
|
|
62684fde2d | ||
|
|
09fc44c7fc | ||
|
|
1f1ec7d77d | ||
|
|
b3fc4250c3 | ||
|
|
8784727e09 | ||
|
|
576fd34429 | ||
|
|
4d7119e265 | ||
|
|
68509161b0 | ||
|
|
f8d356e32e | ||
|
|
16dd06d5e1 | ||
|
|
fc15424a67 | ||
|
|
e30842beda | ||
|
|
4e9d3e7152 | ||
|
|
92152a3d06 | ||
|
|
69e8953f0f | ||
|
|
6040f37a7e | ||
|
|
912bda2aeb | ||
|
|
ccff870b23 | ||
|
|
1fb7f13308 | ||
|
|
711b401f64 | ||
|
|
af00510aea |
No files matched your search
@@ -51,3 +51,4 @@ trace_data/
|
||||
/.venv*/*
|
||||
.cache/
|
||||
src/web/api/tsconfig.*.g.json
|
||||
/.cpm_cache/**
|
||||
+94
-47
@@ -20,66 +20,113 @@ set(SPARK_LIB "${EXTERNALS_ROOT}/lib/${CMAKE_BUILD_TYPE}")
|
||||
set(BUILD_SDK OFF CACHE BOOL "Build the sdk")
|
||||
set(BUILD_WEB ON CACHE BOOL "Build the web server")
|
||||
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/CPM.cmake)
|
||||
|
||||
# CPM packages
|
||||
CPMAddPackage("gh:nlohmann/json@3.11.2")
|
||||
CPMAddPackage("gh:fmtlib/fmt#8.1.1")
|
||||
CPMAddPackage("gh:ericniebler/range-v3#0.12.0")
|
||||
CPMAddPackage("gh:ReactiveX/RxCpp@4.1.1")
|
||||
CPMAddPackage("gh:google/double-conversion@3.2.1")
|
||||
CPMAddPackage("gh:cameron314/concurrentqueue@1.0.3")
|
||||
CPMAddPackage("gh:cameron314/readerwriterqueue@1.0.6")
|
||||
CPMAddPackage("gh:HowardHinnant/date@3.0.1")
|
||||
CPMAddPackage("gh:zeux/pugixml@1.12.1")
|
||||
CPMAddPackage("gh:CLIUtils/CLI11@2.3.0")
|
||||
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules)
|
||||
find_package(quickfix REQUIRED)
|
||||
|
||||
# Catch2
|
||||
CPMAddPackage(
|
||||
NAME Catch2
|
||||
GITHUB_REPOSITORY catchorg/Catch2
|
||||
VERSION 2.13.9
|
||||
DOWNLOAD_ONLY True)
|
||||
add_library(Catch2 INTERFACE)
|
||||
target_include_directories(Catch2 SYSTEM INTERFACE ${Catch2_SOURCE_DIR}/single_include)
|
||||
|
||||
# curl
|
||||
CPMAddPackage(
|
||||
GITHUB_REPOSITORY curl/curl
|
||||
GIT_TAG curl-7_85_0
|
||||
OPTIONS
|
||||
"BUILD_SHARED_LIBS OFF"
|
||||
"POSITION_INDEPENDENT_CODE ON"
|
||||
"CURL_DISABLE_GOPHER ON"
|
||||
"CURL_DISABLE_IMAP ON"
|
||||
"CURL_DISABLE_IMAPS ON"
|
||||
"CURL_DISABLE_LDAP ON"
|
||||
"CURL_DISABLE_LDAPS ON"
|
||||
"CURL_DISABLE_POP3 ON"
|
||||
"CURL_DISABLE_RTSP ON"
|
||||
"CURL_DISABLE_SMB ON"
|
||||
"CURL_DISABLE_SMTP ON"
|
||||
"CURL_DISABLE_TELNET ON"
|
||||
"CURL_DISABLE_TFTP ON"
|
||||
"USE_LIBIDN2 OFF"
|
||||
"USE_RTMP OFF"
|
||||
"USE_ZLIB OFF")
|
||||
set_target_properties(
|
||||
libcurl
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS "-fPIC")
|
||||
|
||||
# websocketpp
|
||||
CPMAddPackage("gh:zaphoyd/websocketpp#0.8.2")
|
||||
add_library(websocketpp INTERFACE)
|
||||
target_include_directories(websocketpp SYSTEM INTERFACE ${websocketpp_SOURCE_DIR})
|
||||
set_target_properties(
|
||||
websocketpp
|
||||
PROPERTIES
|
||||
CMAKE_CXX_FLAGS "-Wno-null-pointer-subtraction"
|
||||
LINKER_LANGUAGE CXX)
|
||||
|
||||
# abseil
|
||||
CPMAddPackage(
|
||||
NAME absl
|
||||
GITHUB_REPOSITORY abseil/abseil-cpp
|
||||
GIT_TAG 20220623.1
|
||||
DOWNLOAD_ONLY True)
|
||||
add_library(absl INTERFACE)
|
||||
|
||||
# ccapi
|
||||
CPMAddPackage("gh:crypto-chassis/ccapi@5.31.3")
|
||||
add_library(ccapi INTERFACE)
|
||||
|
||||
# Use SYSTEM includes to suppress compilation warnings
|
||||
target_include_directories(ccapi SYSTEM INTERFACE ${ccapi_SOURCE_DIR}/include)
|
||||
|
||||
string(TOUPPER ${CMAKE_BUILD_TYPE} _build_type_u)
|
||||
|
||||
# benchmark
|
||||
CPMAddPackage(
|
||||
NAME benchmark
|
||||
GITHUB_REPOSITORY google/benchmark
|
||||
VERSION 1.5.0
|
||||
OPTIONS
|
||||
"BENCHMARK_ENABLE_TESTING OFF"
|
||||
"CMAKE_CXX_FLAGS_${_build_type_u} -Wno-unused-but-set-variable -Wno-deprecated-declarations"
|
||||
"BENCHMARK_DOWNLOAD_DEPENDENCIES ON"
|
||||
"CMAKE_CXX_STANDARD 17")
|
||||
|
||||
include_directories(BEFORE SYSTEM ${SPARK_INCLUDE} ${EXTERNALS_ROOT}/include/zlib)
|
||||
link_directories(${SPARK_LIB})
|
||||
|
||||
if(WIN32)
|
||||
# flags
|
||||
set(
|
||||
CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} \
|
||||
/MP \
|
||||
/WX /wd4251 /wd4250 /wd4251 /wd4244 /wd4267 /wd4355 /wd4275 /wd4345 \
|
||||
/bigobj \
|
||||
/DCURL_STATICLIB \
|
||||
/D_WINSOCK_DEPRECATED_NO_WARNINGS \
|
||||
/D__TBB_NO_IMPLICIT_LINKAGE \
|
||||
/DBOOST_ALL_NO_LIB \
|
||||
/std:c++17 \
|
||||
/D_SCL_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_WARNINGS /D_WIN32_WINNT=0x0600")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} /MT")
|
||||
set(
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELEASE
|
||||
"${CMAKE_SHARED_LINKER_FLAGS_RELEASE} \
|
||||
/DEBUG \
|
||||
/OPT:REF \
|
||||
/OPT:ICF \
|
||||
/LTCG")
|
||||
|
||||
# subdirs
|
||||
add_subdirectory(src/lib)
|
||||
else()
|
||||
# make sparkd look for libspark.so in its directory
|
||||
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
||||
set(CMAKE_INSTALL_RPATH ".")
|
||||
set(CMAKE_INSTALL_PREFIX "${CMAKE_SOURCE_DIR}/install/${CMAKE_BUILD_TYPE}/sparkd")
|
||||
add_compile_definitions(SPARK_ENABLE_CCAPI)
|
||||
add_compile_definitions(CCAPI_ENABLE_SERVICE_MARKET_DATA)
|
||||
add_compile_definitions(CCAPI_ENABLE_EXCHANGE_FTX)
|
||||
add_compile_definitions(CCAPI_ENABLE_EXCHANGE_BINANCE)
|
||||
add_compile_definitions(CCAPI_ENABLE_LOG_WARN)
|
||||
|
||||
# flags
|
||||
set(
|
||||
CMAKE_CXX_FLAGS_DEBUG
|
||||
"${CMAKE_CXX_FLAGS_DEBUG} \
|
||||
-fPIC \
|
||||
-Wall \
|
||||
-pedantic \
|
||||
-Wextra \
|
||||
-Werror \
|
||||
-Wno-missing-braces \
|
||||
-Wno-ignored-qualifiers \
|
||||
--std=c++17 -fdiagnostics-color")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -DNDEBUG -O3")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wno-undef")
|
||||
|
||||
# subdirs
|
||||
add_subdirectory(src/server/sparkd)
|
||||
add_dependencies(sparkd quickfix_proj)
|
||||
add_subdirectory(src/lib)
|
||||
if (BUILD_WEB)
|
||||
if(BUILD_WEB)
|
||||
add_subdirectory(src/web)
|
||||
endif()
|
||||
add_subdirectory(doc/user)
|
||||
@@ -96,9 +143,9 @@ else()
|
||||
COMMAND ln ARGS -sf ${CMAKE_BINARY_DIR}/data_files ${CMAKE_BINARY_DIR}/server
|
||||
COMMAND ln ARGS -sf ${CMAKE_BINARY_DIR}/src/lib/libspark.so ${CMAKE_BINARY_DIR}/server
|
||||
COMMAND
|
||||
ln ARGS -sf
|
||||
${EXTERNALS_ROOT}/lib/Release/libOnixS.IceImpactMulticastPriceFeedHandlerCpp.so.3.16.0.0
|
||||
${CMAKE_BINARY_DIR}/server
|
||||
ln ARGS -sf
|
||||
${EXTERNALS_ROOT}/lib/Release/libOnixS.IceImpactMulticastPriceFeedHandlerCpp.so.3.16.0.0
|
||||
${CMAKE_BINARY_DIR}/server
|
||||
COMMAND ln ARGS -sf ${EXTERNALS_ROOT}/lib/Release/libACE-5.7.5.so ${CMAKE_BINARY_DIR}/server
|
||||
COMMAND mkdir ARGS -p ${CMAKE_BINARY_DIR}/server/plugins
|
||||
COMMENT "Creating server runtime layout"
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
{
|
||||
"version": 4,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 23,
|
||||
"patch": 0
|
||||
},
|
||||
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "spark",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"generator": "Visual Studio 17 2022",
|
||||
"binaryDir": "${sourceDir}/build",
|
||||
"cacheVariables": {
|
||||
"CMAKE_CXX_FLAGS": "/MP /WX /wd4250 /wd4251 /wd4244 /wd4267 /wd4355 /wd4275 /wd4345 /bigobj /EHsc /DCURL_STATICLIB /D_WINSOCK_DEPRECATED_NO_WARNINGS /D__TBB_NO_IMPLICIT_LINKAGE /DBOOST_ALL_NO_LIB /std:c++17 /D_SCL_SECURE_NO_WARNINGS /D_CRT_SECURE_NO_WARNINGS /D_WIN32_WINNT=0x0600",
|
||||
"CMAKE_CXX_FLAGS_DEBUG": "/MTd",
|
||||
"CMAKE_CXX_FLAGS_RELEASE": "/MT",
|
||||
"CMAKE_SHARED_LINKER_FLAGS_RELEASE": "/DEBUG /OPT:REF /OPT:ICF /LTCG",
|
||||
"EXTERNALS_ROOT": "${sourceDir}/externals/windows"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"hidden": true,
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build/${presetName}",
|
||||
"cacheVariables": {
|
||||
"platform": "",
|
||||
"CMAKE_BUILD_WITH_INSTALL_RPATH": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"CMAKE_INSTALL_RPATH": ".",
|
||||
"CMAKE_INSTALL_PREFIX": "${sourceDir}/install/${presetName}/sparkd",
|
||||
"CMAKE_EXE_LINKER_FLAGS": "-Wno-undef",
|
||||
"CPM_SOURCE_CACHE": "$env{HOME}/.cache/cpm",
|
||||
"EXTERNALS_ROOT": "${sourceDir}/externals/linux",
|
||||
"CMAKE_CXX_STANDARD": "17",
|
||||
"WEB_TSCONFIG_NAME": "${presetName}",
|
||||
"BUILD_SDK": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"BUILD_WEB": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-dev-clang",
|
||||
"inherits": "sparkd",
|
||||
"displayName": "Development (clang)",
|
||||
"description": "Debug build compiled w/ clang",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"CMAKE_C_COMPILER": "clang",
|
||||
"CMAKE_CXX_COMPILER": "clang++",
|
||||
"CMAKE_CXX_FLAGS_DEBUG": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++17 -fdiagnostics-color"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-dev-gcc",
|
||||
"inherits": "sparkd",
|
||||
"displayName": "Development (gcc)",
|
||||
"description": "Debug build compiled w/ gcc",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Debug",
|
||||
"CMAKE_EXPORT_COMPILE_COMMANDS": {
|
||||
"type": "BOOL",
|
||||
"value": "ON"
|
||||
},
|
||||
"CMAKE_C_COMPILER": "gcc",
|
||||
"CMAKE_CXX_COMPILER": "g++",
|
||||
"CMAKE_CXX_FLAGS_DEBUG": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++17 -fdiagnostics-color -Wno-stringop-overread -DDEBUG"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-prod-clang",
|
||||
"inherits": "sparkd",
|
||||
"displayName": "Production (clang)",
|
||||
"description": "Release build compiled w/ clang",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"CMAKE_C_COMPILER": "clang",
|
||||
"CMAKE_CXX_COMPILER": "clang++",
|
||||
"CMAKE_CXX_FLAGS_RELEASE": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++17 -fdiagnostics-color -fno-omit-frame-pointer -DNDEBUG -O3"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-prod-gcc",
|
||||
"inherits": "sparkd",
|
||||
"displayName": "Production (gcc)",
|
||||
"description": "Release build compiled w/ gcc",
|
||||
"cacheVariables": {
|
||||
"CMAKE_BUILD_TYPE": "Release",
|
||||
"CMAKE_C_COMPILER": "gcc",
|
||||
"CMAKE_CXX_COMPILER": "g++",
|
||||
"CMAKE_CXX_FLAGS_RELEASE": "-fPIC -Wall -pedantic -Wextra -Werror -Wno-missing-braces -Wno-ignored-qualifiers --std=c++17 -fdiagnostics-color -Wno-stringop-overread -Wno-maybe-uninitialized -fno-omit-frame-pointer -DNDEBUG -O3"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-publish",
|
||||
"inherits": "sparkd",
|
||||
"displayName": "Publish",
|
||||
"description": "Publish build compiled w/ gcc and ready to ship",
|
||||
"cacheVariables": {
|
||||
"CMAKE_CXX_COMPILER": "g++"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "spark",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
},
|
||||
"hidden": true,
|
||||
"jobs": 4
|
||||
},
|
||||
|
||||
{
|
||||
"name": "spark-dev",
|
||||
"displayName": "Development",
|
||||
"inherits": "spark",
|
||||
"configurePreset": "spark",
|
||||
"configuration": "Debug"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "spark-prod",
|
||||
"displayName": "Production",
|
||||
"inherits": "spark",
|
||||
"configurePreset": "spark",
|
||||
"configuration": "Release"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Linux"
|
||||
},
|
||||
"hidden": true,
|
||||
"jobs": 4,
|
||||
"targets": [
|
||||
"data_files_dir",
|
||||
"doc_manual_bundle",
|
||||
"install",
|
||||
"libspark",
|
||||
"rapidjson_project",
|
||||
"server_layout",
|
||||
"sparkd",
|
||||
"web_ui_bundle"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-dev-clang",
|
||||
"configurePreset": "sparkd-dev-clang",
|
||||
"displayName": "Development (clang)",
|
||||
"inherits": "sparkd"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-dev-gcc",
|
||||
"configurePreset": "sparkd-dev-gcc",
|
||||
"displayName": "Development (gcc)",
|
||||
"inherits": "sparkd"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-prod-clang",
|
||||
"configurePreset": "sparkd-prod-clang",
|
||||
"displayName": "Production (clang)",
|
||||
"inherits": "sparkd"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-prod-gcc",
|
||||
"configurePreset": "sparkd-prod-gcc",
|
||||
"displayName": "Production (gcc)",
|
||||
"inherits": "sparkd"
|
||||
},
|
||||
|
||||
{
|
||||
"name": "sparkd-publish",
|
||||
"configurePreset": "sparkd-publish",
|
||||
"displayName": "Publish",
|
||||
"inherits": "sparkd",
|
||||
"targets": "install"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
# CPM Code (https://github.com/cpm-cmake/CPM.cmake/releases/latest/download/get_cpm.cmake)
|
||||
set(CPM_DOWNLOAD_VERSION 0.36.0)
|
||||
|
||||
if(CPM_SOURCE_CACHE)
|
||||
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
||||
elseif(DEFINED ENV{CPM_SOURCE_CACHE})
|
||||
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
||||
else()
|
||||
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
|
||||
endif()
|
||||
|
||||
# Expand relative path. This is important if the provided path contains a tilde (~)
|
||||
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE)
|
||||
|
||||
if(NOT(EXISTS ${CPM_DOWNLOAD_LOCATION}))
|
||||
message(STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}")
|
||||
file(DOWNLOAD
|
||||
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake
|
||||
${CPM_DOWNLOAD_LOCATION}
|
||||
)
|
||||
endif()
|
||||
|
||||
include(${CPM_DOWNLOAD_LOCATION})
|
||||
@@ -0,0 +1,17 @@
|
||||
include(ExternalProject)
|
||||
|
||||
if(NOT TARGET quickfix_proj)
|
||||
set(_quickfix_prefix ${CMAKE_CURRENT_BINARY_DIR}/quickfix)
|
||||
set(quickfix_SOURCE_DIR ${_quickfix_prefix}/src/quickfix_proj)
|
||||
set(quickfix_INCLUDE_DIR ${quickfix_SOURCE_DIR}/include)
|
||||
set(quickfix_LIBRARY_DIR ${quickfix_SOURCE_DIR}/lib)
|
||||
|
||||
ExternalProject_Add(
|
||||
quickfix_proj
|
||||
GIT_REPOSITORY https://github.com/quickfix/quickfix.git
|
||||
GIT_TAG d73d1e86a2099d1dd6eaa3ed8b7d78ed73888877
|
||||
PREFIX ${_quickfix_prefix}
|
||||
CONFIGURE_COMMAND cd ${quickfix_SOURCE_DIR} && ./bootstrap && ./configure --enable-shared=no --enable-static=yes
|
||||
BUILD_COMMAND cd ${quickfix_SOURCE_DIR} && make -j 4
|
||||
INSTALL_COMMAND "")
|
||||
endif()
|
||||
+1
-1
Submodule docker/linux updated: 6537812262...56c61231f3.
+1
-1
Submodule externals updated: 4d96613ca8...0d17c8554e.
+46
-37
@@ -110,57 +110,66 @@ target_include_directories(
|
||||
if(WIN32)
|
||||
target_link_libraries(
|
||||
libspark
|
||||
libcurl
|
||||
crypt32
|
||||
debug
|
||||
fmtd
|
||||
optimized
|
||||
fmt
|
||||
libtbb
|
||||
libboost_system
|
||||
libboost_thread
|
||||
libboost_filesystem
|
||||
libboost_regex
|
||||
fmtd
|
||||
libboost_atomic
|
||||
libboost_chrono
|
||||
libboost_date_time
|
||||
libboost_atomic
|
||||
libboost_filesystem
|
||||
libboost_regex
|
||||
libboost_system
|
||||
libboost_thread
|
||||
libcrypto
|
||||
libcurl
|
||||
libprotobuf
|
||||
libprotoc
|
||||
libssl
|
||||
libcrypto
|
||||
crypt32)
|
||||
libtbb
|
||||
optimized)
|
||||
else()
|
||||
target_link_libraries(
|
||||
libspark
|
||||
protobuf
|
||||
double-conversion
|
||||
boost_system
|
||||
boost_thread
|
||||
boost_filesystem
|
||||
boost_regex
|
||||
boost_chrono
|
||||
boost_date_time
|
||||
boost_atomic
|
||||
SQLiteCpp
|
||||
sqlite3
|
||||
curl
|
||||
uuid
|
||||
ssl
|
||||
crypto
|
||||
fmt
|
||||
tbb
|
||||
cryptopp
|
||||
pugixml
|
||||
lttng-ust
|
||||
Pcap++
|
||||
Packet++
|
||||
Common++
|
||||
ssh2
|
||||
-lrt
|
||||
-ldl
|
||||
-lpcap
|
||||
-lrt
|
||||
-pthread
|
||||
-static-libgcc
|
||||
-static-libstdc++
|
||||
-pthread)
|
||||
Catch2
|
||||
Common++
|
||||
Packet++
|
||||
Pcap++
|
||||
SQLiteCpp
|
||||
boost_atomic
|
||||
boost_chrono
|
||||
boost_date_time
|
||||
boost_filesystem
|
||||
boost_regex
|
||||
boost_system
|
||||
boost_thread
|
||||
ccapi
|
||||
concurrentqueue
|
||||
crypto
|
||||
cryptopp
|
||||
date
|
||||
double-conversion
|
||||
fmt
|
||||
libcurl
|
||||
lttng-ust
|
||||
nlohmann_json
|
||||
protobuf
|
||||
pugixml-static
|
||||
range-v3
|
||||
readerwriterqueue
|
||||
rxcpp
|
||||
sqlite3
|
||||
ssh2
|
||||
ssl
|
||||
tbb
|
||||
uuid
|
||||
websocketpp)
|
||||
|
||||
install(TARGETS libspark DESTINATION bin)
|
||||
endif()
|
||||
|
||||
@@ -186,7 +186,7 @@ CAPI void api_client_send(
|
||||
void *extra) {
|
||||
LOG(Api, Diag, "send rpc {}", ((int64_t)buffer));
|
||||
std::string strbuf(buffer, buffer_length);
|
||||
qbus::RPCRequest request(move(strbuf));
|
||||
qbus::RPCRequest request(std::move(strbuf));
|
||||
api_client_send_internal(
|
||||
pclient, std::move(request), cb, rpc_connect_timeout_ms(), extra);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ CAPI void api_server_call_callback(
|
||||
reinterpret_cast<qbus::ReplyHandler **>(ppvhandler);
|
||||
std::string reply_buffer((const char *)buffer, (size_t)length);
|
||||
qbus::RPCReplyPtr replyptr =
|
||||
std::make_shared<qbus::RPCReply>(move(reply_buffer));
|
||||
std::make_shared<qbus::RPCReply>(std::move(reply_buffer));
|
||||
(**pphandler)(replyptr);
|
||||
delete (*pphandler);
|
||||
*pphandler = nullptr;
|
||||
|
||||
@@ -72,7 +72,7 @@ class ClientChannel {
|
||||
response_buffer + header_size,
|
||||
response_size - header_size);
|
||||
if (response->ParseFromZeroCopyStream(&data_stream)) {
|
||||
on_response(Result<Response>(move(response)));
|
||||
on_response(Result<Response>(std::move(response)));
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -28,7 +28,7 @@ void QuickbusClientChannel::send_core(
|
||||
(*on_response)(buffer, length);
|
||||
delete on_response;
|
||||
};
|
||||
OnReply *heap_on_response = new OnReply(move(on_response));
|
||||
OnReply *heap_on_response = new OnReply(std::move(on_response));
|
||||
api_client_send(
|
||||
_pclient, request_envalope.c_str(), request_envalope.size(), trampoline,
|
||||
heap_on_response);
|
||||
|
||||
@@ -11,8 +11,8 @@ using namespace rxcpp::operators;
|
||||
{{#each service}}
|
||||
|
||||
// Constructor
|
||||
{{name}}::{{name}}(std::unique_ptr<bts::api::ClientChannel> pchannel) : _pchannel(move(pchannel)) {}
|
||||
{{name}}::{{name}}({{name}}&& other) : _pchannel(move(other._pchannel)) { }
|
||||
{{name}}::{{name}}(std::unique_ptr<bts::api::ClientChannel> pchannel) : _pchannel(std::move(pchannel)) {}
|
||||
{{name}}::{{name}}({{name}}&& other) : _pchannel(std::move(other._pchannel)) { }
|
||||
|
||||
{{#each method}}
|
||||
{{#if server_streaming}}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/asio/ssl/stream.hpp>
|
||||
|
||||
#include <catch/catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
#include <cstdlib>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
@@ -198,4 +198,4 @@ TEST_CASE("WebsocketSyncClientTest", "[ws_ssl]") {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "lib/expression/ParserExceptions.h"
|
||||
|
||||
#include "HTTPServer.h"
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#define URDL_HEADER_ONLY 1
|
||||
#define URDL_DISALE_SSL 1
|
||||
#include <catch/catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
#include <urdl/test/http_server.hpp>
|
||||
#include <urdl/url.hpp>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include <iostream>
|
||||
#include <regex>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
#include "../Security.h"
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include "lib/domain_model/Security.h"
|
||||
#include "lib/utils/PBUtils.h"
|
||||
#include "lib/utils/datetime.h"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <boost/core/addressof.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time_duration.hpp>
|
||||
#include <catch/catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "lib/jetfix/common/InMsgBuffer.h"
|
||||
#include "lib/jetfix/connection/AsyncReader.h"
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "lib/jetfix/tests/sample_fix.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
namespace bts {
|
||||
namespace jetfix {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "lib/jetfix/codec/FIXFragment.h"
|
||||
#include "lib/jetfix/codec/FIXMsg.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "lib/jetfix/codec/FIXEncodingStream.h"
|
||||
#include <fstream>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "lib/jetfix/codec/FIXFragment.h"
|
||||
#include "lib/jetfix/codec/Fields.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "lib/jetfix/codec/FIXFragment.h"
|
||||
#include "lib/jetfix/codec/FIXMsg.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include "lib/jetfix/codec/FIXEncodingStream.h"
|
||||
#include "lib/jetfix/common/InMsgBuffer.h"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include "lib/config/config.h"
|
||||
#include "lib/config/protos/logging.pb.h"
|
||||
#include "lib/utils/bts_chrono.h"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <vector>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <btree/set.h>
|
||||
#include <btree/btree_set.h>
|
||||
#endif
|
||||
#include <tbb/concurrent_hash_map.h>
|
||||
#include <tbb/concurrent_queue.h>
|
||||
@@ -119,7 +119,7 @@ struct MBOProcessorImpl {
|
||||
// after draining publish the set in small batches
|
||||
// re-check input queue regularly
|
||||
|
||||
btree::set<MBOWorkingState *> dirty;
|
||||
btree::btree_set<MBOWorkingState *> dirty;
|
||||
std::vector<MBOWorkingState *> clean;
|
||||
|
||||
while (running) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "lib/domain_model/SecurityKey.h"
|
||||
#include "lib/utils/TimeStamp.h"
|
||||
|
||||
#include <btree/map.h>
|
||||
#include <btree/btree_map.h>
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
@@ -102,8 +102,8 @@ struct MBOWorkingState {
|
||||
// Used for 'change' messages which update price
|
||||
std::unordered_map<ExchangeOrderKey, key_t> orderid_index;
|
||||
|
||||
btree::map<key_t, Data, LessBid> bid;
|
||||
btree::map<key_t, Data> ask;
|
||||
btree::btree_map<key_t, Data, LessBid> bid;
|
||||
btree::btree_map<key_t, Data> ask;
|
||||
};
|
||||
|
||||
void copy_to_snapshot(MBOWorkingState &state, MBOSnapshot *destination);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "lib/utils/sane_algorithm.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <btree/map.h>
|
||||
#include <btree/btree_map.h>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
@@ -181,9 +181,9 @@ class MDConsumerInst {
|
||||
return false;
|
||||
}
|
||||
|
||||
btree::map<security_key, tuple<const ColdEntry *, const void *>>
|
||||
btree::btree_map<security_key, tuple<const ColdEntry *, const void *>>
|
||||
search_handles(const std::set<security_key> &keys) {
|
||||
btree::map<security_key, tuple<const ColdEntry *, const void *>> result;
|
||||
btree::btree_map<security_key, tuple<const ColdEntry *, const void *>> result;
|
||||
// Walk hot and cold lists and fill in any found handles
|
||||
if (!_cold.is_initialized())
|
||||
return result;
|
||||
@@ -783,7 +783,7 @@ class MDConsumerImpl {
|
||||
// recurse to find details
|
||||
map<security_key, SecurityPtr> leg_map;
|
||||
for (auto &leg : fill_leg_details(legs, depth + 1)) {
|
||||
leg_map.insert(make_pair(leg->id(), move(leg)));
|
||||
leg_map.insert(make_pair(leg->id(), std::move(leg)));
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -218,6 +218,7 @@ class BTS_EXPORT MDConsumerHandle {
|
||||
switch (_type) {
|
||||
case HANDLETYPE_VOID:
|
||||
bts_assert_msg(false, "Handle not initialized");
|
||||
break;
|
||||
case HANDLETYPE_DEPTH:
|
||||
return convert_security(book.cdata->security);
|
||||
case HANDLETYPE_BBO:
|
||||
|
||||
@@ -173,7 +173,7 @@ MDProducerImpl &MDProducer::get_producer(
|
||||
} else {
|
||||
newp.reset(new MDProducerImpl(symbol, type, exchange, _platform, _flags));
|
||||
}
|
||||
_producers.push_back(move(newp));
|
||||
_producers.push_back(std::move(newp));
|
||||
return *_producers.back();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "lib/utils/Dispatcher.h"
|
||||
#include "lib/utils/LockBox.h"
|
||||
|
||||
#include <btree/map.h>
|
||||
#include <btree/btree_map.h>
|
||||
#include <mutex>
|
||||
#include <tbb/concurrent_queue.h>
|
||||
#include <unordered_map>
|
||||
@@ -14,8 +14,8 @@ namespace bts {
|
||||
namespace md {
|
||||
|
||||
struct SecurityCacheImpl {
|
||||
utils::LockBox<btree::map<SecurityKey, SecurityPtr>> cache;
|
||||
utils::LockBox<btree::map<ExchangeSecurityKey, SecurityPtr>> ex_cache;
|
||||
utils::LockBox<btree::btree_map<SecurityKey, SecurityPtr>> cache;
|
||||
utils::LockBox<btree::btree_map<ExchangeSecurityKey, SecurityPtr>> ex_cache;
|
||||
tbb::concurrent_queue<SecurityPtr> update_queue;
|
||||
void enqueue_update_db(const SecurityPtr &);
|
||||
void flush();
|
||||
@@ -52,7 +52,7 @@ SecurityCache::SecurityCache() : _me(std::make_shared<SecurityCacheImpl>()) {}
|
||||
SecurityCache::~SecurityCache() {}
|
||||
|
||||
const Security *SecurityCache::try_get_security(SecurityKey key) const {
|
||||
return _me->cache.lock([key](btree::map<SecurityKey, SecurityPtr> &t) {
|
||||
return _me->cache.lock([key](btree::btree_map<SecurityKey, SecurityPtr> &t) {
|
||||
auto iter = t.find(key);
|
||||
if (iter != t.end()) {
|
||||
return iter->second.get();
|
||||
@@ -62,7 +62,7 @@ const Security *SecurityCache::try_get_security(SecurityKey key) const {
|
||||
}
|
||||
const Security *SecurityCache::try_get_security(ExchangeSecurityKey key) const {
|
||||
return _me->ex_cache.lock(
|
||||
[key](btree::map<ExchangeSecurityKey, SecurityPtr> &t) {
|
||||
[key](btree::btree_map<ExchangeSecurityKey, SecurityPtr> &t) {
|
||||
auto iter = t.find(key);
|
||||
if (iter != t.end()) {
|
||||
return iter->second.get();
|
||||
|
||||
@@ -210,7 +210,6 @@ void SecurityIDRecorderState::work_handles() {
|
||||
Security security;
|
||||
MDProducerHandle handle;
|
||||
vector<MDProducerHandle> retry;
|
||||
int count = 0;
|
||||
while (pending_handle.try_pop(handle)) {
|
||||
security.Clear();
|
||||
// if a spread does not have all of its legs we need to wait
|
||||
@@ -220,7 +219,6 @@ void SecurityIDRecorderState::work_handles() {
|
||||
retry.push_back(handle);
|
||||
} else {
|
||||
convert_security(handle.security(), &security);
|
||||
++count;
|
||||
assign_key(security, [handle](const api::Security &security) mutable {
|
||||
handle.set_key(security.id());
|
||||
});
|
||||
@@ -254,7 +252,7 @@ void SecurityIDRecorderState::work_db() {
|
||||
|
||||
// If we're unable to create a descriptor try again later
|
||||
if (descriptor == "") {
|
||||
defer.push_back(move(temp));
|
||||
defer.push_back(std::move(temp));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -262,10 +260,10 @@ void SecurityIDRecorderState::work_db() {
|
||||
if (key != invalid_security_key) {
|
||||
temp->security.set_id(key);
|
||||
temp->callback(temp->security);
|
||||
existing_securities.push_back(move(temp));
|
||||
existing_securities.push_back(std::move(temp));
|
||||
} else {
|
||||
// always push in parallel
|
||||
new_entries.push_back(move(temp));
|
||||
new_entries.push_back(std::move(temp));
|
||||
new_descriptors.push_back(descriptor);
|
||||
++count;
|
||||
// Limit the amount of time we spend writing to sqlite during startup
|
||||
@@ -279,7 +277,7 @@ void SecurityIDRecorderState::work_db() {
|
||||
for (auto &d : defer) {
|
||||
LOG(md, Info, "SecurityIDRecorderState::work_db work.push d: {}",
|
||||
bts::securities::descriptor(d->security));
|
||||
work.push(move(d));
|
||||
work.push(std::move(d));
|
||||
}
|
||||
|
||||
if (!new_entries.empty()) {
|
||||
|
||||
@@ -133,10 +133,10 @@ class ConcurrentSecurityIndex {
|
||||
// support std::move
|
||||
accessor->second = entry.release();
|
||||
return accessor->second;
|
||||
} else {
|
||||
LOG(md, Error, "Found duplicate entry for platform id '{}' - ", key);
|
||||
bts_assert(false);
|
||||
}
|
||||
LOG(md, Error, "Found duplicate entry for platform id '{}' - ", key);
|
||||
bts_assert(false);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SecurityData *add_security(ExchangeKey key, MDProducerHandle &handle) {
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
#include "lib/domain_model/Security.h"
|
||||
#include "lib/utils/parse_enum.h"
|
||||
#ifndef _WIN32
|
||||
#include <btree/map.h>
|
||||
#include <btree/btree_map.h>
|
||||
|
||||
namespace bts {
|
||||
namespace md {
|
||||
struct DisplayFactorMapper : public ISecurityMapper {
|
||||
btree::map<UserSymbol, int> _mapped;
|
||||
btree::btree_map<UserSymbol, int> _mapped;
|
||||
DisplayFactorMapper() : _mapped() {
|
||||
for (const auto &ov : config::get<DisplayFactorOverride>().override()) {
|
||||
if (ov.has_price_multiplier()) {
|
||||
@@ -51,7 +51,7 @@ struct DisplayFactorMapper : public ISecurityMapper {
|
||||
};
|
||||
|
||||
struct CppOverride : public ISecurityMapper {
|
||||
btree::map<std::string, double> _map;
|
||||
btree::btree_map<std::string, double> _map;
|
||||
CppOverride() : _map() {
|
||||
for (const auto &p : config::get<config::CppConfig>().cpp_entry()) {
|
||||
_map.insert(p);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "lib/utils/Dispatcher.h"
|
||||
#include "lib/utils/LockBox.h"
|
||||
|
||||
#include <btree/map.h>
|
||||
#include <btree/btree_map.h>
|
||||
#include <mutex>
|
||||
#include <tbb/concurrent_queue.h>
|
||||
#include <unordered_map>
|
||||
@@ -19,7 +19,7 @@ static domain::SecurityID create_sec_id(
|
||||
}
|
||||
|
||||
struct SecurityStore::PImpl {
|
||||
utils::LockBox<btree::map<domain::SecurityID, SecurityPtr>> cache;
|
||||
utils::LockBox<btree::btree_map<domain::SecurityID, SecurityPtr>> cache;
|
||||
tbb::concurrent_queue<SecurityStore::SecurityPtr> update_queue;
|
||||
|
||||
void enqueue_update_db(const SecurityPtr &);
|
||||
@@ -47,7 +47,7 @@ SecurityStore::~SecurityStore() {}
|
||||
const domain::Security *SecurityStore::try_get_security(
|
||||
domain::SecurityID key) const {
|
||||
return me_->cache.lock(
|
||||
[key](btree::map<domain::SecurityID, SecurityPtr> &t)
|
||||
[key](btree::btree_map<domain::SecurityID, SecurityPtr> &t)
|
||||
-> const domain::Security * {
|
||||
auto iter = t.find(key);
|
||||
if (iter != t.end()) {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <iostream>
|
||||
#include <mutex>
|
||||
#include <pugixml/pugixml.hpp>
|
||||
#include <pugixml.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace bts::api;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "lib/config/protos/system.pb.h"
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <pugixml/pugixml.hpp>
|
||||
#include <pugixml.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace bts::api;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "../IntPrice.h"
|
||||
#include "../MBOProcessor.h"
|
||||
#include "Co2TestInstrument.h"
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include "lib/utils/Shuffle.h"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -154,7 +154,6 @@ TEST_CASE("MBO sort order", "[md][mbo]") {
|
||||
// multiple updates at the same price
|
||||
for (unsigned x = 0; x < 100; ++x) {
|
||||
// bid
|
||||
auto p = 1000 + x;
|
||||
updates.push_back(inc::Update{
|
||||
ExchangeOrderKey(1000 + x),
|
||||
1000 + x,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "../coconut2.h"
|
||||
#include "../relay/QueryServer.h"
|
||||
#include "Co2TestInstrument.h"
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include "lib/config/config.h"
|
||||
#include "lib/metrics/metrics.h"
|
||||
#include "lib/os/os.h"
|
||||
@@ -1238,7 +1238,7 @@ struct Co2IndexTests {
|
||||
temp->security.mutable_glbx()->set_exchange_id(id);
|
||||
temp->exchange_id = id;
|
||||
temp->handle.key(count);
|
||||
index.add_security(id, move(temp));
|
||||
index.add_security(id, std::move(temp));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _WIN32
|
||||
#include "../MDConsumerHandle.h"
|
||||
#include "Co2TestInstrument.h"
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include "lib/utils/sane_algorithm.h"
|
||||
#include "md_test_utils.h"
|
||||
#include <algorithm>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "lib/md/SecurityOracle.h"
|
||||
#include "lib/orderman/orderman_utils/ExecutionReport.h"
|
||||
#include <boost/pool/object_pool.hpp>
|
||||
#include <btree/map.h>
|
||||
#include <btree/btree_map.h>
|
||||
#include <optional>
|
||||
|
||||
namespace bts {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
#include "../IL3Dispatcher.h"
|
||||
#include "../IL3ReceiveBuffer.h"
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <functional>
|
||||
#include <queue>
|
||||
#include <string>
|
||||
@@ -217,7 +219,6 @@ struct IL3TestExchange {
|
||||
// todo: check sender seq #
|
||||
REQUIRE(msg.seqNum() == this->expected_seq);
|
||||
this->expected_seq += 1;
|
||||
ExchangeOrder order;
|
||||
auto id = this->next_order_id += 1;
|
||||
this->orders[id] = ExchangeOrder{id, 0, msg.orderQty(), msg.securityID()};
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#include "catch/catch.hpp"
|
||||
|
||||
#include "../IL3GW.h"
|
||||
#include "../IL3MessageFramer.h"
|
||||
#include "../IL3ReceiveBuffer.h"
|
||||
@@ -11,6 +9,7 @@
|
||||
#include "lib/domain_model/Security.h"
|
||||
#include "lib/utils/SecureLogon.h"
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <optional>
|
||||
#include <random>
|
||||
#include <variant>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include "lib/api/service_helpers/AdminServiceUtils.h"
|
||||
#include "lib/api/services/AdminService.server.pb.h"
|
||||
#include "lib/config/config.h"
|
||||
|
||||
@@ -31,13 +31,12 @@ void BookUtils::change_unit_qty(
|
||||
const BookSide& book_in, std::vector<md::PriceSize>& book_out, int unit_qty) {
|
||||
//
|
||||
bts_assert(unit_qty > 0);
|
||||
int mlev = 0, mlev_qty_used = 0;
|
||||
int mlev_qty_used = 0;
|
||||
std::vector<md::PriceSize> unit_lev_span;
|
||||
for (uint32_t i = 0; i < book_in.size();) {
|
||||
int mlev_qty_rem = book_in[i].size() - mlev_qty_used;
|
||||
if (mlev_qty_rem == 0) {
|
||||
mlev_qty_used = 0;
|
||||
mlev++;
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
@@ -49,7 +48,6 @@ void BookUtils::change_unit_qty(
|
||||
} else {
|
||||
unit_lev_span.emplace_back(book_in[i].int_price(), mlev_qty_rem);
|
||||
mlev_qty_used = 0;
|
||||
mlev++;
|
||||
i++;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "AlgoTestDriver.h"
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include "lib/api/services/OrderService.pb.h"
|
||||
#include "lib/logging/logging.h"
|
||||
#include "lib/md/relay/RelayRecorder.h"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#include "catch/catch.hpp"
|
||||
#include "lib/api/services/OrderService.pb.h"
|
||||
#include "lib/domain_model/Security.h"
|
||||
#include "lib/orderman/orderman_utils/Book.h"
|
||||
@@ -15,6 +14,7 @@
|
||||
#include "lib/sparkproto/SparkProtos.pb.h"
|
||||
#include "lib/utils/PBUtils.h"
|
||||
#include <array>
|
||||
#include <catch2/catch.hpp>
|
||||
#include <cmath>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
@@ -241,4 +241,4 @@ TEST_CASE("test_activation_thresholds.", "[algo][limit_cover]") {
|
||||
} // namespace limit_cover
|
||||
} // namespace test
|
||||
} // namespace orderman
|
||||
} // namespace bts
|
||||
} // namespace bts
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "../DormanAlgo.h"
|
||||
#include "AlgoTestDriver.h"
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include "lib/domain_model/Security.h"
|
||||
#include "lib/orderman/orderman_utils/Book.h"
|
||||
#include "lib/orderman/orderman_utils/orderman_utils.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "lib/orderman/orders/algo/algo_orders/tests/limit_cover/LimitCoverState.h"
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include "lib/domain_model/Security.h"
|
||||
#include "lib/md/IntPrice.h"
|
||||
#include "lib/orderman/order_factory/IOrderFactory.h"
|
||||
@@ -197,4 +197,4 @@ LimitCoverState::ValidateDeployment::~ValidateDeployment() {
|
||||
} // namespace limit_cover
|
||||
} // namespace test
|
||||
} // namespace orderman
|
||||
} // namespace bts
|
||||
} // namespace bts
|
||||
@@ -1,8 +1,9 @@
|
||||
#include "lib/orderman/orders/algo/algo_orders/tests/limit_cover/TestSteps.h"
|
||||
#include "catch/catch.hpp"
|
||||
#include "lib/api/services/OrderService.pb.h"
|
||||
#include "lib/orderman/order_factory/IOrderFactory.h"
|
||||
#include "lib/orderman/orders/algo/algo_orders/tests/limit_cover/LimitCoverTestUtils.h"
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <optional>
|
||||
@@ -108,7 +109,6 @@ void breech_activation_thresh(
|
||||
while (thresh_count-- > 0 && gate_it != state.gates().end())
|
||||
gate_it++;
|
||||
auto thresh = gate_it->first + offset;
|
||||
int gi = 1;
|
||||
auto &bs = book.side(state.side());
|
||||
if (bs[0].size() == 0) {
|
||||
bs[0] = price_size(state.limit_price(), thresh);
|
||||
@@ -231,4 +231,4 @@ void CancelAlgo::execute_core(LimitCoverState &state) const {
|
||||
} // namespace limit_cover
|
||||
} // namespace test
|
||||
} // namespace orderman
|
||||
} // namespace bts
|
||||
} // namespace bts
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include "lib/api/services/OrderService.pb.h"
|
||||
#include "lib/orderman/orders/algo/algo_orders/tests/limit_cover/LimitCoverState.h"
|
||||
#include <functional>
|
||||
@@ -134,4 +134,4 @@ struct Custom : public ITestStep {
|
||||
} // namespace limit_cover
|
||||
} // namespace test
|
||||
} // namespace orderman
|
||||
} // namespace bts
|
||||
} // namespace bts
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
#include "../SplitterAlgo.h"
|
||||
#include "AlgoTestDriver.h"
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include "lib/orderman/orderman_utils/Book.h"
|
||||
#include "lib/utils/bts_chrono.h"
|
||||
#include <ctime>
|
||||
|
||||
@@ -328,9 +328,7 @@ TEST_CASE("spreader bookkeeping data", "[spreader]") {
|
||||
uint32_t sec_key_1 = 1111, sec_key_2 = 2222, sec_key_3 = 3333;
|
||||
double lean_ratio_1 = 1.33, lean_ratio_2 = 5.0, lean_ratio_3 = 2.75;
|
||||
double price_mult_1 = -2.5, price_mult_2 = 5.0, price_mult_3 = -3.33;
|
||||
Price spread_price(-0.35);
|
||||
Quantity spread_quantity(125);
|
||||
OrderKey order_key_1(4), order_key_2(22), order_key_3(2007);
|
||||
// security
|
||||
ContractLeg leg_1, leg_2, leg_3;
|
||||
fill_future_contract_leg(
|
||||
@@ -1354,8 +1352,6 @@ TEST_CASE("quoter_WAITING_FOR_CANCEL_ACK", "[spreader]") {
|
||||
"quoter_WAITING_FOR_CANCEL_ACK.update_order_status_terminal");
|
||||
}
|
||||
SECTION("3. on_book") {
|
||||
double zero_prices[] = {0, 0, 0, 0, 0};
|
||||
uint16_t zero_sizes[] = {0, 0, 0, 0, 0};
|
||||
fire_book_update(prices, sizes, api::Side::SIDE_SELL, 1, sm, quoter);
|
||||
// any
|
||||
REQUIRE(
|
||||
@@ -1886,7 +1882,6 @@ TEST_CASE("hedger_START_state", "[spreader]") {
|
||||
1.0, 1.0, api::Side::SIDE_BUY, 1.0, 0.25, bts::api::Venue::VENUE_GLBX,
|
||||
"ES", 2017, 3, 15, 1.0, -1.0, 1.0, api::Side::SIDE_SELL, 1.0, 0.25);
|
||||
SpreaderBookkeepingData &bookeeping_data = sm_ptr->bookkeeping_data();
|
||||
SpreaderManagerForTest &sm = *sm_ptr;
|
||||
|
||||
ChildOrder co;
|
||||
SingleFillHedger &hedger =
|
||||
@@ -1944,7 +1939,6 @@ TEST_CASE("hedger_WAITING_FOR_FIRST_ACK_state", "[spreader]") {
|
||||
1.0, 1.0, api::Side::SIDE_BUY, 1.0, 0.25, bts::api::Venue::VENUE_GLBX,
|
||||
"ES", 2017, 3, 15, 1.0, -1.0, 1.0, api::Side::SIDE_SELL, 1.0, 0.25);
|
||||
SpreaderBookkeepingData &bookeeping_data = sm_ptr->bookkeeping_data();
|
||||
SpreaderManagerForTest &sm = *sm_ptr;
|
||||
|
||||
ChildOrder co;
|
||||
// SingleFillHedger hedger (sm, sm.get_leg_data (1), co, hedger_price,
|
||||
@@ -2015,7 +2009,6 @@ TEST_CASE("hedger_WAITING_FOR_FIRST_ACK_CANCELLED_state", "[spreader]") {
|
||||
1.0, 1.0, api::Side::SIDE_BUY, 1.0, 0.25, bts::api::Venue::VENUE_GLBX,
|
||||
"ES", 2017, 3, 15, 1.0, -1.0, 1.0, api::Side::SIDE_SELL, 1.0, 0.25);
|
||||
SpreaderBookkeepingData &bookeeping_data = sm_ptr->bookkeeping_data();
|
||||
SpreaderManagerForTest &sm = *sm_ptr;
|
||||
|
||||
ChildOrder co;
|
||||
SingleFillHedger &hedger =
|
||||
@@ -2093,7 +2086,6 @@ TEST_CASE("hedger_WAITING_FOR_CANCEL_ACK_state", "[spreader]") {
|
||||
1.0, 1.0, api::Side::SIDE_BUY, 1.0, 0.25, bts::api::Venue::VENUE_GLBX,
|
||||
"ES", 2017, 3, 15, 1.0, -1.0, 1.0, api::Side::SIDE_SELL, 1.0, 0.25);
|
||||
SpreaderBookkeepingData &bookeeping_data = sm_ptr->bookkeeping_data();
|
||||
SpreaderManagerForTest &sm = *sm_ptr;
|
||||
|
||||
ChildOrder co;
|
||||
SingleFillHedger &hedger =
|
||||
@@ -2194,7 +2186,6 @@ TEST_CASE("hedger_END_state", "[spreader]") {
|
||||
1.0, 1.0, api::Side::SIDE_BUY, 1.0, 0.25, bts::api::Venue::VENUE_GLBX,
|
||||
"ES", 2017, 3, 15, 1.0, -1.0, 1.0, api::Side::SIDE_SELL, 1.0, 0.25);
|
||||
SpreaderBookkeepingData &bookeeping_data = sm_ptr->bookkeeping_data();
|
||||
SpreaderManagerForTest &sm = *sm_ptr;
|
||||
|
||||
ChildOrder co;
|
||||
SingleFillHedger &hedger =
|
||||
@@ -2262,7 +2253,6 @@ TEST_CASE("hedger_WORKING", "[spreader]") {
|
||||
1.0, 1.0, api::Side::SIDE_BUY, 1.0, 0.25, bts::api::Venue::VENUE_GLBX,
|
||||
"ES", 2017, 3, 15, 1.0, -1.0, 1.0, api::Side::SIDE_SELL, 1.0, 0.25);
|
||||
SpreaderBookkeepingData &bookeeping_data = sm_ptr->bookkeeping_data();
|
||||
SpreaderManagerForTest &sm = *sm_ptr;
|
||||
|
||||
ChildOrder co;
|
||||
SingleFillHedger &hedger =
|
||||
@@ -2383,8 +2373,6 @@ TEST_CASE("spreader_START", "[spreader]") {
|
||||
SECTION("1. on_init_new.resolved") {
|
||||
spreader.test_only_on_init_new(order_def, pao_services);
|
||||
REQUIRE(spreader.test_only_func_spreader_state() == SpreaderState::START);
|
||||
SpreaderBookkeepingData &bookeeping_data =
|
||||
spreader.test_only_func_spreader_full_data();
|
||||
REQUIRE(
|
||||
bookkeeping_data.get_leg_data(0).leg_property_data().security_key() ==
|
||||
2468);
|
||||
@@ -2658,8 +2646,7 @@ TEST_CASE("spreader_WORKING", "[spreader]") {
|
||||
// comes out to be at 2002, which gives leg1 = spreader_price + leg2 = 1 +
|
||||
// 2002 = 2003. changing leg 2's books such that 15 still comes at 2002
|
||||
|
||||
uint32_t leg_1_id = leg_data_1.leg_property_data().security_key(),
|
||||
leg_2_id = leg_data_2.leg_property_data().security_key();
|
||||
uint32_t leg_2_id = leg_data_2.leg_property_data().security_key();
|
||||
bts::orderman::Book modified_book = get_book(
|
||||
SecurityKey(leg_2_id), 5, new double[5]{2004, 2003, 2002, 2001, 2000},
|
||||
new uint16_t[5]{5, 5, 5, 0, 0},
|
||||
@@ -3755,8 +3742,6 @@ TEST_CASE("nlegs_compute_driver", "[spreader]") {
|
||||
SpreaderManagerForTest spreader_manager(
|
||||
order_key, order_def, pao_services, leg_props, quoter_ord_defs,
|
||||
hedger_ord_defs);
|
||||
SpreaderBookkeepingData &bookkeeping_data =
|
||||
spreader_manager.bookkeeping_data();
|
||||
SECTION("compute_1") {
|
||||
Quantity quoting_leg_target(300);
|
||||
Price spread_price(0.25);
|
||||
@@ -3895,8 +3880,6 @@ TEST_CASE("nlegs_crossed_hedges", "[spreader]") {
|
||||
SpreaderManagerForTest spreader_manager(
|
||||
order_key, order_def, pao_services, leg_props, quoter_ord_defs,
|
||||
hedger_ord_defs);
|
||||
SpreaderBookkeepingData &bookkeeping_data =
|
||||
spreader_manager.bookkeeping_data();
|
||||
|
||||
fill_book(
|
||||
spreader_manager, 0, new double[5]{65.31, 65.32, 65.34, 65.36, 65.40},
|
||||
@@ -3999,8 +3982,6 @@ TEST_CASE("nlegs_crossed_hedges", "[spreader]") {
|
||||
SpreaderManagerForTest spreader_manager(
|
||||
order_key, order_def, pao_services, leg_props, quoter_ord_defs,
|
||||
hedger_ord_defs);
|
||||
SpreaderBookkeepingData &bookkeeping_data =
|
||||
spreader_manager.bookkeeping_data();
|
||||
|
||||
fill_book(
|
||||
spreader_manager, 0, new double[5]{62.1, 62, 61.99, 61.95, 61.93},
|
||||
@@ -4200,7 +4181,6 @@ TEST_CASE("spreader_perf_2legs", "[spreader]") {
|
||||
spreader.test_only_func_spreader_full_data();
|
||||
verify_basic_spreader_state(
|
||||
spreader, SpreaderState::WORKING, spreader_price, spreader_quantity);
|
||||
SpreaderLegData &leg_data_1 = bookkeeping_data.get_leg_data(0);
|
||||
SpreaderLegData &leg_data_2 = bookkeeping_data.get_leg_data(1);
|
||||
verify_complete_quoter_state(
|
||||
leg_data_2.quoter(), QuoterState::WAITING_FOR_SIZE, false,
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
#pragma once
|
||||
#include <catch/catch.hpp>
|
||||
#include <map>
|
||||
|
||||
#include "lib/domain_model/Security.h"
|
||||
#include "lib/orderman/securities/ISecurityDB.h"
|
||||
#include "lib/utils/bts_chrono.h"
|
||||
@@ -16,8 +13,11 @@
|
||||
#include "lib/utils/PBUtils.h"
|
||||
#include "lib/utils/bts_chrono.h"
|
||||
#include "lib/utils/datetime.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <catch2/catch.hpp>
|
||||
#include <google/protobuf/util/message_differencer.h>
|
||||
#include <map>
|
||||
|
||||
namespace bts {
|
||||
namespace orderman {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "lib/mercury/common/FatWrapper.h"
|
||||
#include <catch/catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
namespace bts {
|
||||
namespace mercury {
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#include "catch/catch.hpp"
|
||||
|
||||
#include "../PersistenceServiceServer.h"
|
||||
#include "lib/api/public/ServiceContext.h"
|
||||
#include "lib/api/services/PersistenceService.client.pb.h"
|
||||
@@ -9,6 +7,7 @@
|
||||
#include "lib/utils/bts_chrono.h"
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
#include <future>
|
||||
|
||||
namespace bts {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include "catch/catch.hpp"
|
||||
#include "lib/os/os.h"
|
||||
#include "lib/quickbus/quickbus.h"
|
||||
#include "lib/utils/bts_chrono.h"
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
#include <chrono>
|
||||
#include <future>
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "catch/catch.hpp"
|
||||
#include "lib/os/os.h"
|
||||
#include "lib/quickbus/quickbus.h"
|
||||
#include "lib/utils/TimeStamp.h"
|
||||
#include "lib/utils/benchmarking_utils.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <catch2/catch.hpp>
|
||||
#include <chrono>
|
||||
#include <future>
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#include "catch/catch.hpp"
|
||||
|
||||
#include "lib/quickbus/quickbus.h"
|
||||
#include "lib/quickbus/routing/Router.h"
|
||||
|
||||
#include <boost/signals2.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
namespace bts {
|
||||
int quickbus_tests = 0;
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
#define CATCH_CONFIG_RUNNER
|
||||
#include "catch_test_runner.h"
|
||||
|
||||
#include "catch/catch.hpp"
|
||||
|
||||
#include "lib/config/config.h"
|
||||
#include "lib/config/protos/logging.pb.h"
|
||||
#include "lib/logging/logging.h"
|
||||
#include "lib/utils/bts_assert.h"
|
||||
#include "lib/utils/is_unittest_environment.h"
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
namespace bts {
|
||||
|
||||
int run_tests(int argc, char **argv) {
|
||||
|
||||
@@ -93,6 +93,7 @@ std::tuple<string, string> load_session_keys(const string &session) {
|
||||
|
||||
string error = "Failed to find secure logon key for session: " + session;
|
||||
bts_assert_msg(false, error);
|
||||
return {"", ""};
|
||||
}
|
||||
|
||||
LogonData calculate_hmac(
|
||||
@@ -127,6 +128,7 @@ LogonData calculate_hmac(
|
||||
bts_assert_msg(false, e.what());
|
||||
}
|
||||
bts_assert(false);
|
||||
return {};
|
||||
}
|
||||
|
||||
// TEST_CASE("LoadSessionKeys", "") {
|
||||
|
||||
@@ -74,14 +74,14 @@ struct BoostLowLevelSharedMemoryImpl {
|
||||
|
||||
void add_region(shared_memory_object block) {
|
||||
mapped_region region(block, block.get_mode());
|
||||
_mappings.push_back(make_pair(move(block), move(region)));
|
||||
_mappings.push_back(make_pair(std::move(block), std::move(region)));
|
||||
}
|
||||
|
||||
Segment create(const string &name, size_t size) {
|
||||
try {
|
||||
shared_memory_object block(create_only, name.c_str(), read_write);
|
||||
block.truncate(size);
|
||||
add_region(move(block));
|
||||
add_region(std::move(block));
|
||||
return make_segment(size, _mappings.back().second.get_address());
|
||||
} catch (...) {
|
||||
return make_segment(0, nullptr);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
|
||||
namespace bts {
|
||||
namespace sane {
|
||||
@@ -57,4 +58,4 @@ void map(const TSrc &source, TDest &dest, const TFn &fn) {
|
||||
}
|
||||
|
||||
} // namespace sane
|
||||
} // namespace bts
|
||||
} // namespace bts
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef _WIN32
|
||||
#include "../AuthToken.h"
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include "lib/config/config.h"
|
||||
namespace bts {
|
||||
namespace test {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef _WIN32
|
||||
#include "../Puid.h"
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
namespace bts {
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef _WIN32
|
||||
#include "lib/utils/MathUtils.h"
|
||||
#include <catch/catch.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
namespace bts::tests {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "../ConcurrentAppendCollection.h"
|
||||
#include "catch/catch.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
#include <thread>
|
||||
|
||||
namespace bts {
|
||||
@@ -95,4 +95,4 @@ TEST_CASE("ConcurrentAppendCollection", "[collection]") {
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace bts
|
||||
} // namespace bts
|
||||
@@ -25,6 +25,9 @@ target_include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src/server/sparkd/cmds/spartan ${emumba-deribit-connector-library_INCLUDE_DIRS})
|
||||
|
||||
target_link_directories(sparkd BEFORE PRIVATE ${quickfix_LIBRARY_DIR})
|
||||
target_include_directories(sparkd SYSTEM PRIVATE ${quickfix_INCLUDE_DIR})
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(emumba-deribit-connector-library REQUIRED emumba-deribit-connector)
|
||||
|
||||
@@ -67,24 +70,26 @@ endif()
|
||||
# linking
|
||||
target_link_libraries(
|
||||
sparkd
|
||||
libspark
|
||||
${emumba-deribit-connector-library_LIBRARIES}
|
||||
ssl
|
||||
cryptopp
|
||||
tbb
|
||||
onixs-cmemdh-all-4.8.0
|
||||
OnixS.IceImpactMulticastPriceFeedHandlerCpp
|
||||
ACE
|
||||
quickfix
|
||||
benchmark
|
||||
Common++
|
||||
Packet++
|
||||
Pcap++
|
||||
lttng-ust
|
||||
-lpcap
|
||||
-pthread
|
||||
-static-libgcc
|
||||
-static-libstdc++
|
||||
-pthread)
|
||||
ACE
|
||||
Catch2
|
||||
Common++
|
||||
CLI11
|
||||
OnixS.IceImpactMulticastPriceFeedHandlerCpp
|
||||
Packet++
|
||||
Pcap++
|
||||
benchmark
|
||||
cryptopp
|
||||
libspark
|
||||
lttng-ust
|
||||
onixs-cmemdh-all-4.8.0
|
||||
quickfix
|
||||
ssl
|
||||
tbb)
|
||||
|
||||
add_custom_command(
|
||||
TARGET sparkd
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
#include <boost/pool/singleton_pool.hpp>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include <moodycamel/concurrentqueue.h>
|
||||
#include <moodycamel/readerwriterqueue.h>
|
||||
#include <concurrentqueue.h>
|
||||
#include <readerwriterqueue.h>
|
||||
#include <mutex>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <btree/set.h>
|
||||
#include <btree/btree_set.h>
|
||||
#include <set>
|
||||
#include <unordered_set>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace bts::crypto {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#ifdef SPARK_ENABLE_CCAPI
|
||||
#include "LiveLadderDemoCmd.h"
|
||||
#endif
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#include "DeribitDemo.h"
|
||||
#include "lib/config/config.h"
|
||||
#include "lib/os/os.h"
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
@@ -141,8 +141,9 @@ std::optional<DeribitDemoConfiguration> DeribitDemoConfiguration::read_file(
|
||||
rapidjson::IStreamWrapper isw{configFile};
|
||||
|
||||
rapidjson::Document doc{};
|
||||
if (doc.ParseStream(isw).HasParseError()) {
|
||||
LOG(md, Error, "Error in parsing config from {}", config_path);
|
||||
auto &res = doc.ParseStream(isw);
|
||||
if (res.HasParseError()) {
|
||||
LOG(md, Error, "Error in parsing config from {}: {}", config_path, res.GetParseError());
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "server/sparkd/cmds/common/Validators.h"
|
||||
#include "server/sparkd/cmds/crypto/LiveLadderDemo.h"
|
||||
#include "server/sparkd/cmds/spartan/utils/FileUtils.h"
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
#include <optional>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace bts::cmds {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds::md::cmds {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds::md::cmds {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds::md::cmds {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds::md::cmds {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds::md::cmds {
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace bts::cmds::md::cmds {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#pragma once
|
||||
#include <CLI11/CLI11.hpp>
|
||||
#include <CLI/CLI.hpp>
|
||||
|
||||
namespace bts::cmds::md::cmds {
|
||||
|
||||
|
||||
Loaded 100 of 146 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user