BUCK 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. load("@fbsource//tools/build_defs/apple:flag_defs.bzl", "get_preprocessor_flags_for_build_mode")
  2. load(
  3. "//tools/build_defs/oss:rn_defs.bzl",
  4. "ANDROID",
  5. "APPLE",
  6. "CXX",
  7. "YOGA_CXX_TARGET",
  8. "fb_xplat_cxx_test",
  9. "get_apple_compiler_flags",
  10. "get_apple_inspector_flags",
  11. "react_native_xplat_target",
  12. "rn_xplat_cxx_library",
  13. "subdir_glob",
  14. )
  15. APPLE_COMPILER_FLAGS = get_apple_compiler_flags()
  16. rn_xplat_cxx_library(
  17. name = "unimplementedview",
  18. srcs = glob(
  19. ["**/*.cpp"],
  20. exclude = glob(["tests/**/*.cpp"]),
  21. ),
  22. headers = [],
  23. header_namespace = "",
  24. exported_headers = subdir_glob(
  25. [
  26. ("", "*.h"),
  27. ],
  28. prefix = "react/components/unimplementedview",
  29. ),
  30. compiler_flags = [
  31. "-fexceptions",
  32. "-frtti",
  33. "-std=c++14",
  34. "-Wall",
  35. ],
  36. fbobjc_compiler_flags = APPLE_COMPILER_FLAGS,
  37. fbobjc_labels = ["supermodule:ios/default/public.react_native.infra"],
  38. fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(),
  39. macosx_tests_override = [],
  40. platforms = (ANDROID, APPLE, CXX),
  41. preprocessor_flags = [
  42. "-DLOG_TAG=\"ReactNative\"",
  43. "-DWITH_FBSYSTRACE=1",
  44. ],
  45. tests = [":tests"],
  46. visibility = ["PUBLIC"],
  47. deps = [
  48. "//xplat/fbsystrace:fbsystrace",
  49. "//xplat/folly:headers_only",
  50. "//xplat/folly:memory",
  51. "//xplat/folly:molly",
  52. "//xplat/third-party/glog:glog",
  53. YOGA_CXX_TARGET,
  54. react_native_xplat_target("fabric/debug:debug"),
  55. react_native_xplat_target("fabric/core:core"),
  56. react_native_xplat_target("fabric/components/view:view"),
  57. ],
  58. )
  59. fb_xplat_cxx_test(
  60. name = "tests",
  61. srcs = glob(["tests/**/*.cpp"]),
  62. headers = glob(["tests/**/*.h"]),
  63. compiler_flags = [
  64. "-fexceptions",
  65. "-frtti",
  66. "-std=c++14",
  67. "-Wall",
  68. ],
  69. contacts = ["oncall+react_native@xmail.facebook.com"],
  70. platforms = (ANDROID, APPLE, CXX),
  71. deps = [
  72. ":unimplementedview",
  73. "//xplat/folly:molly",
  74. "//xplat/third-party/gmock:gtest",
  75. ],
  76. )