1load(
2    "//tools/build_defs/oss:rn_defs.bzl",
3    "ANDROID",
4    "APPLE",
5    "CXX",
6    "fb_xplat_cxx_test",
7    "get_apple_compiler_flags",
8    "get_apple_inspector_flags",
9    "get_preprocessor_flags_for_build_mode",
10    "react_native_xplat_target",
11    "rn_xplat_cxx_library",
12    "subdir_glob",
13)
14
15APPLE_COMPILER_FLAGS = get_apple_compiler_flags()
16
17rn_xplat_cxx_library(
18    name = "unimplementedview",
19    srcs = glob(
20        ["**/*.cpp"],
21        exclude = glob(["tests/**/*.cpp"]),
22    ),
23    headers = [],
24    header_namespace = "",
25    exported_headers = subdir_glob(
26        [
27            ("", "*.h"),
28        ],
29        prefix = "react/renderer/components/unimplementedview",
30    ),
31    compiler_flags_pedantic = True,
32    fbobjc_compiler_flags = APPLE_COMPILER_FLAGS,
33    fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(),
34    labels = [
35        "pfh:ReactNative_CommonInfrastructurePlaceholder",
36    ],
37    macosx_tests_override = [],
38    platforms = (ANDROID, APPLE, CXX),
39    preprocessor_flags = [
40        "-DLOG_TAG=\"ReactNative\"",
41        "-DWITH_FBSYSTRACE=1",
42    ],
43    tests = [":tests"],
44    visibility = ["PUBLIC"],
45    deps = [
46        react_native_xplat_target("react/debug:debug"),
47        react_native_xplat_target("react/renderer/debug:debug"),
48        react_native_xplat_target("react/renderer/core:core"),
49        react_native_xplat_target("react/renderer/components/view:view"),
50    ],
51)
52
53fb_xplat_cxx_test(
54    name = "tests",
55    srcs = glob(["tests/**/*.cpp"]),
56    headers = glob(["tests/**/*.h"]),
57    compiler_flags = [
58        "-fexceptions",
59        "-frtti",
60        "-std=c++17",
61        "-Wall",
62    ],
63    contacts = ["[email protected]"],
64    platforms = (ANDROID, APPLE, CXX),
65    deps = [
66        ":unimplementedview",
67        "//xplat/third-party/gmock:gtest",
68    ],
69)
70