forked from waifod/quant_finance_models
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
35 lines (30 loc) · 1.08 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
cmake_minimum_required(VERSION 3.10)
project(QuantFinanceModels
VERSION 1.0
DESCRIPTION "Quantitative Finance Models (QFM) library and CLI application"
LANGUAGES CXX
)
# CMake configuration
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# set(CMAKE_CXX_CLANG_TIDY clang-tidy)
# Dependencies
find_package(Boost 1.65 COMPONENTS program_options REQUIRED)
find_package(nlohmann_json 3.2.0 REQUIRED)
find_package(CURL REQUIRED)
# Library
file(GLOB_RECURSE SOURCES "src/*.cpp")
add_library(QuantFinanceModels SHARED ${SOURCES})
target_include_directories(QuantFinanceModels
PUBLIC include
PRIVATE ${Boost_INCLUDE_DIR} ${CURL_INCLUDE_DIR})
target_link_libraries(QuantFinanceModels
PRIVATE ${Boost_LIBRARIES} ${CURL_LIBRARIES} nlohmann_json::nlohmann_json)
# Executable (CLI application)
add_executable(quant_finance_models "main.cpp")
target_include_directories(quant_finance_models
PRIVATE ${Boost_INCLUDE_DIR})
target_link_libraries(quant_finance_models PRIVATE QuantFinanceModels ${Boost_LIBRARIES})
# Add tests
add_subdirectory(test)