-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
85 lines (70 loc) · 2.6 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
79
80
81
82
83
84
85
project(PalValidator)
cmake_minimum_required(VERSION 2.8)
set(BIN_NAME ${PROJECT_NAME})
set(CMAKE_CXX_STANDARD 17)
set(USE_BLOOMBERG_DECIMALS false)
if(USE_BLOOMBERG_DECIMALS)
add_definitions(-DUSE_BLOOMBERG_DECIMALS)
set(BLOOMBERG_DIR ${CMAKE_SOURCE_DIR}/../bloomberg)
set(BLOOMBERG_DECIMAL_LIBRARIES
${BLOOMBERG_DIR}/bde/build/groups/bdl/bdldfp/libbdldfp.a
${BLOOMBERG_DIR}/bde/build/groups/bsl/bsls/libbsls.a
${BLOOMBERG_DIR}/bde/build/groups/bsl/libbsl.a
${BLOOMBERG_DIR}/bde/build/thirdparty/decnumber/libdecnumber.a
${BLOOMBERG_DIR}/bde/build/thirdparty/inteldfp/libinteldfp.a
${BLOOMBERG_DIR}/bde/build/groups/bsl/bslim/libbslim.a
${BLOOMBERG_DIR}/bde/build/groups/bdl/bdlscm/libbdlscm.a
${BLOOMBERG_DIR}/bde/build/groups/bsl/bslscm/libbslscm.a
)
set(BLOOMBERG_DECIMAL_INCLUDES
${BLOOMBERG_DIR}/bde/groups/bdl/bdldfp
${BLOOMBERG_DIR}/bde/groups/bdl/bdlscm
${BLOOMBERG_DIR}/bde/groups/bsl/bsls
${BLOOMBERG_DIR}/bde/groups/bsl/bslscm
${BLOOMBERG_DIR}/bde/groups/bsl/bslmf
${BLOOMBERG_DIR}/bde/groups/bsl/bslstl
${BLOOMBERG_DIR}/bde/groups/bsl/bslalg
${BLOOMBERG_DIR}/bde/groups/bsl/bslma
${BLOOMBERG_DIR}/bde/groups/bsl/bsl+bslhdrs
${BLOOMBERG_DIR}/bde/groups/bsl/bslh
${BLOOMBERG_DIR}/bde/thirdparty
${BLOOMBERG_DIR}/bde/thirdparty/inteldfp/LIBRARY/src
)
endif()
#if(CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-backtrace-limit=0")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3 -march=native")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread")
#endif()
#set(Boost_DEBUG ON)
#set(Boost_VERBOSE ON)
find_package( Threads )
find_package(Boost REQUIRED COMPONENTS filesystem date_time chrono system program_options regex thread container)
include_directories(${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/libs/PALCodeGenLibrary-v2/
${CMAKE_SOURCE_DIR}/libs/timeserieslib
${CMAKE_SOURCE_DIR}/libs/pasearchalgolib
${Boost_INCLUDE_DIR}
${BLOOMBERG_DECIMAL_INCLUDES}
${RAPIDJSON_DIR}
${CURL_DIR}
${FLEX_INCLUDE_DIR}
)
add_subdirectory(libs/PALCodeGenLibrary-v2/)
add_subdirectory(libs/timeserieslib)
add_subdirectory(libs/pasearchalgolib)
set(SRC_LIST main/main2.cpp)
add_executable(${PROJECT_NAME} ${SRC_LIST})
set_target_properties(${BIN_NAME} PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(${BIN_NAME}
priceaction2
backtest
pasearchalgo
${Boost_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${BLOOMBERG_DECIMAL_LIBRARIES}
curl
)
add_subdirectory(tests)