Spaces:
Sleeping
Sleeping
Delete CMakeLists.txt
Browse files- CMakeLists.txt +0 -65
CMakeLists.txt
DELETED
|
@@ -1,65 +0,0 @@
|
|
| 1 |
-
cmake_minimum_required(VERSION 3.16)
|
| 2 |
-
project(hft_simulator CXX)
|
| 3 |
-
|
| 4 |
-
set(CMAKE_CXX_STANDARD 17)
|
| 5 |
-
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
| 6 |
-
|
| 7 |
-
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native -DNDEBUG")
|
| 8 |
-
if(NOT CMAKE_BUILD_TYPE)
|
| 9 |
-
set(CMAKE_BUILD_TYPE Release)
|
| 10 |
-
endif()
|
| 11 |
-
|
| 12 |
-
include_directories(
|
| 13 |
-
${CMAKE_SOURCE_DIR}/include
|
| 14 |
-
${CMAKE_SOURCE_DIR}/src
|
| 15 |
-
)
|
| 16 |
-
|
| 17 |
-
set(CORE_SOURCES
|
| 18 |
-
src/core/order_book.cpp
|
| 19 |
-
src/core/simulator.cpp
|
| 20 |
-
src/risk/risk_manager.cpp
|
| 21 |
-
src/journal/journal.cpp
|
| 22 |
-
)
|
| 23 |
-
|
| 24 |
-
# ── Production targets ────────────────────────────────────────────────────────
|
| 25 |
-
|
| 26 |
-
add_executable(hft_server ${CORE_SOURCES} src/main.cpp)
|
| 27 |
-
target_compile_options(hft_server PRIVATE -Wall -Wextra -pthread)
|
| 28 |
-
target_link_libraries(hft_server PRIVATE pthread)
|
| 29 |
-
|
| 30 |
-
add_executable(hft_engine ${CORE_SOURCES} src/engine_cli.cpp)
|
| 31 |
-
target_compile_options(hft_engine PRIVATE -Wall -Wextra -pthread)
|
| 32 |
-
target_link_libraries(hft_engine PRIVATE pthread)
|
| 33 |
-
|
| 34 |
-
install(TARGETS hft_engine DESTINATION bin)
|
| 35 |
-
|
| 36 |
-
# ── Test targets ──────────────────────────────────────────────────────────────
|
| 37 |
-
|
| 38 |
-
add_executable(hft_test_orderbook
|
| 39 |
-
${CORE_SOURCES}
|
| 40 |
-
tests/test_order_book.cpp
|
| 41 |
-
)
|
| 42 |
-
target_compile_options(hft_test_orderbook PRIVATE -Wall -Wextra -pthread)
|
| 43 |
-
target_link_libraries(hft_test_orderbook PRIVATE pthread)
|
| 44 |
-
|
| 45 |
-
add_executable(hft_test_risk
|
| 46 |
-
${CORE_SOURCES}
|
| 47 |
-
tests/test_risk_manager.cpp
|
| 48 |
-
)
|
| 49 |
-
target_compile_options(hft_test_risk PRIVATE -Wall -Wextra -pthread)
|
| 50 |
-
target_link_libraries(hft_test_risk PRIVATE pthread)
|
| 51 |
-
|
| 52 |
-
# ── Benchmark target ──────────────────────────────────────────────────────────
|
| 53 |
-
|
| 54 |
-
add_executable(hft_bench
|
| 55 |
-
${CORE_SOURCES}
|
| 56 |
-
benchmark/bench_matching_engine.cpp
|
| 57 |
-
)
|
| 58 |
-
target_compile_options(hft_bench PRIVATE -Wall -Wextra -pthread -O3)
|
| 59 |
-
target_link_libraries(hft_bench PRIVATE pthread)
|
| 60 |
-
|
| 61 |
-
# ── CTest integration ────────────────────────────────────────────────────────
|
| 62 |
-
|
| 63 |
-
enable_testing()
|
| 64 |
-
add_test(NAME OrderBookTests COMMAND hft_test_orderbook)
|
| 65 |
-
add_test(NAME RiskManagerTests COMMAND hft_test_risk)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|