Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit 199ec94

Browse files
authored
Benchmark has its own BUILD file as of v1.4.0. (#167)
1 parent 893e083 commit 199ec94

File tree

1 file changed

+6
-31
lines changed

1 file changed

+6
-31
lines changed

WORKSPACE

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ http_archive(
2121
urls = ["https://github.com/abseil/abseil-cpp/archive/master.zip"],
2222
)
2323

24-
# GoogleTest/GoogleMock framework.
24+
# GoogleTest framework.
25+
# Only needed for tests, not to build the OpenCensus library.
2526
http_archive(
2627
name = "com_google_googletest",
2728
strip_prefix = "googletest-master",
@@ -50,40 +51,14 @@ bind(
5051
)
5152

5253
# Google Benchmark library.
53-
# Adapted from cctz.
54-
# Upstream support for bazel is tracked in
55-
# - https://github.com/google/benchmark/pull/329
56-
# - https://github.com/google/benchmark/issues/191
57-
new_http_archive(
54+
# Only needed for benchmarks, not to build the OpenCensus library.
55+
http_archive(
5856
name = "com_google_benchmark",
5957
urls = ["https://github.com/google/benchmark/archive/master.zip"],
6058
strip_prefix = "benchmark-master",
61-
build_file_content =
62-
"""
63-
config_setting(
64-
name = "windows",
65-
values = {"cpu": "x64_windows"},
66-
visibility = [ "//visibility:private" ],
67-
)
68-
69-
cc_library(
70-
name = "benchmark",
71-
srcs = glob([
72-
"src/*.h",
73-
"src/*.cc",
74-
]),
75-
hdrs = glob(["include/benchmark/*.h"]),
76-
copts = select({
77-
"//:windows": ["-DHAVE_STD_REGEX"],
78-
# HAVE_STD_REGEX didn't work.
79-
"//conditions:default": ["-DHAVE_POSIX_REGEX"],
80-
}),
81-
includes = ["include"],
82-
visibility = ["//visibility:public"],
83-
)
84-
"""
8559
)
8660

61+
# Prometheus client library - used by Prometheus exporter.
8762
http_archive(
8863
name = "com_github_jupp0r_prometheus_cpp",
8964
strip_prefix = "prometheus-cpp-master",
@@ -92,7 +67,7 @@ http_archive(
9267

9368
load("@com_github_jupp0r_prometheus_cpp//:repositories.bzl", "load_civetweb")
9469

95-
# Load dependencies individually since we load some of them above.
70+
# Load Prometheus dependencies individually since we load some of them above.
9671
load_civetweb()
9772

9873
# Curl library - used by zipkin exporter.

0 commit comments

Comments
 (0)