BUILD.bazel 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 = "type_traits",
  33. hdrs = ["type_traits.h"],
  34. copts = ABSL_DEFAULT_COPTS,
  35. linkopts = ABSL_DEFAULT_LINKOPTS,
  36. deps = [
  37. "//absl/base:config",
  38. "//absl/base:core_headers",
  39. ],
  40. )
  41. cc_test(
  42. name = "type_traits_test",
  43. srcs = ["type_traits_test.cc"],
  44. copts = ABSL_TEST_COPTS,
  45. linkopts = ABSL_DEFAULT_LINKOPTS,
  46. deps = [
  47. ":type_traits",
  48. "//absl/base:config",
  49. "//absl/base:core_headers",
  50. "//absl/time",
  51. "@com_google_googletest//:gtest",
  52. "@com_google_googletest//:gtest_main",
  53. ],
  54. )