-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
71 lines (51 loc) · 1.65 KB
/
CMakeLists.txt
File metadata and controls
71 lines (51 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
cmake_minimum_required(VERSION 4.0)
project(tradercpp)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
# === App Source Files ==========================
# Collect source files
file(GLOB_RECURSE ALL_SOURCES "src/*.cpp")
# Separate main.cpp from the rest of the sources
list(FILTER ALL_SOURCES EXCLUDE REGEX ".*main\\.cpp$")
set(SOURCES ${ALL_SOURCES})
# === Create core logic library =================
# This allows unit tests to run
# Link dependencies to the *library* (so both exe and tests get them)
add_library(traderlib STATIC ${SOURCES})
# === Conan Setup ===============================
find_package(absl REQUIRED)
find_package(benchmark REQUIRED)
find_package(Boost REQUIRED)
find_package(concurrentqueue REQUIRED)
find_package(efsw REQUIRED)
find_package(ftxui REQUIRED)
find_package(gperftools REQUIRED)
find_package(Microsoft.GSL REQUIRED)
find_package(GTest REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(quickfix REQUIRED CONFIG)
find_package(libsodium REQUIRED)
find_package(spdlog REQUIRED)
target_link_libraries(traderlib PUBLIC
abseil::abseil
benchmark::benchmark_main
boost::boost
concurrentqueue::concurrentqueue
efsw::efsw
ftxui::ftxui
gperftools::gperftools
Microsoft.GSL::GSL
OpenSSL::SSL
OpenSSL::Crypto
quickfix::quickfix
libsodium::libsodium
spdlog::spdlog
)
# === Main executable ===========================
add_executable(tradercpp "src/main.cpp")
target_link_libraries(tradercpp PRIVATE traderlib)
# === Unit test executable ======================
enable_testing()
add_subdirectory(tests)
# === Benchmark executable ======================
add_subdirectory(benchmarks)