BUILD.bazel 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # Copyright 2021 The Abseil Authors.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # https://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. load(
  15. "//absl:copts/configure_copts.bzl",
  16. "ABSL_DEFAULT_COPTS",
  17. "ABSL_DEFAULT_LINKOPTS",
  18. "ABSL_TEST_COPTS",
  19. )
  20. package(
  21. default_visibility = ["//visibility:public"],
  22. features = [
  23. "header_modules",
  24. "layering_check",
  25. "parse_headers",
  26. ],
  27. )
  28. licenses(["notice"])
  29. cc_library(
  30. name = "cleanup_internal",
  31. hdrs = ["internal/cleanup.h"],
  32. copts = ABSL_DEFAULT_COPTS,
  33. linkopts = ABSL_DEFAULT_LINKOPTS,
  34. deps = [
  35. "//absl/base:base_internal",
  36. "//absl/base:core_headers",
  37. "//absl/utility",
  38. ],
  39. )
  40. cc_library(
  41. name = "cleanup",
  42. hdrs = [
  43. "cleanup.h",
  44. ],
  45. copts = ABSL_DEFAULT_COPTS,
  46. linkopts = ABSL_DEFAULT_LINKOPTS,
  47. deps = [
  48. ":cleanup_internal",
  49. "//absl/base:config",
  50. "//absl/base:core_headers",
  51. ],
  52. )
  53. cc_test(
  54. name = "cleanup_test",
  55. size = "small",
  56. srcs = [
  57. "cleanup_test.cc",
  58. ],
  59. copts = ABSL_TEST_COPTS,
  60. deps = [
  61. ":cleanup",
  62. "//absl/base:config",
  63. "//absl/utility",
  64. "@com_google_googletest//:gtest",
  65. "@com_google_googletest//:gtest_main",
  66. ],
  67. )