forked from keyianpai/hft
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c84c354
commit b3e1323
Showing
4 changed files
with
69 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,3 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
|
||
SET(CMAKE_C_COMPILER "/usr/bin/gcc") | ||
SET(CMAKE_CXX_COMPILER "/usr/bin/g++") | ||
|
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -fPIC") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -std=c++11 -Wall -ggdb -fPIC") | ||
|
||
project(hft) | ||
|
||
add_subdirectory(src) | ||
add_subdirectory(src cmake_src) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
SET(CMAKE_C_COMPILER "/usr/bin/gcc") | ||
SET(CMAKE_CXX_COMPILER "/usr/bin/g++") | ||
|
||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -fPIC") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -std=c++11 -Wall -ggdb -fPIC") | ||
|
||
# 定义一个宏,用来简化测试工作 | ||
macro (compile arg1) | ||
aux_source_directory(${arg1} ${arg1}) | ||
add_executable(ctporder ${arg1}) | ||
target_link_libraries(ctporder pthread nick zmq thosttraderapi thostmduserapi config++) | ||
endmacro (compile) | ||
|
||
aux_source_directory(ctporder CTPORDER) | ||
aux_source_directory(ctpdata CTPDATA) | ||
aux_source_directory(data_proxy DATA_PROXY) | ||
aux_source_directory(order_proxy ORDER_PROXY) | ||
aux_source_directory(simplearb SIMPLEARB) | ||
aux_source_directory(simplearb2 SIMPLEARB2) | ||
aux_source_directory(backtest BACKTEST) | ||
|
||
include_directories(../external/common/include) | ||
include_directories(../external/ctp/include) | ||
include_directories(../external/zeromq/include) | ||
include_directories(.) | ||
|
||
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../external/common/lib) | ||
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../external/ctp/lib) | ||
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../external/zeromq/lib) | ||
|
||
add_executable(ctporder ${CTPORDER}) | ||
target_link_libraries(ctporder pthread nick zmq thosttraderapi config++) | ||
|
||
add_executable(ctpdata ${CTPDATA}) | ||
target_link_libraries(ctpdata pthread nick zmq thostmduserapi config++) | ||
|
||
add_executable(data_proxy ${DATA_PROXY}) | ||
target_link_libraries(data_proxy zmq) | ||
|
||
add_executable(order_proxy ${ORDER_PROXY}) | ||
target_link_libraries(order_proxy zmq) | ||
|
||
add_executable(simplearb ${SIMPLEARB}) | ||
target_link_libraries(simplearb pthread nick zmq config++) | ||
|
||
add_executable(simplearb2 ${SIMPLEARB2}) | ||
target_link_libraries(simplearb2 pthread nick zmq config++) | ||
|
||
add_executable(backtest ${BACKTEST}) | ||
target_link_libraries(backtest pthread nick zmq config++ z) |