forked from scivey/score
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
111 lines (95 loc) · 2.59 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
cmake_minimum_required(VERSION 2.8)
project(score)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11 -Wall -g -O0 -mcx16 -march=native")
set(EXTERNAL ${CMAKE_CURRENT_SOURCE_DIR}/external)
set(BORINGSSL ${EXTERNAL}/boringssl)
set(GTEST ${EXTERNAL}/googletest)
set(SPDLOG ${EXTERNAL}/spdlog)
set(RE2 ${EXTERNAL}/re2)
set(SCORE_EXTERNAL_INCLUDE_DIRS
${BORINGSSL}/include
# ${RE2}/build/include
${GTEST}/googletest/include
${GTEST}/googlemock/include
)
set(SCORE_EXTERNAL_LINK_DIRS
${BORINGSSL}/build/ssl
${BORINGSSL}/build/crypto
${BORINGSSL}/build/decrepit
# ${RE2}/build
${GTEST}/build/googlemock
)
set(SCORE_COMMON_EXTERNAL_LIBS
iberty
re2
icuuc
icudata
glog
event
ssl
crypto
dl
pthread
gcc_s
atomic
)
set(SCORE_EXTRA_EXTERNAL_LIBS
curl
hiredis
memcached
)
set(SCORE_ALL_EXTERNAL_LIBS ${SCORE_COMMON_EXTERNAL_LIBS} ${SCORE_EXTRA_EXTERNAL_LIBS})
set(SCORE_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(SCORE_ROOT_SRC_DIR ${SCORE_ROOT_DIR}/src)
set(SCORE_ASYNC_DIR ${SCORE_ROOT_DIR}/score_async)
set(SCORE_BENCH_DIR ${SCORE_ROOT_DIR}/score_bench)
set(SCORE_CORE_DIR ${SCORE_ROOT_DIR}/score_core)
set(SCORE_CURL_DIR ${SCORE_ROOT_DIR}/score_curl)
set(SCORE_EXTRACT_DIR ${SCORE_ROOT_DIR}/score_extract)
set(SCORE_HTML_DIR ${SCORE_ROOT_DIR}/score_html)
set(SCORE_MEMCACHED_DIR ${SCORE_ROOT_DIR}/score_memcached)
set(SCORE_NLP_DIR ${SCORE_ROOT_DIR}/score_nlp)
set(SCORE_REDIS_DIR ${SCORE_ROOT_DIR}/score_redis)
set(SCORE_TEST_SUPPORT_DIR ${SCORE_ROOT_DIR}/test_support)
set(SCORE_TEST_RUNNER_FILE ${SCORE_TEST_SUPPORT_DIR}/src/run_tests.cpp)
set(SCORE_BASE_INCLUDE_DIRS
${SCORE_CORE_DIR}/include
${SCORE_EXTERNAL_INCLUDE_DIRS}
)
include_directories(
${SCORE_BASE_INCLUDE_DIRS}
)
link_directories(
${SCORE_EXTERNAL_LINK_DIRS}
)
set(ALL_SCORE_LIBS
score_core
score_memcached
score_bench
score_async
score_redis
score_extract
score_html
score_nlp
score_curl
)
add_subdirectory(${SCORE_ASYNC_DIR})
add_subdirectory(${SCORE_BENCH_DIR})
add_subdirectory(${SCORE_CORE_DIR})
add_subdirectory(${SCORE_CURL_DIR})
add_subdirectory(${SCORE_EXTRACT_DIR})
add_subdirectory(${SCORE_HTML_DIR})
add_subdirectory(${SCORE_MEMCACHED_DIR})
add_subdirectory(${SCORE_NLP_DIR})
add_subdirectory(${SCORE_REDIS_DIR})
set(ALL_SCORE_INCLUDE_DIRS
${SCORE_ASYNC_DIR}/include
${SCORE_MEMCACHED_DIR}/include
${SCORE_BENCH_DIR}/include
${SCORE_CORE_DIR}/include
${SCORE_REDIS_DIR}/include
${SCORE_EXTRACT_DIR}/include
${SCORE_HTML_DIR}/include
${SCORE_NLP_DIR}/include
${SCORE_CURL_DIR}/include
)