Move the IfnDefGuard from third_party/protobuf/io/cpp_utils to the existing third_party/protobuf/compiler/cpp, which is a more logical location.
PiperOrigin-RevId: 618485105pull/16276/head
parent
7cf02389b3
commit
87b1c592a3
6 changed files with 42 additions and 77 deletions
@ -1,58 +0,0 @@ |
||||
# Utilities for generating C++ code |
||||
|
||||
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test") |
||||
load("@rules_pkg//pkg:mappings.bzl", "pkg_files", "strip_prefix") |
||||
load("//build_defs:cpp_opts.bzl", "COPTS") |
||||
|
||||
package( |
||||
default_visibility = ["//visibility:public"], |
||||
) |
||||
|
||||
cc_library( |
||||
name = "ifndef_guard", |
||||
srcs = ["ifndef_guard.cc"], |
||||
hdrs = ["ifndef_guard.h"], |
||||
copts = COPTS, |
||||
strip_include_prefix = "/src", |
||||
deps = [ |
||||
"//src/google/protobuf/io:printer", |
||||
"@com_google_absl//absl/functional:any_invocable", |
||||
"@com_google_absl//absl/log:die_if_null", |
||||
"@com_google_absl//absl/strings", |
||||
"@com_google_absl//absl/strings:string_view", |
||||
], |
||||
) |
||||
|
||||
cc_test( |
||||
name = "ifndef_guard_unittest", |
||||
srcs = ["ifndef_guard_unittest.cc"], |
||||
deps = [ |
||||
":ifndef_guard", |
||||
"//src/google/protobuf/io", |
||||
"//src/google/protobuf/io:printer", |
||||
"@com_google_absl//absl/log:absl_check", |
||||
"@com_google_absl//absl/strings:string_view", |
||||
"@com_google_absl//absl/types:optional", |
||||
"@com_google_googletest//:gtest", |
||||
"@com_google_googletest//:gtest_main", |
||||
], |
||||
) |
||||
|
||||
################################################################################ |
||||
# Distribution packaging |
||||
################################################################################ |
||||
|
||||
pkg_files( |
||||
name = "dist_files", |
||||
srcs = glob(["**/*"]), |
||||
strip_prefix = strip_prefix.from_root(""), |
||||
visibility = ["//src:__pkg__"], |
||||
) |
||||
|
||||
filegroup( |
||||
name = "test_srcs", |
||||
srcs = glob([ |
||||
"*unittest.cc", |
||||
]), |
||||
visibility = ["//pkg:__pkg__"], |
||||
) |
Loading…
Reference in new issue