forked from ChunelFeng/CGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
61 lines (52 loc) · 1.83 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
message("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
message("* ______ ______ __ *")
message("* / ____/ / ____/ _____ ____ _ ____ / /_ *")
message("* / / / / __ / ___/ / __ `/ / __ \\ / __ \\ *")
message("* / /___ / /_/ / / / / /_/ / / /_/ / / / / / *")
message("* \\____/ \\____/ /_/ \\__,_/ / .___/ /_/ /_/ *")
message("* /_/ by Chunel Feng *")
message("* * * * * * * * * * * * * * * * * * * * * * * * * * * * *")
cmake_minimum_required(VERSION 3.5.0)
project(CGraph VERSION 2.4.1)
# CGraph默认使用C++11版本,推荐使用C++17版本。暂不支持C++11以下版本
set(CMAKE_CXX_STANDARD 11)
# 如果开启此宏定义,则CGraph执行过程中,不会在控制台打印任何信息
# add_definitions(-D_CGRAPH_SILENCE_)
# 对应tutorial中的内容
set(CGRAPH_TUTORIAL_LIST
T00-HelloCGraph
T01-Simple
T02-Cluster
T03-Region
T04-Complex
T05-Param
T06-Condition
T07-MultiPipeline
T08-Template
T09-Aspect
T10-AspectParam
T11-Singleton
T12-Function
T13-Daemon
T14-Hold
T15-ElementParam
T16-MessageSendRecv
T17-MessagePubSub
T18-Event
T19-Cancel
# 以下为工具类tutorial
TU01-ThreadPool
TU02-Lru
TU03-Trie
TU04-Timer
TU05-Distance
)
# add CGraph environment info
include(cmake/CGraph-env-include.cmake)
foreach(tut ${CGRAPH_TUTORIAL_LIST})
add_executable(${tut}
# 在自己的工程中引入CGraph功能,仅需引入 CGraph-env-include.cmake 后,加入这一句话即可
$<TARGET_OBJECTS:CGraph>
tutorial/${tut}.cpp
)
endforeach()