-
Notifications
You must be signed in to change notification settings - Fork 444
Expand file tree
/
Copy pathBUILD.bazel
More file actions
118 lines (106 loc) · 4.04 KB
/
BUILD.bazel
File metadata and controls
118 lines (106 loc) · 4.04 KB
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
# Copyright 2021 Google LLC
#
# 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
#
# https://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.
load("//bazel:gapic.bzl", "cc_gapic_library")
load(":bigquery_rest_testing.bzl", "bigquery_rest_testing_hdrs", "bigquery_rest_testing_srcs")
load(":bigquery_rest_unit_tests.bzl", "bigquery_rest_unit_tests")
load(":google_cloud_cpp_bigquery_rest.bzl", "google_cloud_cpp_bigquery_rest_hdrs", "google_cloud_cpp_bigquery_rest_srcs")
load(":google_cloud_cpp_bigquery_rest_mocks.bzl", "google_cloud_cpp_bigquery_rest_mocks_hdrs", "google_cloud_cpp_bigquery_rest_mocks_srcs")
package(default_visibility = ["//visibility:private"])
licenses(["notice"]) # Apache 2.0
service_dirs = [
"biglake/v1/",
"analyticshub/v1/",
"connection/v1/",
"datapolicies/v1/",
"datapolicies/v2/",
"datatransfer/v1/",
"migration/v2/",
"reservation/v1/",
"storage/v1/",
]
src_dirs = service_dirs + [d + "internal/" for d in service_dirs]
googleapis_deps = [
"@googleapis//google/cloud/bigquery/analyticshub/v1:analyticshub_cc_grpc",
"@googleapis//google/cloud/bigquery/biglake/v1:biglake_cc_grpc",
"@googleapis//google/cloud/bigquery/connection/v1:connection_cc_grpc",
"@googleapis//google/cloud/bigquery/datapolicies/v1:datapolicies_cc_grpc",
"@googleapis//google/cloud/bigquery/datapolicies/v2:datapolicies_cc_grpc",
"@googleapis//google/cloud/bigquery/datatransfer/v1:datatransfer_cc_grpc",
"@googleapis//google/cloud/bigquery/logging/v1:logging_cc_grpc",
"@googleapis//google/cloud/bigquery/migration/v2:migration_cc_grpc",
"@googleapis//google/cloud/bigquery/reservation/v1:reservation_cc_grpc",
"@googleapis//google/cloud/bigquery/storage/v1:storage_cc_grpc",
]
cc_gapic_library(
name = "bigquery",
googleapis_deps = googleapis_deps,
service_dirs = service_dirs,
)
[cc_test(
name = sample.replace("/", "_").replace(".cc", ""),
srcs = [sample],
deps = [
"//:bigquery",
"//:bigquery_mocks",
"//google/cloud/testing_util:google_cloud_cpp_testing_private",
],
) for sample in glob(["samples/mock_*.cc"])]
cc_library(
name = "google_cloud_cpp_bigquery_rest",
srcs = google_cloud_cpp_bigquery_rest_srcs,
hdrs = google_cloud_cpp_bigquery_rest_hdrs,
visibility = ["//:__subpackages__"],
deps = [
"//:common",
"//google/cloud:google_cloud_cpp_rest_internal",
],
)
cc_library(
name = "google_cloud_cpp_bigquery_rest_mocks",
testonly = True,
srcs = google_cloud_cpp_bigquery_rest_mocks_srcs,
hdrs = google_cloud_cpp_bigquery_rest_mocks_hdrs,
visibility = ["//:__subpackages__"],
deps = [
":google_cloud_cpp_bigquery_rest",
"@googletest//:gtest",
],
)
cc_library(
name = "bigquery_rest_testing",
testonly = True,
srcs = bigquery_rest_testing_srcs,
hdrs = bigquery_rest_testing_hdrs,
visibility = [":__subpackages__"],
deps = [
":google_cloud_cpp_bigquery_rest",
":google_cloud_cpp_bigquery_rest_mocks",
"//:common",
"//google/cloud/testing_util:google_cloud_cpp_testing_private",
"@googletest//:gtest_main",
],
)
[cc_test(
name = test.replace("/", "_").replace(".cc", ""),
srcs = [test],
deps = [
":bigquery_rest_testing",
":google_cloud_cpp_bigquery_rest",
":google_cloud_cpp_bigquery_rest_mocks",
"//google/cloud:google_cloud_cpp_mocks",
"//google/cloud/testing_util:google_cloud_cpp_testing_private",
"//google/cloud/testing_util:google_cloud_cpp_testing_rest_private",
"@googletest//:gtest",
],
) for test in bigquery_rest_unit_tests]