blob: 3e197ed0966d8389722d7e1ce650f16d37a17e98 [file] [log] [blame]
kjellander@webrtc.org851a09e2014-06-17 08:54:031# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2#
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
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
kjellander@webrtc.org7497fa72014-06-28 18:05:229# TODO(kjellander): Rebase this to webrtc/build/common.gypi changes after r6330.
10
kjellander@webrtc.org851a09e2014-06-17 08:54:0311import("//build/config/linux/pkg_config.gni")
Peter Boström62e9bda2015-11-23 14:12:0612import("//build/config/sanitizers/sanitizers.gni")
kjellander@webrtc.org851a09e2014-06-17 08:54:0313import("build/webrtc.gni")
kjellander@webrtc.org3ee56142016-06-03 13:57:0214import("//testing/test.gni")
Bjorn Terelius36411852015-07-30 10:45:1815import("//third_party/protobuf/proto_library.gni")
kjellander@webrtc.org851a09e2014-06-17 08:54:0316
17# Contains the defines and includes in common.gypi that are duplicated both as
18# target_defaults and direct_dependent_settings.
19config("common_inherited_config") {
20 defines = []
Johan Ahlers9ddac182016-07-22 06:57:2321 cflags = []
22 ldflags = []
kjellander@webrtc.org851a09e2014-06-17 08:54:0323 if (build_with_mozilla) {
24 defines += [ "WEBRTC_MOZILLA_BUILD" ]
25 }
26 if (build_with_chromium) {
kjellanderf0e174a2016-05-30 13:27:5027 defines = [
28 # TODO(kjellander): Cleanup unused ones and move defines closer to
29 # the source when webrtc:4256 is completed.
30 "FEATURE_ENABLE_SSL",
31 "FEATURE_ENABLE_VOICEMAIL",
32 "EXPAT_RELATIVE_PATH",
33 "GTEST_RELATIVE_PATH",
34 "NO_MAIN_THREAD_WRAPPING",
35 "NO_SOUND_SYSTEM",
36 "WEBRTC_CHROMIUM_BUILD",
37 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:0338 include_dirs = [
henrikgee2bf412015-09-30 10:48:5239 # The overrides must be included first as that is the mechanism for
kjellander@webrtc.org851a09e2014-06-17 08:54:0340 # selecting the override headers in Chromium.
henrikgee2bf412015-09-30 10:48:5241 "../webrtc_overrides",
Henrik Kjellander57e5fd22015-05-25 10:55:3942
kjellander@webrtc.org851a09e2014-06-17 08:54:0343 # Allow includes to be prefixed with webrtc/ in case it is not an
44 # immediate subdirectory of the top-level.
45 "..",
46 ]
47 }
48 if (is_posix) {
49 defines += [ "WEBRTC_POSIX" ]
50 }
51 if (is_ios) {
52 defines += [
53 "WEBRTC_MAC",
54 "WEBRTC_IOS",
55 ]
56 }
Zeke Chin71f6f442015-06-29 21:34:5857 if (is_ios && rtc_use_objc_h264) {
58 defines += [ "WEBRTC_OBJC_H264" ]
59 }
kjellander@webrtc.org851a09e2014-06-17 08:54:0360 if (is_linux) {
61 defines += [ "WEBRTC_LINUX" ]
62 }
63 if (is_mac) {
64 defines += [ "WEBRTC_MAC" ]
65 }
66 if (is_win) {
kjellanderf0e174a2016-05-30 13:27:5067 defines += [
68 "WEBRTC_WIN",
69 "_CRT_SECURE_NO_WARNINGS", # Suppress warnings about _vsnprinf
70 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:0371 }
72 if (is_android) {
73 defines += [
74 "WEBRTC_LINUX",
75 "WEBRTC_ANDROID",
76 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:0377 }
kjellanderf0e174a2016-05-30 13:27:5078 if (is_chromeos) {
79 defines += [ "CHROMEOS" ]
80 }
81
Johan Ahlers9ddac182016-07-22 06:57:2382 if (rtc_sanitize_coverage != "") {
83 assert(is_clang, "sanitizer coverage requires clang")
84 cflags += [ "-fsanitize-coverage=${rtc_sanitize_coverage}" ]
85 ldflags += [ "-fsanitize-coverage=${rtc_sanitize_coverage}" ]
86 }
87
kjellanderf0e174a2016-05-30 13:27:5088 # TODO(GYP): Support these in GN.
89 # if (is_bsd) {
90 # defines += [ "BSD" ]
91 # }
92 # if (is_openbsd) {
93 # defines += [ "OPENBSD" ]
94 # }
95 # if (is_freebsd) {
96 # defines += [ "FREEBSD" ]
97 # }
kjellander@webrtc.org851a09e2014-06-17 08:54:0398}
99
kjellander@webrtc.org6d08ca62014-09-07 17:36:10100if (rtc_have_dbus_glib) {
kjellander@webrtc.org7497fa72014-06-28 18:05:22101 pkg_config("dbus-glib") {
102 packages = [ "dbus-glib-1" ]
103 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03104}
105
106config("common_config") {
kjellander@webrtc.org79ee97c2014-09-04 14:10:49107 cflags = []
108 cflags_cc = []
kjellanderf0e174a2016-05-30 13:27:50109 defines = []
110
kjellander@webrtc.org6d08ca62014-09-07 17:36:10111 if (rtc_restrict_logging) {
kjellanderf0e174a2016-05-30 13:27:50112 defines += [ "WEBRTC_RESTRICT_LOGGING" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03113 }
114
kjellander82a94492016-06-13 05:12:01115 if (rtc_include_internal_audio_device) {
116 defines += [ "WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE" ]
117 }
118
kjellander@webrtc.org6d08ca62014-09-07 17:36:10119 if (rtc_have_dbus_glib) {
kjellander@webrtc.org851a09e2014-06-17 08:54:03120 defines += [ "HAVE_DBUS_GLIB" ]
Henrik Kjellander57e5fd22015-05-25 10:55:39121
kjellander@webrtc.org851a09e2014-06-17 08:54:03122 # TODO(kjellander): Investigate this, it seems like include <dbus/dbus.h>
123 # is still not found even if the execution of
124 # build/config/linux/pkg-config.py dbus-glib-1 returns correct include
125 # dirs on Linux.
126 all_dependent_configs = [ "dbus-glib" ]
127 }
128
kjellanderc76dc952016-06-03 10:09:32129 if (rtc_relative_path) {
130 defines += [ "EXPAT_RELATIVE_PATH" ]
131 }
132
brettw@chromium.org9fe11012014-09-09 19:15:33133 if (build_with_chromium) {
kjellanderf0e174a2016-05-30 13:27:50134 defines += [
135 # NOTICE: Since common_inherited_config is used in public_configs for our
136 # targets, there's no point including the defines in that config here.
137 # TODO(kjellander): Cleanup unused ones and move defines closer to the
138 # source when webrtc:4256 is completed.
139 "ENABLE_EXTERNAL_AUTH",
140 "HAVE_OPENSSL_SSL_H",
141 "HAVE_SCTP",
142 "HAVE_SRTP",
143 "HAVE_WEBRTC_VIDEO",
144 "HAVE_WEBRTC_VOICE",
145 "LOGGING_INSIDE_WEBRTC",
146 "SRTP_RELATIVE_PATH",
147 "SSL_USE_OPENSSL",
148 "USE_WEBRTC_DEV_BRANCH",
149 ]
brettw@chromium.org9fe11012014-09-09 19:15:33150 } else {
kjellander@webrtc.org851a09e2014-06-17 08:54:03151 if (is_posix) {
152 # -Wextra is currently disabled in Chromium"s common.gypi. Enable
153 # for targets that can handle it. For Android/arm64 right now
154 # there will be an "enumeral and non-enumeral type in conditional
155 # expression" warning in android_tools/ndk_experimental"s version
156 # of stlport.
157 # See: https://code.google.com/p/chromium/issues/detail?id=379699
kjellander@webrtc.org72273912015-02-23 19:08:31158 if (current_cpu != "arm64" || !is_android) {
kjellander@webrtc.org851a09e2014-06-17 08:54:03159 cflags = [
160 "-Wextra",
Henrik Kjellander57e5fd22015-05-25 10:55:39161
kjellander@webrtc.org851a09e2014-06-17 08:54:03162 # We need to repeat some flags from Chromium"s common.gypi
163 # here that get overridden by -Wextra.
164 "-Wno-unused-parameter",
165 "-Wno-missing-field-initializers",
166 "-Wno-strict-overflow",
167 ]
168 cflags_cc = [
169 "-Wnon-virtual-dtor",
Henrik Kjellander57e5fd22015-05-25 10:55:39170
kjellander@webrtc.org851a09e2014-06-17 08:54:03171 # This is enabled for clang; enable for gcc as well.
172 "-Woverloaded-virtual",
173 ]
174 }
175 }
176
177 if (is_clang) {
kjellander3f032cf2016-04-27 14:13:46178 cflags += [
179 "-Wimplicit-fallthrough",
180 "-Wthread-safety",
nisse4996eaa2016-05-11 06:28:10181 "-Winconsistent-missing-override",
kjellander3f032cf2016-04-27 14:13:46182 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03183 }
184 }
185
kjellander@webrtc.org72273912015-02-23 19:08:31186 if (current_cpu == "arm64") {
Andrew MacDonaldcb7f8ce2015-05-20 05:20:17187 defines += [ "WEBRTC_ARCH_ARM64" ]
188 defines += [ "WEBRTC_HAS_NEON" ]
tkchin@webrtc.org14146e42014-10-31 00:14:39189 }
190
kjellander@webrtc.org72273912015-02-23 19:08:31191 if (current_cpu == "arm") {
kjellander@webrtc.org851a09e2014-06-17 08:54:03192 defines += [ "WEBRTC_ARCH_ARM" ]
andrew@webrtc.orga56a2c52014-11-26 17:01:40193 if (arm_version >= 7) {
kjellander@webrtc.org851a09e2014-06-17 08:54:03194 defines += [ "WEBRTC_ARCH_ARM_V7" ]
195 if (arm_use_neon) {
Andrew MacDonaldcb7f8ce2015-05-20 05:20:17196 defines += [ "WEBRTC_HAS_NEON" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03197 }
198 }
199 }
200
kjellander@webrtc.org72273912015-02-23 19:08:31201 if (current_cpu == "mipsel") {
kjellander@webrtc.org851a09e2014-06-17 08:54:03202 defines += [ "MIPS32_LE" ]
kjellander@webrtc.org6dab6d72015-03-04 09:50:31203 if (mips_float_abi == "hard") {
kjellander@webrtc.org851a09e2014-06-17 08:54:03204 defines += [ "MIPS_FPU_LE" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03205 }
kjellander@webrtc.orgacb80852015-01-25 19:17:56206 if (mips_arch_variant == "r2") {
kjellander@webrtc.org851a09e2014-06-17 08:54:03207 defines += [ "MIPS32_R2_LE" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03208 }
209 if (mips_dsp_rev == 1) {
210 defines += [ "MIPS_DSP_R1_LE" ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03211 } else if (mips_dsp_rev == 2) {
212 defines += [
213 "MIPS_DSP_R1_LE",
214 "MIPS_DSP_R2_LE",
215 ]
kjellander@webrtc.org851a09e2014-06-17 08:54:03216 }
217 }
218
Henrik Kjellanderc0c7d2e2015-09-07 10:57:42219 if (is_android && !is_clang) {
Henrik Kjellander5bfc6cb2015-09-21 14:50:45220 # The Android NDK doesn"t provide optimized versions of these
221 # functions. Ensure they are disabled for all compilers.
kjellander@webrtc.org851a09e2014-06-17 08:54:03222 cflags += [
223 "-fno-builtin-cos",
224 "-fno-builtin-sin",
225 "-fno-builtin-cosf",
226 "-fno-builtin-sinf",
227 ]
228 }
katrielcbf81d682016-05-26 08:03:02229
metzmanf89a5712016-07-25 09:14:09230 if (use_libfuzzer || use_drfuzz || use_afl) {
katrielcbf81d682016-05-26 08:03:02231 # Used in Chromium's overrides to disable logging
232 defines += [ "WEBRTC_UNSAFE_FUZZER_MODE" ]
233 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03234}
235
kjellander3bcedd32016-06-08 08:14:15236config("common_objc") {
237 cflags = [ "-Wobjc-missing-property-synthesis" ]
238
239 precompiled_header = "sdk/objc/WebRTC-Prefix.pch"
240 precompiled_source = "sdk/objc/WebRTC-Prefix.pch"
241}
242
kjellander@webrtc.org14ea50a2014-11-12 07:56:21243source_set("webrtc") {
kjellander@webrtc.org1227ab82014-06-23 19:21:07244 sources = [
245 "call.h",
kjellander84f8df72016-05-18 12:00:50246 "config.h",
kjellander7324eb92016-02-25 16:36:42247 "transport.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07248 ]
249
Bjorn Terelius36411852015-07-30 10:45:18250 defines = []
kjellander@webrtc.orgf21ea912014-09-28 17:37:22251 configs += [ ":common_config" ]
Henrik Kjellander57e5fd22015-05-25 10:55:39252 public_configs = [ ":common_inherited_config" ]
kjellander@webrtc.org9bef5512014-07-13 09:02:54253
kjellander@webrtc.org851a09e2014-06-17 08:54:03254 deps = [
Henrik Kjellanderc4ef1432015-10-26 16:39:11255 ":webrtc_common",
Peter Boström62e9bda2015-11-23 14:12:06256 "audio",
kjellander@webrtc.orgc429b822015-01-21 20:22:33257 "base:rtc_base",
Peter Boström5c389d32015-09-25 11:58:30258 "call",
kjellander@webrtc.org1227ab82014-06-23 19:21:07259 "common_audio",
260 "common_video",
kjellanderfb114242016-06-13 07:19:48261 "modules",
kjellander@webrtc.org78f440c2014-06-21 14:25:16262 "system_wrappers",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02263 "tools",
kjellander@webrtc.org1227ab82014-06-23 19:21:07264 "video",
kjellander@webrtc.org1227ab82014-06-23 19:21:07265 "voice_engine",
266 ]
kjellander@webrtc.orgf58fe0a2015-02-11 07:47:00267
268 if (build_with_chromium) {
nisseb99395a2016-04-29 07:58:42269 deps += [ "modules/video_capture" ]
kjellander94cee312016-06-10 08:56:57270 } else {
271 # TODO(kjellander): Enable for Chromium as well when bugs.webrtc.org/4256 is
272 # fixed. Right now it's not possible due to circular dependencies.
273 deps += [
274 "api",
275 "media",
276 "p2p",
277 "pc",
278 ]
kjellander@webrtc.orgf58fe0a2015-02-11 07:47:00279 }
Bjorn Terelius36411852015-07-30 10:45:18280
281 if (rtc_enable_protobuf) {
282 defines += [ "ENABLE_RTC_EVENT_LOG" ]
283 deps += [ ":rtc_event_log_proto" ]
284 }
kjellander@webrtc.org1227ab82014-06-23 19:21:07285}
286
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02287if (!build_with_chromium) {
288 executable("webrtc_tests") {
289 testonly = true
290 deps = [
291 ":webrtc",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02292 "modules/video_capture:video_capture_internal_impl",
293 "test",
294 ]
295 }
296}
297
kjellander@webrtc.org1227ab82014-06-23 19:21:07298source_set("webrtc_common") {
299 sources = [
kjellander@webrtc.org50772f12016-02-29 05:49:43300 "audio_sink.h",
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22301 "common_types.cc",
kjellander@webrtc.orgd7e34e12015-01-26 19:17:26302 "common_types.h",
kjellander@webrtc.org1227ab82014-06-23 19:21:07303 "config.cc",
Henrik Kjellander57e5fd22015-05-25 10:55:39304 "config.h",
kjellander@webrtc.orgd7e34e12015-01-26 19:17:26305 "engine_configurations.h",
306 "typedefs.h",
kjellander@webrtc.org851a09e2014-06-17 08:54:03307 ]
kjellander@webrtc.org9bef5512014-07-13 09:02:54308
kjellander@webrtc.orgf21ea912014-09-28 17:37:22309 configs += [ ":common_config" ]
310 public_configs = [ ":common_inherited_config" ]
aluebs688e3082016-01-14 12:32:46311
312 if (is_clang && !is_nacl) {
313 # Suppress warnings from Chrome's Clang plugins.
314 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
315 configs -= [ "//build/config/clang:find_bad_constructs" ]
316 }
kjellander@webrtc.org851a09e2014-06-17 08:54:03317}
kjellander@webrtc.orgd7e34e12015-01-26 19:17:26318
Bjorn Terelius36411852015-07-30 10:45:18319if (rtc_enable_protobuf) {
320 proto_library("rtc_event_log_proto") {
321 sources = [
Peter Boström5c389d32015-09-25 11:58:30322 "call/rtc_event_log.proto",
Bjorn Terelius36411852015-07-30 10:45:18323 ]
Peter Boström5c389d32015-09-25 11:58:30324 proto_out_dir = "webrtc/call"
Bjorn Terelius36411852015-07-30 10:45:18325 }
326}
327
328source_set("rtc_event_log") {
329 sources = [
Peter Boström5c389d32015-09-25 11:58:30330 "call/rtc_event_log.cc",
331 "call/rtc_event_log.h",
terelius4311ba52016-04-22 19:40:37332 "call/rtc_event_log_helper_thread.cc",
333 "call/rtc_event_log_helper_thread.h",
Bjorn Terelius36411852015-07-30 10:45:18334 ]
335
336 defines = []
337 configs += [ ":common_config" ]
338 public_configs = [ ":common_inherited_config" ]
339
340 deps = [
341 ":webrtc_common",
342 ]
343
344 if (rtc_enable_protobuf) {
345 defines += [ "ENABLE_RTC_EVENT_LOG" ]
346 deps += [ ":rtc_event_log_proto" ]
347 }
sergeyu4df08ff2015-09-02 21:22:40348 if (is_clang && !is_nacl) {
Bjorn Terelius36411852015-07-30 10:45:18349 # Suppress warnings from Chrome's Clang plugins.
350 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
351 configs -= [ "//build/config/clang:find_bad_constructs" ]
352 }
353}
Peter Boström62e9bda2015-11-23 14:12:06354
tereliusd5c1a0b2016-05-13 07:42:59355if (rtc_enable_protobuf) {
356 source_set("rtc_event_log_parser") {
357 sources = [
358 "call/rtc_event_log_parser.cc",
359 "call/rtc_event_log_parser.h",
360 ]
361
362 configs += [ ":common_config" ]
363 public_configs = [ ":common_inherited_config" ]
364
terelius54ce6802016-07-13 13:44:41365 public_deps = [
tereliusd5c1a0b2016-05-13 07:42:59366 ":rtc_event_log_proto",
367 ":webrtc_common",
368 ]
369
370 if (is_clang && !is_nacl) {
371 # Suppress warnings from Chrome's Clang plugins.
372 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
373 configs -= [ "//build/config/clang:find_bad_constructs" ]
374 }
375 }
376}
377
metzmanf89a5712016-07-25 09:14:09378if (use_libfuzzer || use_drfuzz || use_afl) {
Peter Boström1e0cfd92015-12-17 13:28:16379 # This target is only here for gn to discover fuzzer build targets under
380 # webrtc/test/fuzzers/.
381 group("webrtc_fuzzers_dummy") {
Peter Boström62e9bda2015-11-23 14:12:06382 testonly = true
383 deps = [
Peter Boström1e0cfd92015-12-17 13:28:16384 "test/fuzzers:webrtc_fuzzer_main",
Peter Boström62e9bda2015-11-23 14:12:06385 ]
386 }
387}
kjellander@webrtc.org3ee56142016-06-03 13:57:02388
kjellander@webrtc.orgaff499c92016-06-06 21:04:31389if (rtc_include_tests) {
kjellander@webrtc.org3ee56142016-06-03 13:57:02390 config("rtc_unittests_config") {
391 # GN orders flags on a target before flags from configs. The default config
392 # adds -Wall, and this flag have to be after -Wall -- so they need to
393 # come from a config and can"t be on the target directly.
394 if (is_clang) {
395 cflags = [
396 "-Wno-missing-braces",
397 "-Wno-sign-compare",
398 "-Wno-unused-const-variable",
399 ]
400 }
401 }
402
403 test("rtc_unittests") {
404 testonly = true
405 sources = [
406 "base/array_view_unittest.cc",
407 "base/atomicops_unittest.cc",
408 "base/autodetectproxy_unittest.cc",
409 "base/bandwidthsmoother_unittest.cc",
410 "base/base64_unittest.cc",
411 "base/basictypes_unittest.cc",
412 "base/bind_unittest.cc",
413 "base/bitbuffer_unittest.cc",
414 "base/buffer_unittest.cc",
415 "base/bufferqueue_unittest.cc",
416 "base/bytebuffer_unittest.cc",
417 "base/byteorder_unittest.cc",
418 "base/callback_unittest.cc",
419 "base/copyonwritebuffer_unittest.cc",
420 "base/crc32_unittest.cc",
421 "base/criticalsection_unittest.cc",
422 "base/event_tracer_unittest.cc",
423 "base/event_unittest.cc",
424 "base/exp_filter_unittest.cc",
kjellander@webrtc.org3ee56142016-06-03 13:57:02425 "base/filerotatingstream_unittest.cc",
426 "base/fileutils_unittest.cc",
427 "base/helpers_unittest.cc",
428 "base/httpbase_unittest.cc",
429 "base/httpcommon_unittest.cc",
430 "base/httpserver_unittest.cc",
431 "base/ipaddress_unittest.cc",
432 "base/logging_unittest.cc",
433 "base/md5digest_unittest.cc",
434 "base/messagedigest_unittest.cc",
435 "base/messagequeue_unittest.cc",
436 "base/mod_ops_unittest.cc",
437 "base/multipart_unittest.cc",
438 "base/nat_unittest.cc",
439 "base/network_unittest.cc",
440 "base/onetimeevent_unittest.cc",
441 "base/optional_unittest.cc",
442 "base/optionsfile_unittest.cc",
443 "base/pathutils_unittest.cc",
444 "base/platform_thread_unittest.cc",
445 "base/profiler_unittest.cc",
446 "base/proxy_unittest.cc",
447 "base/proxydetect_unittest.cc",
448 "base/random_unittest.cc",
sprangcd349d92016-07-13 16:11:28449 "base/rate_limiter_unittest.cc",
kjellander@webrtc.org3ee56142016-06-03 13:57:02450 "base/rate_statistics_unittest.cc",
451 "base/ratelimiter_unittest.cc",
452 "base/ratetracker_unittest.cc",
453 "base/referencecountedsingletonfactory_unittest.cc",
454 "base/rollingaccumulator_unittest.cc",
455 "base/rtccertificate_unittest.cc",
456 "base/rtccertificategenerator_unittest.cc",
457 "base/scopedptrcollection_unittest.cc",
perkj9c16fe82016-07-12 22:04:07458 "base/sequenced_task_checker_unittest.cc",
kjellander@webrtc.org3ee56142016-06-03 13:57:02459 "base/sha1digest_unittest.cc",
460 "base/sharedexclusivelock_unittest.cc",
461 "base/signalthread_unittest.cc",
462 "base/sigslot_unittest.cc",
463 "base/sigslottester.h",
464 "base/sigslottester.h.pump",
465 "base/stream_unittest.cc",
466 "base/stringencode_unittest.cc",
467 "base/stringutils_unittest.cc",
468 "base/swap_queue_unittest.cc",
469
470 # TODO(ronghuawu): Reenable this test.
471 # "systeminfo_unittest.cc",
472 "base/task_queue_unittest.cc",
473 "base/task_unittest.cc",
474 "base/testclient_unittest.cc",
475 "base/thread_checker_unittest.cc",
476 "base/thread_unittest.cc",
nisse191b3592016-06-22 15:36:53477 "base/timestampaligner_unittest.cc",
kjellander@webrtc.org3ee56142016-06-03 13:57:02478 "base/timeutils_unittest.cc",
479 "base/urlencode_unittest.cc",
480 "base/versionparsing_unittest.cc",
481
482 # TODO(ronghuawu): Reenable this test.
483 # "windowpicker_unittest.cc",
484 "p2p/base/dtlstransportchannel_unittest.cc",
485 "p2p/base/fakeportallocator.h",
486 "p2p/base/faketransportcontroller.h",
487 "p2p/base/p2ptransportchannel_unittest.cc",
488 "p2p/base/port_unittest.cc",
489 "p2p/base/portallocator_unittest.cc",
490 "p2p/base/pseudotcp_unittest.cc",
491 "p2p/base/relayport_unittest.cc",
492 "p2p/base/relayserver_unittest.cc",
493 "p2p/base/stun_unittest.cc",
494 "p2p/base/stunport_unittest.cc",
495 "p2p/base/stunrequest_unittest.cc",
496 "p2p/base/stunserver_unittest.cc",
497 "p2p/base/tcpport_unittest.cc",
498 "p2p/base/testrelayserver.h",
499 "p2p/base/teststunserver.h",
500 "p2p/base/testturnserver.h",
501 "p2p/base/transport_unittest.cc",
502 "p2p/base/transportcontroller_unittest.cc",
503 "p2p/base/transportdescriptionfactory_unittest.cc",
504 "p2p/base/turnport_unittest.cc",
505 "p2p/client/basicportallocator_unittest.cc",
506 "p2p/stunprober/stunprober_unittest.cc",
507 ]
508
509 if (is_linux) {
510 sources += [
511 "base/latebindingsymboltable_unittest.cc",
512
513 # TODO(ronghuawu): Reenable this test.
514 # "linux_unittest.cc",
515 "base/linuxfdwalk_unittest.cc",
516 ]
517 }
518
519 if (is_win) {
520 sources += [
521 "base/win32_unittest.cc",
522 "base/win32regkey_unittest.cc",
523 "base/win32window_unittest.cc",
524 "base/win32windowpicker_unittest.cc",
525 "base/winfirewall_unittest.cc",
526 ]
527 }
528
529 if (is_mac) {
530 sources += [ "base/macutils_unittest.cc" ]
531 }
532
533 if (is_posix) {
534 sources += [
535 "base/ssladapter_unittest.cc",
536 "base/sslidentity_unittest.cc",
537 "base/sslstreamadapter_unittest.cc",
538 ]
539 }
540 if (is_ios || (is_mac && target_cpu != "x86")) {
541 defines = [ "CARBON_DEPRECATED=YES" ]
542 }
543
544 if (rtc_use_quic) {
545 sources += [
546 "p2p/quic/quicconnectionhelper_unittest.cc",
547 "p2p/quic/quicsession_unittest.cc",
548 "p2p/quic/quictransport_unittest.cc",
549 "p2p/quic/quictransportchannel_unittest.cc",
550 "p2p/quic/reliablequicstream_unittest.cc",
551 ]
552 }
553
554 configs += [
555 ":common_config",
556 ":rtc_unittests_config",
557 ]
558 public_configs = [ ":common_inherited_config" ]
559
560 if (is_clang) {
561 # Suppress warnings from the Chromium Clang plugin.
562 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
563 configs -= [ "//build/config/clang:find_bad_constructs" ]
564 }
565
566 deps = [
567 "base:rtc_base",
kjellander82a94492016-06-13 05:12:01568 "base:rtc_base_tests_utils",
kjellander@webrtc.org3ee56142016-06-03 13:57:02569 "base:rtc_task_queue",
570 "p2p:libstunprober",
571 "p2p:rtc_p2p",
572 "//testing/gmock",
573 "//testing/gtest",
574 ]
575
576 if (is_android) {
577 deps += [ "//testing/android/native_test:native_test_support" ]
578 }
kjellander3bcedd32016-06-08 08:14:15579
580 if (is_ios || (is_mac && mac_deployment_target == "10.7")) {
581 deps += [
582 "sdk:rtc_sdk_peerconnection_objc",
583 "system_wrappers:system_wrappers_default",
584 ]
585 sources += [
586 "sdk/objc/Framework/UnitTests/RTCConfigurationTest.mm",
587 "sdk/objc/Framework/UnitTests/RTCDataChannelConfigurationTest.mm",
588 "sdk/objc/Framework/UnitTests/RTCIceCandidateTest.mm",
589 "sdk/objc/Framework/UnitTests/RTCIceServerTest.mm",
590 "sdk/objc/Framework/UnitTests/RTCMediaConstraintsTest.mm",
591 "sdk/objc/Framework/UnitTests/RTCSessionDescriptionTest.mm",
592 ]
593
594 # TODO(tkchin): Cleanup this warning.
595 cflags = [ "-Wno-objc-property-no-attribute" ]
596
597 # |-ObjC| flag needed to make sure category method implementations
598 # are included:
599 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
600 ldflags = [ "-ObjC" ]
601 }
kjellander@webrtc.org3ee56142016-06-03 13:57:02602 }
Peter Boström02083222016-06-14 10:52:54603
604 # TODO(pbos): Rename test suite, this is no longer "just" for video targets.
605 test("video_engine_tests") {
606 testonly = true
607 deps = [
608 "audio:audio_tests",
609 "call:call_tests",
610 "modules/video_capture",
611 "test:test_common",
612 "test:test_main",
613 "video:video_tests",
614 ]
615 if (is_clang) {
616 # Suppress warnings from the Chromium Clang plugin.
617 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
618 configs -= [ "//build/config/clang:find_bad_constructs" ]
619 }
620 }
Peter Boströmac968bd2016-06-27 17:31:39621
622 test("webrtc_nonparallel_tests") {
623 testonly = true
624 configs += [
625 ":common_config",
626 ":rtc_unittests_config",
627 ]
628 public_configs = [ ":common_inherited_config" ]
629 sources = [
630 "base/nullsocketserver_unittest.cc",
631 "base/physicalsocketserver_unittest.cc",
632 "base/socket_unittest.cc",
633 "base/socket_unittest.h",
634 "base/socketaddress_unittest.cc",
635 "base/virtualsocket_unittest.cc",
636 ]
637 deps = [
638 "base:rtc_base",
639 "base:rtc_base_tests_utils",
640 "//testing/gtest",
641 ]
642 if (is_win) {
643 sources += [ "base/win32socketserver_unittest.cc" ]
644
645 # TODO(ronghuawu): Fix TestUdpReadyToSendIPv6 on windows bot then reenable
646 # these tests.
647 # TODO(pbos): Move test disabling to ifdefs within the test files instead
648 # of here.
649 sources -= [
650 "base/physicalsocketserver_unittest.cc",
651 "base/socket_unittest.cc",
652 "base/win32socketserver_unittest.cc",
653 ]
654 }
655 if (is_android) {
656 deps += [ "//testing/android/native_test:native_test_support" ]
657 }
658
659 if (is_mac) {
660 sources += [ "base/macsocketserver_unittest.cc" ]
661 }
662 if (is_ios || (is_mac && target_cpu != "x86")) {
663 defines = [ "CARBON_DEPRECATED=YES" ]
664 }
665 if (is_clang) {
666 # Suppress warnings from the Chromium Clang plugin.
667 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
668 configs -= [ "//build/config/clang:find_bad_constructs" ]
669 }
670 }
kjellander@webrtc.org3ee56142016-06-03 13:57:02671}