Ability to optionally depend on Abseil plus upstream of 183716547

This commit is contained in:
Gennadiy Civil
2018-01-30 11:42:03 -05:00
parent 6c0c389601
commit 2a4683021a
4 changed files with 67 additions and 0 deletions

View File

@@ -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(