GN: Introduce templates.
Defines the rtc_executable, rtc_source_set, rtc_test and
rtc_static_library templates.
These templates provide no functionality yet, but will enable common
configuration to be introduced, avoiding repetition in every target
Changes summary:
- Prepend rtc_ to test, source_set, executable and static_library targets
- Change "configs -= [" to "suppressed_configs += ["
- Include webrtc/build/webrtc.gni where it wasn't included yet
- Delete import("//testing/test.gni"), since rtc_test makes it unnecessary.
BUG=webrtc:6187
TBR=henrik.lundin@webrtc.org,tommi@webrtc.org
NOTRY=True
Review-Url: https://codereview.webrtc.org/2301053002
Cr-Commit-Position: refs/heads/master@{#14043}
diff --git a/webrtc/api/BUILD.gn b/webrtc/api/BUILD.gn
index d14fe1f..176df9e 100644
--- a/webrtc/api/BUILD.gn
+++ b/webrtc/api/BUILD.gn
@@ -7,7 +7,6 @@
# be found in the AUTHORS file in the root of the source tree.
import("../build/webrtc.gni")
-import("//testing/test.gni")
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
@@ -19,7 +18,7 @@
]
}
-source_set("call_api") {
+rtc_source_set("call_api") {
sources = [
"call/audio_receive_stream.h",
"call/audio_send_stream.h",
@@ -47,7 +46,7 @@
}
}
-source_set("libjingle_peerconnection") {
+rtc_source_set("libjingle_peerconnection") {
cflags = []
sources = [
"audiotrack.cc",
@@ -128,7 +127,7 @@
if (is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
- configs -= [ "//build/config/clang:find_bad_constructs" ]
+ suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
deps = [
@@ -167,7 +166,7 @@
}
}
- source_set("libjingle_peerconnection_jni") {
+ rtc_source_set("libjingle_peerconnection_jni") {
sources = [
"android/jni/androidmediacodeccommon.h",
"android/jni/androidmediadecoder_jni.cc",
@@ -199,7 +198,7 @@
if (is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
- configs -= [
+ suppressed_configs += [
"//build/config/clang:extra_warnings",
"//build/config/clang:find_bad_constructs",
]
@@ -332,7 +331,7 @@
}
}
- test("peerconnection_unittests") {
+ rtc_test("peerconnection_unittests") {
testonly = true
sources = [
"datachannel_unittest.cc",
@@ -381,7 +380,7 @@
if (is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
- configs -= [ "//build/config/clang:find_bad_constructs" ]
+ suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
# TODO(jschuh): Bug 1348: fix this warning.