From 2adb84e39e360723d19c68f315d99e3e0f88318c Mon Sep 17 00:00:00 2001 From: Frank Barchard Date: Mon, 13 Mar 2017 18:06:55 -0700 Subject: make gflags command line parser optional BUG=libyuv:691 TEST=gn gen out/Release "--args=is_debug=false target_cpu=\"x64\" libyuv_include_tests=true" Change-Id: Ib481189be884c34d9bbc30bfcf71c7969c6f4dae Reviewed-on: https://chromium-review.googlesource.com/452736 Reviewed-by: Frank Barchard Commit-Queue: Frank Barchard --- BUILD.gn | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'BUILD.gn') diff --git a/BUILD.gn b/BUILD.gn index 4f56cdc2..bcb66b6d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -9,6 +9,11 @@ import("libyuv.gni") import("//testing/test.gni") +declare_args() { + # Set to false to disable building with gflags. + libyuv_use_gflags = true +} + config("libyuv_config") { include_dirs = [ "include" ] if (is_android && current_cpu == "arm64") { @@ -231,9 +236,14 @@ if (libyuv_include_tests) { deps = [ ":libyuv", "//testing/gtest", - "//third_party/gflags", ] + defines = [] + if (libyuv_use_gflags) { + defines += [ "LIBYUV_USE_GFLAGS" ] + deps += [ "//third_party/gflags" ] + } + configs += [ ":libyuv_unittest_warnings_config" ] public_deps = [ @@ -241,8 +251,6 @@ if (libyuv_include_tests) { ] public_configs = [ ":libyuv_unittest_config" ] - defines = [] - if (is_linux) { cflags = [ "-fexceptions" ] } -- cgit v1.2.3