BUILD 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. package(default_visibility = ["//visibility:public"])
  5. cc_library(
  6. name = "bazel_working_dir",
  7. hdrs = ["bazel_working_dir.h"],
  8. deps = [
  9. "@llvm-project//llvm:Support",
  10. ],
  11. )
  12. cc_library(
  13. name = "check",
  14. srcs = [
  15. "check_internal.cpp",
  16. "check_internal.h",
  17. ],
  18. hdrs = ["check.h"],
  19. deps = [
  20. "@llvm-project//llvm:Support",
  21. ],
  22. )
  23. cc_test(
  24. name = "check_test",
  25. srcs = ["check_test.cpp"],
  26. deps = [
  27. ":check",
  28. "//testing/util:gtest_main",
  29. "@com_google_googletest//:gtest",
  30. ],
  31. )
  32. cc_library(
  33. name = "enum_base",
  34. hdrs = ["enum_base.h"],
  35. deps = [
  36. "//common:ostream",
  37. "@llvm-project//llvm:Support",
  38. ],
  39. )
  40. cc_library(
  41. name = "enum_base_test_def",
  42. textual_hdrs = ["enum_base_test.def"],
  43. )
  44. cc_test(
  45. name = "enum_base_test",
  46. srcs = ["enum_base_test.cpp"],
  47. deps = [
  48. ":enum_base",
  49. ":enum_base_test_def",
  50. "//testing/util:gtest_main",
  51. "//testing/util:test_raw_ostream",
  52. "@com_google_googletest//:gtest",
  53. ],
  54. )
  55. cc_library(
  56. name = "error",
  57. hdrs = ["error.h"],
  58. deps = [
  59. ":check",
  60. ":ostream",
  61. "@llvm-project//llvm:Support",
  62. ],
  63. )
  64. cc_test(
  65. name = "error_test",
  66. srcs = ["error_test.cpp"],
  67. deps = [
  68. ":error",
  69. "//testing/util:gtest_main",
  70. "//testing/util:test_raw_ostream",
  71. "@com_google_googletest//:gtest",
  72. ],
  73. )
  74. cc_library(
  75. name = "indirect_value",
  76. hdrs = ["indirect_value.h"],
  77. )
  78. cc_test(
  79. name = "indirect_value_test",
  80. srcs = ["indirect_value_test.cpp"],
  81. deps = [
  82. ":indirect_value",
  83. "//testing/util:gtest_main",
  84. "@com_google_googletest//:gtest",
  85. ],
  86. )
  87. cc_library(
  88. name = "metaprogramming",
  89. hdrs = ["metaprogramming.h"],
  90. )
  91. cc_test(
  92. name = "metaprogramming_test",
  93. srcs = ["metaprogramming_test.cpp"],
  94. deps = [
  95. ":metaprogramming",
  96. "//testing/util:gtest_main",
  97. "@com_google_googletest//:gtest",
  98. "@llvm-project//llvm:Support",
  99. ],
  100. )
  101. cc_library(
  102. name = "ostream",
  103. hdrs = ["ostream.h"],
  104. deps = [
  105. ":metaprogramming",
  106. "@llvm-project//llvm:Support",
  107. ],
  108. )
  109. cc_library(
  110. name = "string_helpers",
  111. srcs = ["string_helpers.cpp"],
  112. hdrs = ["string_helpers.h"],
  113. deps = [
  114. ":check",
  115. ":error",
  116. "@llvm-project//llvm:Support",
  117. ],
  118. )
  119. cc_test(
  120. name = "string_helpers_test",
  121. srcs = ["string_helpers_test.cpp"],
  122. deps = [
  123. ":string_helpers",
  124. "//testing/util:gtest_main",
  125. "@com_google_googletest//:gtest",
  126. "@llvm-project//llvm:Support",
  127. ],
  128. )
  129. cc_library(
  130. name = "vlog",
  131. srcs = ["vlog_internal.h"],
  132. hdrs = ["vlog.h"],
  133. deps = [
  134. "@llvm-project//llvm:Support",
  135. ],
  136. )
  137. cc_test(
  138. name = "vlog_test",
  139. srcs = ["vlog_test.cpp"],
  140. deps = [
  141. ":vlog",
  142. "//testing/util:gtest_main",
  143. "//testing/util:test_raw_ostream",
  144. "@com_google_googletest//:gtest",
  145. ],
  146. )