From 07df20b51ab50078263f43a9a516b7ac7130d42e Mon Sep 17 00:00:00 2001 From: brucedawson Date: Sun, 22 May 2016 17:15:02 -0700 Subject: [PATCH] Fix building of bwe_test_logging.cc in gyp and gn builds bwe_test_logging.cc is supposed to be conditionally built in gyp builds but, due to a path error in the sources! expressions it was always compiled. Meanwhile, compilation of bwe_test_logging.cc was never set up for gn builds. This fixes both of these problems. BUG=604060 Review-Url: https://codereview.webrtc.org/1990373002 Cr-Commit-Position: refs/heads/master@{#12842} --- webrtc/modules/remote_bitrate_estimator/BUILD.gn | 9 +++++++++ .../remote_bitrate_estimator.gypi | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/webrtc/modules/remote_bitrate_estimator/BUILD.gn b/webrtc/modules/remote_bitrate_estimator/BUILD.gn index c929f3eb88..98a7c20104 100644 --- a/webrtc/modules/remote_bitrate_estimator/BUILD.gn +++ b/webrtc/modules/remote_bitrate_estimator/BUILD.gn @@ -6,6 +6,11 @@ # in the file PATENTS. All contributing project authors may # be found in the AUTHORS file in the root of the source tree. +declare_args() { + # Set this to true to enable BWE test logging. + enable_bwe_test_logging = false +} + source_set("remote_bitrate_estimator") { sources = [ "include/bwe_defines.h", @@ -41,6 +46,10 @@ source_set("rbe_components") { "transport_feedback_adapter.h", ] + if (enable_bwe_test_logging) { + sources += [ "test/bwe_test_logging.cc" ] + } + configs += [ "../..:common_config" ] public_configs = [ "../..:common_inherited_config" ] deps = [ diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi index 7b20cf7f9d..8599d671e4 100644 --- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi +++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator.gypi @@ -48,7 +48,7 @@ }, { 'defines': [ 'BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0' ], 'sources!': [ - 'remote_bitrate_estimator/test/bwe_test_logging.cc' + 'test/bwe_test_logging.cc' ], }], ], @@ -99,7 +99,7 @@ }, { 'defines': [ 'BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0' ], 'sources!': [ - 'remote_bitrate_estimator/test/bwe_test_logging.cc' + 'test/bwe_test_logging.cc' ], }], ],