Skip to content

Commit 7cff22c

Browse files
committed
update build rules to include universe_domain lib when building samples
1 parent 8ed1f78 commit 7cff22c

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

bazel/gapic.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def cc_gapic_library(name, service_dirs = [], googleapis_deps = [], additional_d
8282
tags = ["integration-test"],
8383
deps = [
8484
"//:" + name,
85+
"//:experimental-universe_domain",
8586
"//google/cloud/testing_util:google_cloud_cpp_testing_private",
8687
],
8788
) for sample in native.glob([d + "samples/*_samples.cc" for d in service_dirs])]

ci/cloudbuild/builds/lib/features.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ function features::always_build() {
4242
opentelemetry
4343
# Enable storage_grpc in most builds.
4444
storage_grpc
45+
# Samples require universe domain support.
46+
universe_domain
4547
)
4648
printf "%s\n" "${list[@]}" | sort -u
4749
}

ci/lib/shard.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,13 @@ readonly DEFAULT_SHARD=(
3636
bigtable
3737
spanner
3838
logging
39+
universe_domain
3940
)
4041

4142
readonly BIGQUERY_SHARD=(
4243
bigquery
4344
experimental-bigquery_rest
45+
universe_domain
4446
)
4547

4648
readonly PUBSUB_SHARD=(
@@ -51,6 +53,7 @@ readonly PUBSUB_SHARD=(
5153
# IAM is included because it has hand-crafted tests and/or examples and is
5254
# required by Pub/Sub
5355
iam
56+
universe_domain
5457
)
5558

5659
readonly STORAGE_SHARD=(

cmake/GoogleCloudCppCommon.cmake

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,16 @@ function (google_cloud_cpp_add_samples_relative library path)
132132
google_cloud_cpp_add_executable(target "${library}" "${source}")
133133
if (TARGET google-cloud-cpp::${library})
134134
target_link_libraries(
135-
"${target}" PRIVATE google-cloud-cpp::${library}
136-
google_cloud_cpp_testing)
135+
"${target}"
136+
PRIVATE google-cloud-cpp::${library}
137+
google-cloud-cpp::universe_domain
138+
google_cloud_cpp_testing)
137139
elseif (TARGET google-cloud-cpp::experimental-${library})
138140
target_link_libraries(
139-
"${target}" PRIVATE google-cloud-cpp::experimental-${library}
140-
google_cloud_cpp_testing)
141+
"${target}"
142+
PRIVATE google-cloud-cpp::experimental-${library}
143+
google-cloud-cpp::universe_domain
144+
google_cloud_cpp_testing)
141145
endif ()
142146
google_cloud_cpp_add_common_options("${target}")
143147
add_test(NAME "${target}" COMMAND "${target}")

0 commit comments

Comments
 (0)