BUILD.bazel 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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(
  23. default_visibility = ["//visibility:public"],
  24. features = [
  25. "header_modules",
  26. "layering_check",
  27. "parse_headers",
  28. ],
  29. )
  30. licenses(["notice"])
  31. cc_library(
  32. name = "utility",
  33. hdrs = [
  34. "utility.h",
  35. ],
  36. copts = ABSL_DEFAULT_COPTS,
  37. linkopts = ABSL_DEFAULT_LINKOPTS,
  38. deps = [
  39. "//absl/base:base_internal",
  40. "//absl/base:config",
  41. "//absl/meta:type_traits",
  42. ],
  43. )
  44. cc_test(
  45. name = "utility_test",
  46. srcs = ["utility_test.cc"],
  47. copts = ABSL_TEST_COPTS,
  48. linkopts = ABSL_DEFAULT_LINKOPTS,
  49. deps = [
  50. ":utility",
  51. "//absl/base:core_headers",
  52. "//absl/memory",
  53. "//absl/strings",
  54. "@com_google_googletest//:gtest",
  55. "@com_google_googletest//:gtest_main",
  56. ],
  57. )
  58. cc_library(
  59. name = "if_constexpr",
  60. hdrs = [
  61. "internal/if_constexpr.h",
  62. ],
  63. copts = ABSL_DEFAULT_COPTS,
  64. linkopts = ABSL_DEFAULT_LINKOPTS,
  65. deps = [
  66. "//absl/base:config",
  67. ],
  68. )
  69. cc_test(
  70. name = "if_constexpr_test",
  71. srcs = ["internal/if_constexpr_test.cc"],
  72. copts = ABSL_TEST_COPTS,
  73. linkopts = ABSL_DEFAULT_LINKOPTS,
  74. deps = [
  75. ":if_constexpr",
  76. "@com_google_googletest//:gtest",
  77. "@com_google_googletest//:gtest_main",
  78. ],
  79. )