|
| 1 | +# Copyright 2024 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +package(default_visibility = ["//visibility:private"]) |
| 16 | + |
| 17 | +licenses(["notice"]) # Apache 2.0 |
| 18 | + |
| 19 | +service_dirs = ["v1/"] |
| 20 | + |
| 21 | +src_dirs = service_dirs + [d + "internal/" for d in service_dirs] |
| 22 | + |
| 23 | +filegroup( |
| 24 | + name = "srcs", |
| 25 | + srcs = glob([d + "*.cc" for d in src_dirs]), |
| 26 | +) |
| 27 | + |
| 28 | +filegroup( |
| 29 | + name = "hdrs", |
| 30 | + srcs = glob([d + "*.h" for d in src_dirs]), |
| 31 | +) |
| 32 | + |
| 33 | +filegroup( |
| 34 | + name = "public_hdrs", |
| 35 | + srcs = glob([d + "*.h" for d in service_dirs]), |
| 36 | + visibility = ["//:__pkg__"], |
| 37 | +) |
| 38 | + |
| 39 | +filegroup( |
| 40 | + name = "mocks", |
| 41 | + srcs = glob([d + "mocks/*.h" for d in service_dirs]), |
| 42 | + visibility = ["//:__pkg__"], |
| 43 | +) |
| 44 | + |
| 45 | +cc_library( |
| 46 | + name = "google_cloud_cpp_cloudquotas", |
| 47 | + srcs = [":srcs"], |
| 48 | + hdrs = [":hdrs"], |
| 49 | + visibility = ["//:__pkg__"], |
| 50 | + deps = [ |
| 51 | + "//:common", |
| 52 | + "//:grpc_utils", |
| 53 | + "@com_google_googleapis//google/api/cloudquotas/v1:cloudquotas_cc_grpc", |
| 54 | + ], |
| 55 | +) |
| 56 | + |
| 57 | +cc_library( |
| 58 | + name = "google_cloud_cpp_cloudquotas_mocks", |
| 59 | + hdrs = [":mocks"], |
| 60 | + visibility = ["//:__pkg__"], |
| 61 | + deps = [ |
| 62 | + ":google_cloud_cpp_cloudquotas", |
| 63 | + "@com_google_googletest//:gtest", |
| 64 | + ], |
| 65 | +) |
| 66 | + |
| 67 | +[cc_test( |
| 68 | + name = sample.replace("/", "_").replace(".cc", ""), |
| 69 | + srcs = [sample], |
| 70 | + tags = ["integration-test"], |
| 71 | + deps = [ |
| 72 | + "//:cloudquotas", |
| 73 | + "//google/cloud/testing_util:google_cloud_cpp_testing_private", |
| 74 | + ], |
| 75 | +) for sample in glob([d + "samples/*.cc" for d in service_dirs])] |
0 commit comments