-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
190 lines (172 loc) · 4.32 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
#
# Copyright (C) 2024 EA group inc.
# Author: Jeff.li [email protected]
# All rights reserved.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
#[[carbin_cc_test(
NAME custom_comparator_test
SOURCES custom_comparator_test.cc
DEPS turbo::turbo ${CARBIN_DEPS_LINK} ${GTEST_LIB} ${GTEST_MAIN_LIB}
COPTS ${USER_CXX_FLAGS}
)]]
#[[
carbin_cc_test(
NAME foo_test
SOURCES foo_test.cc
DEPS changeme::foo ${CARBIN_DEPS_LINK} gtest gtest_main
COPTS ${USER_CXX_FLAGS}
)
carbin_cc_test(
NAME foo_doctest
SOURCES foo_doctest.cc
DEPS changeme::foo ${CARBIN_DEPS_LINK} doctest
COPTS ${USER_CXX_FLAGS}
)
]]
#[[
carbin_cc_test(
NAME raw_test
MODULE base
SOURCES raw_test.cc
)
carbin_cc_test(
NAME pass_test
MODULE base
SOURCES pass_test.cc
EXT
)
# base_pass_test_1
carbin_cc_test_ext(
NAME pass_test
MODULE base
ALIAS 1
PASS_EXP "pass;Passed"
)
# base_pass_test_2
carbin_cc_test_ext(
NAME pass_test
MODULE base
ALIAS 2
PASS_EXP "pass;Passed"
)
# base_pass_test_foo
carbin_cc_test_ext(
NAME pass_test
MODULE base
ALIAS foo
PASS_EXP "pass;Passed"
)
# base_pass_test_bar not run
carbin_cc_test_ext(
NAME pass_test
MODULE base
ALIAS bar
PASS_EXP "pass;Passed"
DISABLED
)
carbin_cc_test(
NAME args_test
MODULE base
SOURCES args_test.cc
EXT
)
# base_args_test_fail fail
carbin_cc_test_ext(
NAME args_test
MODULE base
ALIAS fail
FAIL_EXP "[^a-z]Error;ERROR;Failed"
)
# base_args_test_fail fail
carbin_cc_test_ext(
NAME args_test
MODULE base
ALIAS fail_args
ARGS "Failed"
FAIL_EXP "[^a-z]Error;ERROR;Failed"
)
# base_args_test_skip fail
carbin_cc_test_ext(
NAME args_test
MODULE base
ALIAS skip_fail
PASS_EXP "pass;Passed"
FAIL_EXP "[^a-z]Error;ERROR;Failed"
SKIP_EXP "[^a-z]Skip" "SKIP" "Skipped"
)
# base_args_test_skip fail
carbin_cc_test_ext(
NAME args_test
MODULE base
ALIAS skip
ARGS "SKIP"
PASS_EXP "pass;Passed"
FAIL_EXP "[^a-z]Error;ERROR;Failed"
SKIP_EXP "[^a-z]Skip" "SKIP" "Skipped"
)
# base_args_test_skip fail
carbin_cc_test_ext(
NAME args_test
MODULE base
ALIAS skip_pass
ARGS "Passed"
PASS_EXP "pass;Passed"
FAIL_EXP "[^a-z]Error;ERROR;Failed"
SKIP_EXP "[^a-z]Skip" "SKIP" "Skipped"
)
# base_args_test_skip fail
carbin_cc_test_ext(
NAME args_test
MODULE base
ALIAS skip_diabled
ARGS "Passed"
PASS_EXP "pass;Passed"
FAIL_EXP "[^a-z]Error;ERROR;Failed"
SKIP_EXP "[^a-z]Skip" "SKIP" "Skipped"
DISABLED
)
carbin_cc_test(
NAME raw_test
MODULE norun
SOURCES raw_test.cc
)
]]
list(APPEND CMAKE_PREFIX_PATH "/opt/EA/inf")
find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIR})
set(GTEST_LIB GTest::gtest)
set(GTEST_MAIN_LIB GTest::gtest_main)
set(GMOCK_LIB GTest::gmock)
set(GMOCK_MAIN_LIB GTest::gmock_main)
set(GTM_LIB GTest::gtest GTest::gmock GTest::gtest_main)
add_subdirectory(algorithm)
add_subdirectory(base)
add_subdirectory(cleanup)
add_subdirectory(container)
add_subdirectory(crypto)
add_subdirectory(debugging)
add_subdirectory(flags)
add_subdirectory(functional)
add_subdirectory(hash)
add_subdirectory(log)
add_subdirectory(memory)
add_subdirectory(meta)
add_subdirectory(numeric)
add_subdirectory(profile)
add_subdirectory(random)
add_subdirectory(strings)
add_subdirectory(synchronization)
add_subdirectory(times)
add_subdirectory(utility)