BUILD.bazel 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #
  2. # Copyright 2017 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 = "algorithm",
  26. hdrs = ["algorithm.h"],
  27. copts = ABSL_DEFAULT_COPTS,
  28. linkopts = ABSL_DEFAULT_LINKOPTS,
  29. deps = [
  30. "//absl/base:config",
  31. ],
  32. )
  33. cc_test(
  34. name = "algorithm_test",
  35. size = "small",
  36. srcs = ["algorithm_test.cc"],
  37. copts = ABSL_TEST_COPTS,
  38. linkopts = ABSL_DEFAULT_LINKOPTS,
  39. deps = [
  40. ":algorithm",
  41. "@com_google_googletest//:gtest_main",
  42. ],
  43. )
  44. cc_test(
  45. name = "algorithm_benchmark",
  46. srcs = ["equal_benchmark.cc"],
  47. copts = ABSL_TEST_COPTS,
  48. linkopts = ABSL_DEFAULT_LINKOPTS,
  49. tags = ["benchmark"],
  50. deps = [
  51. ":algorithm",
  52. "//absl/base:core_headers",
  53. "@com_github_google_benchmark//:benchmark_main",
  54. ],
  55. )
  56. cc_library(
  57. name = "container",
  58. hdrs = [
  59. "container.h",
  60. ],
  61. copts = ABSL_DEFAULT_COPTS,
  62. linkopts = ABSL_DEFAULT_LINKOPTS,
  63. deps = [
  64. ":algorithm",
  65. "//absl/base:core_headers",
  66. "//absl/meta:type_traits",
  67. ],
  68. )
  69. cc_test(
  70. name = "container_test",
  71. srcs = ["container_test.cc"],
  72. copts = ABSL_TEST_COPTS,
  73. linkopts = ABSL_DEFAULT_LINKOPTS,
  74. deps = [
  75. ":container",
  76. "//absl/base",
  77. "//absl/base:core_headers",
  78. "//absl/memory",
  79. "//absl/types:span",
  80. "@com_google_googletest//:gtest_main",
  81. ],
  82. )