forked from Ableton/link
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
111 lines (95 loc) · 3.18 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 3.0)
project(LinkTest)
# ____
# / ___| ___ _ _ _ __ ___ ___ ___
# \___ \ / _ \| | | | '__/ __/ _ \/ __|
# ___) | (_) | |_| | | | (_| __/\__ \
# |____/ \___/ \__,_|_| \___\___||___/
#
set(link_discovery_test_SOURCES
ableton/discovery/tst_InterfaceScanner.cpp
ableton/discovery/tst_Payload.cpp
ableton/discovery/tst_PeerGateway.cpp
ableton/discovery/tst_PeerGateways.cpp
ableton/discovery/tst_UdpMessenger.cpp
ableton/discovery/v1/tst_Messages.cpp
)
set(link_core_test_SOURCES
ableton/link/tst_Beats.cpp
ableton/link/tst_ClientSessionTimelines.cpp
ableton/link/tst_Controller.cpp
ableton/link/tst_HostTimeFilter.cpp
ableton/link/tst_LinearRegression.cpp
ableton/link/tst_Measurement.cpp
ableton/link/tst_Median.cpp
ableton/link/tst_Peers.cpp
ableton/link/tst_Phase.cpp
ableton/link/tst_PingResponder.cpp
ableton/link/tst_StartStopState.cpp
ableton/link/tst_Tempo.cpp
ableton/link/tst_Timeline.cpp
ableton/link/tst_TripleBuffer.cpp
)
set(link_test_SOURCES
ableton/test/catch/CatchMain.cpp
ableton/test/serial_io/SchedulerTree.cpp
)
# ____ ____
# / ___| ___ _ _ _ __ ___ ___ / ___|_ __ ___ _ _ _ __ ___
# \___ \ / _ \| | | | '__/ __/ _ \ | | _| '__/ _ \| | | | '_ \/ __|
# ___) | (_) | |_| | | | (_| __/ | |_| | | | (_) | |_| | |_) \__ \
# |____/ \___/ \__,_|_| \___\___| \____|_| \___/ \__,_| .__/|___/
# |_|
source_group("Link" FILES
${link_core_HEADERS}
)
source_group("Discovery" FILES
${link_discovery_HEADERS}
)
source_group("Platform" FILES
${link_platform_HEADERS}
)
source_group("Util" FILES
${link_util_HEADERS}
)
source_group("Test Utils" FILES
${link_test_HEADERS}
${link_test_SOURCES}
)
# _____ _
# |_ _|_ _ _ __ __ _ ___| |_ ___
# | |/ _` | '__/ _` |/ _ \ __|/ __|
# | | (_| | | | (_| | __/ |_ \__ \
# |_|\__,_|_| \__, |\___|\__||___/
# |___/
function(configure_link_test_executable target)
target_link_libraries(${target} Catch::Catch Ableton::Link)
target_compile_definitions(${target} PRIVATE -DCATCH_CONFIG_ENABLE_BENCHMARKING=1)
endfunction()
# For the LinkCore test suite, we add header dependencies individually so that
# the source groups above are shown correctly to the project. However, most
# other projects integrating Link won't need this functionality, and they should
# should just depend on ${link_HEADERS}.
add_executable(LinkCoreTest
${link_core_HEADERS}
${link_discovery_HEADERS}
${link_platform_HEADERS}
${link_util_HEADERS}
${link_test_HEADERS}
${link_core_test_SOURCES}
${link_test_SOURCES}
)
configure_link_test_executable(LinkCoreTest)
# For the LinkDiscovery test suite, we only add dependencies on the headers
# necessary to compile these tests, since the Discovery feature should not have
# dependencies on the Link core code. Normal targets should always use
# ${link_HEADERS} for their dependencies.
add_executable(LinkDiscoveryTest
${link_discovery_HEADERS}
${link_platform_HEADERS}
${link_util_HEADERS}
${link_test_HEADERS}
${link_discovery_test_SOURCES}
${link_test_SOURCES}
)
configure_link_test_executable(LinkDiscoveryTest)