BUCK 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. load(
  2. "//tools/build_defs/oss:rn_defs.bzl",
  3. "ANDROID",
  4. "fb_xplat_cxx_test",
  5. "react_native_xplat_target",
  6. "rn_xplat_cxx_library",
  7. "subdir_glob",
  8. )
  9. rn_xplat_cxx_library(
  10. name = "mapbuffer",
  11. srcs = glob(
  12. ["**/*.cpp"],
  13. exclude = glob(["tests/**/*.cpp"]),
  14. ),
  15. headers = glob(
  16. ["**/*.h"],
  17. exclude = glob(["tests/**/*.h"]),
  18. ),
  19. header_namespace = "",
  20. exported_headers = subdir_glob(
  21. [
  22. ("", "*.h"),
  23. ],
  24. prefix = "react",
  25. ),
  26. compiler_flags = [
  27. "-fexceptions",
  28. "-frtti",
  29. "-std=c++14",
  30. "-Wall",
  31. ],
  32. fbobjc_labels = ["supermodule:ios/default/public.react_native.infra"],
  33. force_static = True,
  34. macosx_tests_override = [],
  35. platforms = (ANDROID),
  36. preprocessor_flags = [
  37. "-DLOG_TAG=\"ReactNative\"",
  38. ],
  39. tests = [":tests"],
  40. visibility = ["PUBLIC"],
  41. deps = [
  42. "//xplat/fbsystrace:fbsystrace",
  43. "//xplat/folly:headers_only",
  44. "//xplat/folly:memory",
  45. "//xplat/third-party/glog:glog",
  46. react_native_xplat_target("utils:utils"),
  47. ],
  48. )
  49. fb_xplat_cxx_test(
  50. name = "tests",
  51. srcs = glob(["tests/**/*.cpp"]),
  52. headers = glob(["tests/**/*.h"]),
  53. compiler_flags = [
  54. "-fexceptions",
  55. "-frtti",
  56. "-std=c++14",
  57. "-Wall",
  58. ],
  59. contacts = ["oncall+react_native@xmail.facebook.com"],
  60. platforms = (ANDROID),
  61. deps = [
  62. "//xplat/folly:molly",
  63. "//xplat/third-party/gmock:gtest",
  64. ],
  65. )