BUILD.bazel 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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(default_visibility = ["//visibility:public"])
  21. licenses(["notice"])
  22. cc_library(
  23. name = "cleanup_internal",
  24. hdrs = ["internal/cleanup.h"],
  25. copts = ABSL_DEFAULT_COPTS,
  26. linkopts = ABSL_DEFAULT_LINKOPTS,
  27. deps = [
  28. "//absl/base:base_internal",
  29. "//absl/base:core_headers",
  30. "//absl/utility",
  31. ],
  32. )
  33. cc_library(
  34. name = "cleanup",
  35. hdrs = [
  36. "cleanup.h",
  37. ],
  38. copts = ABSL_DEFAULT_COPTS,
  39. linkopts = ABSL_DEFAULT_LINKOPTS,
  40. deps = [
  41. ":cleanup_internal",
  42. "//absl/base:config",
  43. "//absl/base:core_headers",
  44. ],
  45. )
  46. cc_test(
  47. name = "cleanup_test",
  48. size = "small",
  49. srcs = [
  50. "cleanup_test.cc",
  51. ],
  52. copts = ABSL_TEST_COPTS,
  53. deps = [
  54. ":cleanup",
  55. "//absl/base:config",
  56. "//absl/utility",
  57. "@com_google_googletest//:gtest_main",
  58. ],
  59. )