1515workspace (name = "io_opencensus_cpp" )
1616
1717load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
18+ load ("//bazel:deps.bzl" , "opencensus_cpp_deps" )
1819
19- # Build rules for C++ projects.
20- http_archive (
21- name = "rules_cc" ,
22- strip_prefix = "rules_cc-master" ,
23- urls = ["https://github.com/bazelbuild/rules_cc/archive/master.zip" ],
24- )
25-
26- # We depend on Abseil.
27- http_archive (
28- name = "com_google_absl" ,
29- strip_prefix = "abseil-cpp-master" ,
30- urls = ["https://github.com/abseil/abseil-cpp/archive/master.zip" ],
31- )
20+ opencensus_cpp_deps ()
3221
3322# GoogleTest framework.
3423# Only needed for tests, not to build the OpenCensus library.
@@ -46,13 +35,6 @@ http_archive(
4635 urls = ["https://github.com/google/benchmark/archive/master.zip" ],
4736)
4837
49- # gRPC
50- http_archive (
51- name = "com_github_grpc_grpc" ,
52- strip_prefix = "grpc-master" ,
53- urls = ["https://github.com/grpc/grpc/archive/master.tar.gz" ],
54- )
55-
5638load ("@com_github_grpc_grpc//bazel:grpc_deps.bzl" , "grpc_deps" )
5739
5840grpc_deps ()
@@ -83,87 +65,12 @@ local_repository(
8365 path = "tools/zlib" ,
8466)
8567
86- # Prometheus client library - used by Prometheus exporter.
87- http_archive (
88- name = "com_github_jupp0r_prometheus_cpp" ,
89- strip_prefix = "prometheus-cpp-master" ,
90- urls = ["https://github.com/jupp0r/prometheus-cpp/archive/master.zip" ],
91- )
92-
68+ # Load Prometheus dependencies individually since we load some of them above.
9369load ("@com_github_jupp0r_prometheus_cpp//:repositories.bzl" , "load_civetweb" )
9470
95- # Load Prometheus dependencies individually since we load some of them above.
9671load_civetweb ()
9772
98- # Curl library - used by zipkin exporter.
99- http_archive (
100- name = "com_github_curl" ,
101- build_file_content =
102- """
103- load("@io_opencensus_cpp//opencensus:curl.bzl", "CURL_COPTS")
104- package(features = ['no_copts_tokenization'])
105-
106- config_setting(
107- name = "windows",
108- values = {"cpu": "x64_windows"},
109- visibility = [ "//visibility:private" ],
110- )
111-
112- config_setting(
113- name = "osx",
114- values = {"cpu": "darwin"},
115- visibility = [ "//visibility:private" ],
116- )
117-
118- cc_library(
119- name = "curl",
120- srcs = glob([
121- "lib/**/*.c",
122- ]),
123- hdrs = glob([
124- "include/curl/*.h",
125- "lib/**/*.h",
126- ]),
127- includes = ["include/", "lib/"],
128- copts = CURL_COPTS + [
129- "-DOS=\\ "os\\ "",
130- "-DCURL_EXTERN_SYMBOL=__attribute__((__visibility__(\\ "default\\ ")))",
131- ],
132- visibility = ["//visibility:public"],
133- )
134- """ ,
135- strip_prefix = "curl-master" ,
136- urls = ["https://github.com/curl/curl/archive/master.zip" ],
137- )
138-
139- # Rapidjson library - used by zipkin exporter.
140- http_archive (
141- name = "com_github_tencent_rapidjson" ,
142- build_file_content =
143- """
144- cc_library(
145- name = "rapidjson",
146- srcs = [],
147- hdrs = glob([
148- "include/rapidjson/*.h",
149- "include/rapidjson/internal/*.h",
150- "include/rapidjson/error/*.h",
151- ]),
152- includes = ["include/"],
153- visibility = ["//visibility:public"],
154- )
155- """ ,
156- strip_prefix = "rapidjson-master" ,
157- urls = ["https://github.com/Tencent/rapidjson/archive/master.zip" ],
158- )
159-
16073# Google APIs - used by Stackdriver exporter.
161- http_archive (
162- name = "com_google_googleapis" ,
163- strip_prefix = "googleapis-master" ,
164- urls = ["https://github.com/googleapis/googleapis/archive/master.zip" ],
165- )
166-
16774load ("@com_google_googleapis//:repository_rules.bzl" , "switched_rules_by_language" )
16875
16976switched_rules_by_language (
@@ -173,24 +80,8 @@ switched_rules_by_language(
17380)
17481
17582# Needed by @opencensus_proto.
176- http_archive (
177- name = "io_bazel_rules_go" ,
178- sha256 = "9fb16af4d4836c8222142e54c9efa0bb5fc562ffc893ce2abeac3e25daead144" ,
179- urls = [
180- "https://storage.googleapis.com/bazel-mirror/github.com/bazelbuild/rules_go/releases/download/0.19.0/rules_go-0.19.0.tar.gz" ,
181- "https://github.com/bazelbuild/rules_go/releases/download/0.19.0/rules_go-0.19.0.tar.gz" ,
182- ],
183- )
184-
18583load ("@io_bazel_rules_go//go:deps.bzl" , "go_register_toolchains" , "go_rules_dependencies" )
18684
18785go_rules_dependencies ()
18886
18987go_register_toolchains ()
190-
191- # OpenCensus protos - used by OcAgent exporter.
192- http_archive (
193- name = "opencensus_proto" ,
194- strip_prefix = "opencensus-proto-master/src" ,
195- urls = ["https://github.com/census-instrumentation/opencensus-proto/archive/master.zip" ],
196- )
0 commit comments