Skip to content

Commit 85f1005

Browse files
authored
cleanup: regenerate older scaffolds (#8070)
Regenerate the scaffold for several older libraries, I am mainly interested in using globs for the BUILD.bazel files.
1 parent 47782b7 commit 85f1005

40 files changed

+225
-878
lines changed

google/cloud/accessapproval/BUILD.bazel

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,24 @@ package(default_visibility = ["//visibility:private"])
1616

1717
licenses(["notice"]) # Apache 2.0
1818

19-
load(":google_cloud_cpp_accessapproval.bzl", "google_cloud_cpp_accessapproval_hdrs", "google_cloud_cpp_accessapproval_srcs")
19+
SOURCE_GLOB = "**/*.cc"
20+
21+
MOCK_SOURCE_GLOB = "mocks/*.cc"
22+
23+
HEADER_GLOB = "**/*.h"
24+
25+
MOCK_HEADER_GLOB = "mocks/*.h"
2026

2127
cc_library(
2228
name = "google_cloud_cpp_accessapproval",
23-
srcs = google_cloud_cpp_accessapproval_srcs,
24-
hdrs = google_cloud_cpp_accessapproval_hdrs,
29+
srcs = glob(
30+
include = [SOURCE_GLOB],
31+
exclude = [MOCK_SOURCE_GLOB],
32+
),
33+
hdrs = glob(
34+
include = [HEADER_GLOB],
35+
exclude = [MOCK_HEADER_GLOB],
36+
),
2537
visibility = ["//:__pkg__"],
2638
deps = [
2739
"//google/cloud:google_cloud_cpp_common",
@@ -30,12 +42,14 @@ cc_library(
3042
],
3143
)
3244

33-
load(":google_cloud_cpp_accessapproval_mocks.bzl", "google_cloud_cpp_accessapproval_mocks_hdrs", "google_cloud_cpp_accessapproval_mocks_srcs")
34-
3545
cc_library(
3646
name = "google_cloud_cpp_accessapproval_mocks",
37-
srcs = google_cloud_cpp_accessapproval_mocks_srcs,
38-
hdrs = google_cloud_cpp_accessapproval_mocks_hdrs,
47+
srcs = glob(
48+
include = [MOCK_SOURCE_GLOB],
49+
),
50+
hdrs = glob(
51+
include = [MOCK_HEADER_GLOB],
52+
),
3953
visibility = ["//:__pkg__"],
4054
deps = [
4155
":google_cloud_cpp_accessapproval",

google/cloud/accessapproval/CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,6 @@ target_compile_options(google_cloud_cpp_accessapproval
8282
add_library(google-cloud-cpp::experimental-accessapproval ALIAS
8383
google_cloud_cpp_accessapproval)
8484

85-
# To avoid maintaining the list of files for the library, export them to a .bzl
86-
# file.
87-
include(CreateBazelConfig)
88-
create_bazel_config(google_cloud_cpp_accessapproval YEAR "2021")
89-
9085
# Create a header-only library for the mocks. We use a CMake `INTERFACE` library
9186
# for these, a regular library would not work on macOS (where the library needs
9287
# at least one .o file). Unfortunately INTERFACE libraries are a bit weird in
@@ -109,7 +104,6 @@ target_link_libraries(
109104
set_target_properties(
110105
google_cloud_cpp_accessapproval_mocks
111106
PROPERTIES EXPORT_NAME google-cloud-cpp::experimental-accessapproval_mocks)
112-
create_bazel_config(google_cloud_cpp_accessapproval_mocks YEAR "2022")
113107
target_include_directories(
114108
google_cloud_cpp_accessapproval_mocks
115109
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
@@ -166,7 +160,7 @@ set(GOOGLE_CLOUD_CONFIG_VERSION_MINOR ${PROJECT_VERSION_MINOR})
166160
set(GOOGLE_CLOUD_CONFIG_VERSION_PATCH ${PROJECT_VERSION_PATCH})
167161
set(GOOGLE_CLOUD_PC_NAME "The Access Approval API C++ Client Library")
168162
set(GOOGLE_CLOUD_PC_DESCRIPTION
169-
"Provides C++ APIs to access Access Approval API.")
163+
"Provides C++ APIs to use the Access Approval API.")
170164
set(GOOGLE_CLOUD_PC_LIBS "-lgoogle_cloud_cpp_accessapproval")
171165
string(CONCAT GOOGLE_CLOUD_PC_REQUIRES "google_cloud_cpp_grpc_utils"
172166
" google_cloud_cpp_common"

google/cloud/accessapproval/google_cloud_cpp_accessapproval.bzl

Lines changed: 0 additions & 43 deletions
This file was deleted.

google/cloud/accessapproval/google_cloud_cpp_accessapproval_mocks.bzl

Lines changed: 0 additions & 24 deletions
This file was deleted.

google/cloud/assuredworkloads/BUILD.bazel

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,24 @@ package(default_visibility = ["//visibility:private"])
1616

1717
licenses(["notice"]) # Apache 2.0
1818

19-
load(":google_cloud_cpp_assuredworkloads.bzl", "google_cloud_cpp_assuredworkloads_hdrs", "google_cloud_cpp_assuredworkloads_srcs")
19+
SOURCE_GLOB = "**/*.cc"
20+
21+
MOCK_SOURCE_GLOB = "mocks/*.cc"
22+
23+
HEADER_GLOB = "**/*.h"
24+
25+
MOCK_HEADER_GLOB = "mocks/*.h"
2026

2127
cc_library(
2228
name = "google_cloud_cpp_assuredworkloads",
23-
srcs = google_cloud_cpp_assuredworkloads_srcs,
24-
hdrs = google_cloud_cpp_assuredworkloads_hdrs,
29+
srcs = glob(
30+
include = [SOURCE_GLOB],
31+
exclude = [MOCK_SOURCE_GLOB],
32+
),
33+
hdrs = glob(
34+
include = [HEADER_GLOB],
35+
exclude = [MOCK_HEADER_GLOB],
36+
),
2537
visibility = ["//:__pkg__"],
2638
deps = [
2739
"//google/cloud:google_cloud_cpp_common",
@@ -30,12 +42,14 @@ cc_library(
3042
],
3143
)
3244

33-
load(":google_cloud_cpp_assuredworkloads_mocks.bzl", "google_cloud_cpp_assuredworkloads_mocks_hdrs", "google_cloud_cpp_assuredworkloads_mocks_srcs")
34-
3545
cc_library(
3646
name = "google_cloud_cpp_assuredworkloads_mocks",
37-
srcs = google_cloud_cpp_assuredworkloads_mocks_srcs,
38-
hdrs = google_cloud_cpp_assuredworkloads_mocks_hdrs,
47+
srcs = glob(
48+
include = [MOCK_SOURCE_GLOB],
49+
),
50+
hdrs = glob(
51+
include = [MOCK_HEADER_GLOB],
52+
),
3953
visibility = ["//:__pkg__"],
4054
deps = [
4155
":google_cloud_cpp_assuredworkloads",

google/cloud/assuredworkloads/CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ target_compile_options(google_cloud_cpp_assuredworkloads
8585
add_library(google-cloud-cpp::experimental-assuredworkloads ALIAS
8686
google_cloud_cpp_assuredworkloads)
8787

88-
# To avoid maintaining the list of files for the library, export them to a .bzl
89-
# file.
90-
include(CreateBazelConfig)
91-
create_bazel_config(google_cloud_cpp_assuredworkloads YEAR "2021")
92-
9388
# Create a header-only library for the mocks. We use a CMake `INTERFACE` library
9489
# for these, a regular library would not work on macOS (where the library needs
9590
# at least one .o file). Unfortunately INTERFACE libraries are a bit weird in
@@ -113,7 +108,6 @@ set_target_properties(
113108
google_cloud_cpp_assuredworkloads_mocks
114109
PROPERTIES EXPORT_NAME
115110
google-cloud-cpp::experimental-assuredworkloads_mocks)
116-
create_bazel_config(google_cloud_cpp_assuredworkloads_mocks YEAR "2022")
117111
target_include_directories(
118112
google_cloud_cpp_assuredworkloads_mocks
119113
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
@@ -171,7 +165,7 @@ set(GOOGLE_CLOUD_CONFIG_VERSION_MINOR ${PROJECT_VERSION_MINOR})
171165
set(GOOGLE_CLOUD_CONFIG_VERSION_PATCH ${PROJECT_VERSION_PATCH})
172166
set(GOOGLE_CLOUD_PC_NAME "The Assured Workloads API C++ Client Library")
173167
set(GOOGLE_CLOUD_PC_DESCRIPTION
174-
"Provides C++ APIs to access Assured Workloads API.")
168+
"Provides C++ APIs to use the Assured Workloads API.")
175169
set(GOOGLE_CLOUD_PC_LIBS "-lgoogle_cloud_cpp_assuredworkloads")
176170
string(CONCAT GOOGLE_CLOUD_PC_REQUIRES "google_cloud_cpp_grpc_utils"
177171
" google_cloud_cpp_common"

google/cloud/assuredworkloads/google_cloud_cpp_assuredworkloads.bzl

Lines changed: 0 additions & 43 deletions
This file was deleted.

google/cloud/assuredworkloads/google_cloud_cpp_assuredworkloads_mocks.bzl

Lines changed: 0 additions & 24 deletions
This file was deleted.

google/cloud/billing/BUILD.bazel

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,24 @@ package(default_visibility = ["//visibility:private"])
1616

1717
licenses(["notice"]) # Apache 2.0
1818

19-
load(":google_cloud_cpp_billing.bzl", "google_cloud_cpp_billing_hdrs", "google_cloud_cpp_billing_srcs")
19+
SOURCE_GLOB = "**/*.cc"
20+
21+
MOCK_SOURCE_GLOB = "mocks/*.cc"
22+
23+
HEADER_GLOB = "**/*.h"
24+
25+
MOCK_HEADER_GLOB = "mocks/*.h"
2026

2127
cc_library(
2228
name = "google_cloud_cpp_billing",
23-
srcs = google_cloud_cpp_billing_srcs,
24-
hdrs = google_cloud_cpp_billing_hdrs,
29+
srcs = glob(
30+
include = [SOURCE_GLOB],
31+
exclude = [MOCK_SOURCE_GLOB],
32+
),
33+
hdrs = glob(
34+
include = [HEADER_GLOB],
35+
exclude = [MOCK_HEADER_GLOB],
36+
),
2537
visibility = ["//:__pkg__"],
2638
deps = [
2739
"//google/cloud:google_cloud_cpp_common",
@@ -31,12 +43,14 @@ cc_library(
3143
],
3244
)
3345

34-
load(":google_cloud_cpp_billing_mocks.bzl", "google_cloud_cpp_billing_mocks_hdrs", "google_cloud_cpp_billing_mocks_srcs")
35-
3646
cc_library(
3747
name = "google_cloud_cpp_billing_mocks",
38-
srcs = google_cloud_cpp_billing_mocks_srcs,
39-
hdrs = google_cloud_cpp_billing_mocks_hdrs,
48+
srcs = glob(
49+
include = [MOCK_SOURCE_GLOB],
50+
),
51+
hdrs = glob(
52+
include = [MOCK_HEADER_GLOB],
53+
),
4054
visibility = ["//:__pkg__"],
4155
deps = [
4256
":google_cloud_cpp_billing",

google/cloud/billing/CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ target_compile_options(google_cloud_cpp_billing
9393
add_library(google-cloud-cpp::experimental-billing ALIAS
9494
google_cloud_cpp_billing)
9595

96-
# To avoid maintaining the list of files for the library, export them to a .bzl
97-
# file.
98-
include(CreateBazelConfig)
99-
create_bazel_config(google_cloud_cpp_billing YEAR "2021")
100-
10196
# Create a header-only library for the mocks. We use a CMake `INTERFACE` library
10297
# for these, a regular library would not work on macOS (where the library needs
10398
# at least one .o file). Unfortunately INTERFACE libraries are a bit weird in
@@ -120,7 +115,6 @@ target_link_libraries(
120115
set_target_properties(
121116
google_cloud_cpp_billing_mocks
122117
PROPERTIES EXPORT_NAME google-cloud-cpp::experimental-billing_mocks)
123-
create_bazel_config(google_cloud_cpp_billing_mocks YEAR "2022")
124118
target_include_directories(
125119
google_cloud_cpp_billing_mocks
126120
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
@@ -175,7 +169,7 @@ set(GOOGLE_CLOUD_CONFIG_VERSION_MINOR ${PROJECT_VERSION_MINOR})
175169
set(GOOGLE_CLOUD_CONFIG_VERSION_PATCH ${PROJECT_VERSION_PATCH})
176170
set(GOOGLE_CLOUD_PC_NAME "The Cloud Billing Budget API C++ Client Library")
177171
set(GOOGLE_CLOUD_PC_DESCRIPTION
178-
"Provides C++ APIs to access Cloud Billing Budget API.")
172+
"Provides C++ APIs to use the Cloud Billing Budget API.")
179173
set(GOOGLE_CLOUD_PC_LIBS "-lgoogle_cloud_cpp_billing")
180174
string(CONCAT GOOGLE_CLOUD_PC_REQUIRES "google_cloud_cpp_grpc_utils"
181175
" google_cloud_cpp_common" " google_cloud_cpp_billing_protos")

0 commit comments

Comments
 (0)