This repository has been archived by the owner on Sep 7, 2022. It is now read-only.
forked from istio/proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
repositories.bzl
155 lines (137 loc) · 4.25 KB
/
repositories.bzl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
#
def boringssl_repositories(bind=True):
native.git_repository(
name = "boringssl",
commit = "12c35d69008ae6b8486e435447445240509f7662", # 2016-10-24
remote = "https://boringssl.googlesource.com/boringssl",
)
if bind:
native.bind(
name = "boringssl_crypto",
actual = "@boringssl//:crypto",
)
native.bind(
name = "libssl",
actual = "@boringssl//:ssl",
)
def protobuf_repositories(bind=True):
native.git_repository(
name = "protobuf_git",
commit = "a428e42072765993ff674fda72863c9f1aa2d268", # v3.1.0
remote = "https://github.com/google/protobuf.git",
)
if bind:
native.bind(
name = "protoc",
actual = "@protobuf_git//:protoc",
)
native.bind(
name = "protobuf",
actual = "@protobuf_git//:protobuf",
)
native.bind(
name = "cc_wkt_protos",
actual = "@protobuf_git//:cc_wkt_protos",
)
native.bind(
name = "cc_wkt_protos_genproto",
actual = "@protobuf_git//:cc_wkt_protos_genproto",
)
native.bind(
name = "protobuf_compiler",
actual = "@protobuf_git//:protoc_lib",
)
native.bind(
name = "protobuf_clib",
actual = "@protobuf_git//:protobuf_lite",
)
def googletest_repositories(bind=True):
BUILD = """
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
#
cc_library(
name = "googletest",
srcs = [
"googletest/src/gtest-all.cc",
"googlemock/src/gmock-all.cc",
],
hdrs = glob([
"googletest/include/**/*.h",
"googlemock/include/**/*.h",
"googletest/src/*.cc",
"googletest/src/*.h",
"googlemock/src/*.cc",
]),
includes = [
"googlemock",
"googletest",
"googletest/include",
"googlemock/include",
],
visibility = ["//visibility:public"],
)
cc_library(
name = "googletest_main",
srcs = ["googlemock/src/gmock_main.cc"],
visibility = ["//visibility:public"],
deps = [":googletest"],
)
cc_library(
name = "googletest_prod",
hdrs = [
"googletest/include/gtest/gtest_prod.h",
],
includes = [
"googletest/include",
],
visibility = ["//visibility:public"],
)
"""
native.new_git_repository(
name = "googletest_git",
build_file_content = BUILD,
commit = "d225acc90bc3a8c420a9bcd1f033033c1ccd7fe0",
remote = "https://github.com/google/googletest.git",
)
if bind:
native.bind(
name = "googletest",
actual = "@googletest_git//:googletest",
)
native.bind(
name = "googletest_main",
actual = "@googletest_git//:googletest_main",
)
native.bind(
name = "googletest_prod",
actual = "@googletest_git//:googletest_prod",
)