-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
89 lines (70 loc) · 1.84 KB
/
CMakeLists.txt
File metadata and controls
89 lines (70 loc) · 1.84 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
cmake_minimum_required(VERSION 3.14)
project(empyrical_cpp)
# GoogleTest requires at least C++14
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
include(GoogleTest)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fsanitize=address")
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ")
include_directories(
./include
)
if (DEFINED ${BOOST_INCLUDE_DIR})
include_directories(
${BOOST_INCLUDE_DIR}
)
endif()
set(EMPYRICAL_HEADERS
include/empyrical/utils.h
include/empyrical/perf_attrib.h
include/empyrical/stats.h
include/empyrical/dtf.h
include/empyrical/datetime.h
include/empyrical/algorithm.h
)
set(EMPYRICAL_SOURCES
)
add_executable(
${PROJECT_NAME}
#
main.cpp
#
# ${EMPYRICAL_SOURCES}
${EMPYRICAL_HEADERS}
)
if (DEFINED ${BOOST_LIB_DIR})
target_link_libraries(
${PROJECT_NAME}
-L${BOOST_LIB_DIR}
)
endif()
target_link_libraries(
${PROJECT_NAME}
)
enable_testing()
add_executable(
empyrical_test
tests/test_utils.cpp
tests/test_datetime.cpp
# tests/test_original_utils.cpp
tests/test_perf_attrib.cpp
tests/test_stats.cpp
tests/test_dtf.cpp
tests/test_original_utils.cpp
tests/test_algorithm.cpp
tests/test_adf.cpp
)
target_link_libraries(
empyrical_test
GTest::gtest_main
)
gtest_discover_tests(empyrical_test)