Make CMake file list generation consistent across Bazel versions

It looks like Bazel 6.0 changed the stringification of Label objects:
b1113f801d

That is causing some problems for our staleness test, since different
Bazel versions get different results. This CL fixes the problem by
tweaking the logic so that we explicitly format the label string.

PiperOrigin-RevId: 496790722
pull/11377/head
Adam Cozzette 2 years ago committed by Copybara-Service
parent a7473b65b8
commit da09f7f78b
  1. 5
      pkg/build_systems.bzl

@ -274,12 +274,13 @@ def _cmake_var_fragment(owner, varname, prefix, entries):
A string.
"""
return (
"# {owner}\n" +
"# @//{package}:{name}\n" +
"set({varname}\n" +
"{entries}\n" +
")\n"
).format(
owner = owner,
package = owner.package,
name = owner.name,
varname = varname,
# Strip out "wkt/google/protobuf/" from the well-known type file paths.
# This is currently necessary to allow checked-in and generated

Loading…
Cancel
Save