Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: webrtc/base/BUILD.gn

Issue 2931273002: Split rtc_task_queue target. Add separate target for sequenced_task_checker and weak_ptr. (Closed)
Patch Set: Split rtc_task_queue_unittests library as well. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/BUILD.gn ('k') | webrtc/modules/rtp_rtcp/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/BUILD.gn
diff --git a/webrtc/base/BUILD.gn b/webrtc/base/BUILD.gn
index 83cb750dd22039d88eaebdf21c03963adf6a4135..2433371775caf20dfe745c2fcb60ccd3e2951a4f 100644
--- a/webrtc/base/BUILD.gn
+++ b/webrtc/base/BUILD.gn
@@ -23,6 +23,8 @@ group("base") {
":rtc_base",
":rtc_base_approved",
":rtc_task_queue",
+ ":sequenced_task_checker",
+ ":weak_ptr",
]
if (is_android) {
public_deps += [ ":base_java" ]
@@ -295,21 +297,13 @@ rtc_static_library("rtc_task_queue") {
":rtc_base_approved",
]
- sources = [
- "sequenced_task_checker.h",
- "sequenced_task_checker_impl.cc",
- "sequenced_task_checker_impl.h",
- "weak_ptr.cc",
- "weak_ptr.h",
- ]
-
if (build_with_chromium) {
- sources += [
+ sources = [
"../../webrtc_overrides/webrtc/base/task_queue.cc",
"../../webrtc_overrides/webrtc/base/task_queue.h",
]
} else {
- sources += [
+ sources = [
"task_queue.h",
"task_queue_posix.h",
]
@@ -339,6 +333,28 @@ rtc_static_library("rtc_task_queue") {
}
}
+rtc_static_library("sequenced_task_checker") {
+ sources = [
+ "sequenced_task_checker.h",
+ "sequenced_task_checker_impl.cc",
+ "sequenced_task_checker_impl.h",
+ ]
+ deps = [
+ ":rtc_task_queue",
+ ]
+}
+
+rtc_static_library("weak_ptr") {
+ sources = [
+ "weak_ptr.cc",
+ "weak_ptr.h",
+ ]
+ deps = [
+ ":rtc_base_approved",
+ ":sequenced_task_checker",
+ ]
+}
+
rtc_static_library("rtc_numerics") {
sources = [
"numerics/exp_filter.cc",
@@ -853,9 +869,7 @@ if (rtc_include_tests) {
visibility = [ "//webrtc:rtc_unittests" ]
}
sources = [
- "sequenced_task_checker_unittest.cc",
"task_queue_unittest.cc",
- "weak_ptr_unittest.cc",
]
deps = [
":rtc_base_tests_main",
@@ -869,6 +883,48 @@ if (rtc_include_tests) {
}
}
+ rtc_source_set("sequenced_task_checker_unittests") {
+ testonly = true
+
+ # Skip restricting visibility on mobile platforms since the tests on those
+ # gets additional generated targets which would require many lines here to
+ # cover (which would be confusing to read and hard to maintain).
+ if (!is_android && !is_ios) {
+ visibility = [ "//webrtc:rtc_unittests" ]
+ }
+ sources = [
+ "sequenced_task_checker_unittest.cc",
+ ]
+ deps = [
+ ":rtc_base_approved",
+ ":rtc_base_tests_main",
+ ":rtc_task_queue",
+ ":sequenced_task_checker",
+ "../test:test_support",
+ ]
+ }
+
+ rtc_source_set("weak_ptr_unittests") {
+ testonly = true
+
+ # Skip restricting visibility on mobile platforms since the tests on those
+ # gets additional generated targets which would require many lines here to
+ # cover (which would be confusing to read and hard to maintain).
+ if (!is_android && !is_ios) {
+ visibility = [ "//webrtc:rtc_unittests" ]
+ }
+ sources = [
+ "weak_ptr_unittest.cc",
+ ]
+ deps = [
+ ":rtc_base_tests_main",
+ ":rtc_base_tests_utils",
+ ":rtc_task_queue",
+ ":weak_ptr",
+ "../test:test_support",
+ ]
+ }
+
rtc_source_set("rtc_numerics_unittests") {
testonly = true
« no previous file with comments | « webrtc/BUILD.gn ('k') | webrtc/modules/rtp_rtcp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698