diff options
author | Frank Barchard <fbarchard@google.com> | 2017-03-13 18:06:55 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2017-03-14 01:52:52 +0000 |
commit | 2adb84e39e360723d19c68f315d99e3e0f88318c (patch) | |
tree | be861b22c9c9ae35029864d6aa63aa8a5bb2351b /BUILD.gn | |
parent | d59d3fcd1810e40745db7fb95417c1ba1909e4a5 (diff) | |
download | libyuv-2adb84e39e360723d19c68f315d99e3e0f88318c.tar.gz |
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 <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
Diffstat (limited to 'BUILD.gn')
-rw-r--r-- | BUILD.gn | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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" ] } |