OLD | NEW |
1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license | 3 # Use of this source code is governed by a BSD-style license |
4 # that can be found in the LICENSE file in the root of the source | 4 # that can be found in the LICENSE file in the root of the source |
5 # tree. An additional intellectual property rights grant can be found | 5 # tree. An additional intellectual property rights grant can be found |
6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
8 | 8 |
9 if (is_android) { | 9 if (is_android) { |
10 import("//build/config/android/config.gni") | 10 import("//build/config/android/config.gni") |
11 import("//build/config/android/rules.gni") | 11 import("//build/config/android/rules.gni") |
12 } | 12 } |
13 import("//testing/test.gni") | |
14 import("../build/webrtc.gni") | 13 import("../build/webrtc.gni") |
15 | 14 |
16 source_set("system_wrappers") { | 15 rtc_source_set("system_wrappers") { |
17 sources = [ | 16 sources = [ |
18 "include/aligned_array.h", | 17 "include/aligned_array.h", |
19 "include/aligned_malloc.h", | 18 "include/aligned_malloc.h", |
20 "include/atomic32.h", | 19 "include/atomic32.h", |
21 "include/clock.h", | 20 "include/clock.h", |
22 "include/cpu_features_wrapper.h", | 21 "include/cpu_features_wrapper.h", |
23 "include/cpu_info.h", | 22 "include/cpu_info.h", |
24 "include/critical_section_wrapper.h", | 23 "include/critical_section_wrapper.h", |
25 "include/data_log.h", | 24 "include/data_log.h", |
26 "include/data_log_c.h", | 25 "include/data_log_c.h", |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 127 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
129 | 128 |
130 if (is_win) { | 129 if (is_win) { |
131 libs += [ "winmm.lib" ] | 130 libs += [ "winmm.lib" ] |
132 | 131 |
133 cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion. | 132 cflags = [ "/wd4334" ] # Ignore warning on shift operator promotion. |
134 } | 133 } |
135 | 134 |
136 if (is_win && is_clang) { | 135 if (is_win && is_clang) { |
137 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). | 136 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
138 configs -= [ "//build/config/clang:find_bad_constructs" ] | 137 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
139 } | 138 } |
140 | 139 |
141 deps += [ "../base:rtc_base_approved" ] | 140 deps += [ "../base:rtc_base_approved" ] |
142 } | 141 } |
143 | 142 |
144 source_set("field_trial_default") { | 143 rtc_source_set("field_trial_default") { |
145 sources = [ | 144 sources = [ |
146 "include/field_trial_default.h", | 145 "include/field_trial_default.h", |
147 "source/field_trial_default.cc", | 146 "source/field_trial_default.cc", |
148 ] | 147 ] |
149 | 148 |
150 configs += [ "..:common_config" ] | 149 configs += [ "..:common_config" ] |
151 public_configs = [ "..:common_inherited_config" ] | 150 public_configs = [ "..:common_inherited_config" ] |
152 } | 151 } |
153 | 152 |
154 source_set("metrics_default") { | 153 rtc_source_set("metrics_default") { |
155 sources = [ | 154 sources = [ |
156 "include/metrics_default.h", | 155 "include/metrics_default.h", |
157 "source/metrics_default.cc", | 156 "source/metrics_default.cc", |
158 ] | 157 ] |
159 | 158 |
160 configs += [ "..:common_config" ] | 159 configs += [ "..:common_config" ] |
161 public_configs = [ "..:common_inherited_config" ] | 160 public_configs = [ "..:common_inherited_config" ] |
162 } | 161 } |
163 | 162 |
164 source_set("system_wrappers_default") { | 163 rtc_source_set("system_wrappers_default") { |
165 configs += [ "..:common_config" ] | 164 configs += [ "..:common_config" ] |
166 public_configs = [ "..:common_inherited_config" ] | 165 public_configs = [ "..:common_inherited_config" ] |
167 | 166 |
168 deps = [ | 167 deps = [ |
169 ":field_trial_default", | 168 ":field_trial_default", |
170 ":metrics_default", | 169 ":metrics_default", |
171 ":system_wrappers", | 170 ":system_wrappers", |
172 ] | 171 ] |
173 } | 172 } |
174 | 173 |
175 if (is_android) { | 174 if (is_android) { |
176 source_set("cpu_features_android") { | 175 rtc_source_set("cpu_features_android") { |
177 sources = [ | 176 sources = [ |
178 "source/cpu_features_android.c", | 177 "source/cpu_features_android.c", |
179 ] | 178 ] |
180 | 179 |
181 configs += [ "..:common_config" ] | 180 configs += [ "..:common_config" ] |
182 public_configs = [ "..:common_inherited_config" ] | 181 public_configs = [ "..:common_inherited_config" ] |
183 deps = [ | 182 deps = [ |
184 "//third_party/android_tools:cpu_features", | 183 "//third_party/android_tools:cpu_features", |
185 ] | 184 ] |
186 } | 185 } |
187 } | 186 } |
188 | 187 |
189 if (is_linux) { | 188 if (is_linux) { |
190 source_set("cpu_features_linux") { | 189 rtc_source_set("cpu_features_linux") { |
191 sources = [ | 190 sources = [ |
192 "source/cpu_features_linux.c", | 191 "source/cpu_features_linux.c", |
193 ] | 192 ] |
194 | 193 |
195 configs += [ "..:common_config" ] | 194 configs += [ "..:common_config" ] |
196 public_configs = [ "..:common_inherited_config" ] | 195 public_configs = [ "..:common_inherited_config" ] |
197 } | 196 } |
198 } | 197 } |
199 | 198 |
200 if (rtc_include_tests) { | 199 if (rtc_include_tests) { |
201 test("system_wrappers_unittests") { | 200 rtc_test("system_wrappers_unittests") { |
202 testonly = true | 201 testonly = true |
203 sources = [ | 202 sources = [ |
204 "source/aligned_array_unittest.cc", | 203 "source/aligned_array_unittest.cc", |
205 "source/aligned_malloc_unittest.cc", | 204 "source/aligned_malloc_unittest.cc", |
206 "source/clock_unittest.cc", | 205 "source/clock_unittest.cc", |
207 "source/condition_variable_unittest.cc", | 206 "source/condition_variable_unittest.cc", |
208 "source/critical_section_unittest.cc", | 207 "source/critical_section_unittest.cc", |
209 "source/data_log_c_helpers_unittest.c", | 208 "source/data_log_c_helpers_unittest.c", |
210 "source/data_log_c_helpers_unittest.h", | 209 "source/data_log_c_helpers_unittest.h", |
211 "source/data_log_helpers_unittest.cc", | 210 "source/data_log_helpers_unittest.cc", |
(...skipping 14 matching lines...) Expand all Loading... |
226 } | 225 } |
227 | 226 |
228 configs += [ "..:common_config" ] | 227 configs += [ "..:common_config" ] |
229 public_configs = [ "..:common_inherited_config" ] | 228 public_configs = [ "..:common_inherited_config" ] |
230 | 229 |
231 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 230 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
232 | 231 |
233 if (is_clang) { | 232 if (is_clang) { |
234 # Suppress warnings from Chrome's Clang plugins. | 233 # Suppress warnings from Chrome's Clang plugins. |
235 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | 234 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
236 configs -= [ "//build/config/clang:find_bad_constructs" ] | 235 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
237 } | 236 } |
238 | 237 |
239 deps = [ | 238 deps = [ |
240 ":metrics_default", | 239 ":metrics_default", |
241 ":system_wrappers", | 240 ":system_wrappers", |
242 "../test:test_support_main", | 241 "../test:test_support_main", |
243 "//testing/gtest", | 242 "//testing/gtest", |
244 ] | 243 ] |
245 | 244 |
246 if (is_android) { | 245 if (is_android) { |
247 deps += [ "//testing/android/native_test:native_test_support" ] | 246 deps += [ "//testing/android/native_test:native_test_support" ] |
248 | 247 |
249 shard_timeout = 900 | 248 shard_timeout = 900 |
250 } | 249 } |
251 } | 250 } |
252 } | 251 } |
OLD | NEW |