@@ -107,23 +107,29 @@ the following commands to your `WORKSPACE` file:
107
107
# Add the necessary Starlark functions to fetch google-cloud-cpp-spanner.
108
108
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
109
109
110
- # Update the version and SHA256 digest as needed.
110
+ # Fetch the Cloud Spanner C++ library.
111
+ # NOTE: Update this version and SHA256 as needed.
111
112
http_archive(
112
113
name = "com_github_googleapis_google_cloud_cpp_spanner",
113
114
sha256 = "a833d3c1a6d127132e961350829babac521b62b4c837b88d7c219b400e98fed1",
114
115
strip_prefix = "google-cloud-cpp-spanner-0.8.0",
115
116
url = "https://github.com/googleapis/google-cloud-cpp-spanner/archive/v0.8.0.tar.gz",
116
117
)
117
118
118
- # Configure @com_google_googleapis to only compile C++ and gRPC:
119
+ # Call a function to load the Cloud Spanner C++ library's deps
120
+ load("@com_github_googleapis_google_cloud_cpp_spanner//bazel:google_cloud_cpp_spanner_deps.bzl", "google_cloud_cpp_spanner_deps")
121
+ google_cloud_cpp_spanner_deps()
122
+
123
+ # (optional) Only generate C++ from the protos.
119
124
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
120
125
switched_rules_by_language(
121
126
name = "com_google_googleapis_imports",
122
- cc = True, # C++ support is only "Partially implemented", roll our own.
127
+ cc = True,
123
128
grpc = True,
124
129
)
125
130
126
- # Call the corresponding workspace function for each dependency
131
+ # Load indirect dependencies due to
132
+ # https://github.com/bazelbuild/bazel/issues/1943
127
133
load("@com_github_googleapis_google_cloud_cpp_common//bazel:google_cloud_cpp_common_deps.bzl", "google_cloud_cpp_common_deps")
128
134
google_cloud_cpp_common_deps()
129
135
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
0 commit comments