-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathCMakeLists.txt
78 lines (60 loc) · 2.29 KB
/
CMakeLists.txt
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
72
73
74
75
76
77
78
cmake_minimum_required(VERSION 2.8)
project(helix)
set(HELIX_VERSION "0.3.0")
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generate API reference with Doxygen" VERBATIM
)
endif(DOXYGEN_FOUND)
find_package(Boost REQUIRED)
find_package(Curses)
find_package(PkgConfig)
pkg_check_modules(LIBUV REQUIRED libuv>=1.0)
include_directories(${LIBUV_INCLUDE_DIRS})
include_directories("include")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address -fno-omit-frame-pointer")
set(CMAKE_C_FLAGS "-Iinclude -Wall -O3 -g -std=gnu11")
set(CMAKE_CXX_FLAGS "-Iinclude -Wall -O3 -g -std=c++14")
set(libSrcs ${libSrcs}
src/event.cc
src/helix.cc
src/order_book.cc
src/nasdaq/itch50_protocol.cc
src/nasdaq/itch50_handler.cc
src/nasdaq/nordic_itch_handler.cc
src/nasdaq/nordic_itch_protocol.cc
src/parity/pmd_handler.cc
src/parity/pmd_protocol.cc
)
add_library(helix ${libSrcs} include/helix/nasdaq/moldudp_messages.h)
set(cxxHeaders
include/helix/nasdaq/moldudp_messages.h
include/helix/nasdaq/nordic_itch_handler.hh
include/helix/nasdaq/nordic_itch_messages.h
include/helix/nasdaq/itch50_protocol.hh
include/helix/nasdaq/nordic_itch_protocol.hh
include/helix/nasdaq/itch50_handler.hh
include/helix/nasdaq/itch50_messages.h
include/helix/net.hh
include/helix/helix.hh
include/helix/order_book.hh
)
set(cHeaders
include/helix-c/helix.h
)
configure_file("helix.pc.in" "helix.pc" @ONLY)
install(FILES ${cxxHeaders} DESTINATION include/helix)
install(FILES ${cHeaders} DESTINATION include/helix-c)
install(TARGETS helix DESTINATION lib)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/helix.pc"
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
add_executable(helix-trace tools/helix-trace/helix-trace.cc)
target_link_libraries(helix-trace helix ${LIBUV_LIBRARIES})
add_executable(helix-top tools/helix-top/helix-top.c)
target_link_libraries(helix-top helix ncurses ${LIBUV_LIBRARIES})
add_executable(order_book_perf_test tests/order_book_perf_test.cc)
target_link_libraries(order_book_perf_test helix)