From 2a4683021ab3e969a63c5e9226c1db4522f7129d Mon Sep 17 00:00:00 2001 From: Gennadiy Civil Date: Tue, 30 Jan 2018 11:42:03 -0500 Subject: Ability to optionally depend on Abseil plus upstream of 183716547 --- BUILD.bazel | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'BUILD.bazel') diff --git a/BUILD.bazel b/BUILD.bazel index 7d2e9d2b..91dd3b74 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -46,6 +46,12 @@ config_setting( values = {"cpu": "x64_windows_msvc"}, ) +config_setting( + name = "has_absl", + values = {"define": "absl=1"}, +) + + # Google Test including Google Mock cc_library( name = "gtest", @@ -88,6 +94,20 @@ cc_library( "-pthread", ], }), + defines = select ({ + ":has_absl": [ + "GTEST_HAS_ABSL=1", + ], + "//conditions:default": [], + } + ), + deps = select ({ + ":has_absl": [ + "@com_google_absl//absl/types:optional", + ], + "//conditions:default": [], + } + ) ) cc_library( -- cgit v1.2.3