Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / pigweed / repo / pw_rpc / raw / BUILD.gn
1 # Copyright 2020 The Pigweed Authors
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 # use this file except in compliance with the License. You may obtain a copy of
5 # the License at
6 #
7 #     https://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 # License for the specific language governing permissions and limitations under
13 # the License.
14
15 # gn-format disable
16 import("//build_overrides/pigweed.gni")
17
18 import("$dir_pw_build/target_types.gni")
19 import("$dir_pw_docgen/docs.gni")
20 import("$dir_pw_unit_test/test.gni")
21 config("public") {
22   include_dirs = [ "public" ]
23   visibility = [ ":*" ]
24 }
25
26 pw_source_set("method") {
27   public_configs = [ ":public" ]
28   public = [ "public/pw_rpc/internal/raw_method.h" ]
29   sources = [ "raw_method.cc" ]
30   public_deps = [
31     "..:server",
32     dir_pw_bytes,
33   ]
34   deps = [ dir_pw_log ]
35 }
36
37 pw_source_set("method_union") {
38   public_configs = [ ":public" ]
39   public = [ "public/pw_rpc/internal/raw_method_union.h" ]
40   public_deps = [ ":method" ]
41 }
42
43 pw_source_set("test_method_context") {
44   public_configs = [ ":public" ]
45   public = [ "public/pw_rpc/raw_test_method_context.h" ]
46   public_deps = [
47     ":method",
48     dir_pw_assert,
49     dir_pw_containers,
50   ]
51 }
52
53 pw_test_group("tests") {
54   tests = [
55     ":codegen_test",
56     ":raw_method_test",
57     ":raw_method_union_test",
58     ":stub_generation_test",
59   ]
60 }
61
62 pw_test("codegen_test") {
63   deps = [
64     ":test_method_context",
65     "..:test_protos.pwpb",
66     "..:test_protos.raw_rpc",
67     dir_pw_protobuf,
68   ]
69   sources = [ "codegen_test.cc" ]
70 }
71
72 pw_test("raw_method_test") {
73   deps = [
74     ":method",
75     ":method_union",
76     "..:test_protos.pwpb",
77     "..:test_protos.raw_rpc",
78     "..:test_utils",
79     dir_pw_protobuf,
80   ]
81   sources = [ "raw_method_test.cc" ]
82 }
83
84 pw_test("raw_method_union_test") {
85   deps = [
86     ":method_union",
87     "..:test_protos.pwpb",
88     "..:test_utils",
89     dir_pw_protobuf,
90   ]
91   sources = [ "raw_method_union_test.cc" ]
92 }
93
94 pw_test("stub_generation_test") {
95   deps = [ "..:test_protos.raw_rpc" ]
96   sources = [ "stub_generation_test.cc" ]
97 }