BUILD.bazel 1.6 KB

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