xref: /aosp_15_r20/external/pigweed/pw_assert_tokenized/BUILD.gn (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1# Copyright 2022 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
15import("//build_overrides/pigweed.gni")
16
17import("$dir_pw_build/target_types.gni")
18import("$dir_pw_docgen/docs.gni")
19import("$dir_pw_unit_test/test.gni")
20
21declare_args() {
22  pw_assert_tokenized_HANDLER_BACKEND = "$dir_pw_assert_tokenized:log_handler"
23}
24
25config("public_include_path") {
26  include_dirs = [ "public" ]
27  visibility = [ ":*" ]
28}
29
30config("assert_backend_config") {
31  include_dirs = [ "assert_public_overrides" ]
32  visibility = [ ":*" ]
33}
34
35config("check_backend_config") {
36  include_dirs = [ "check_public_overrides" ]
37  visibility = [ ":*" ]
38}
39
40pw_source_set("handler") {
41  public_configs = [ ":public_include_path" ]
42  public_deps = [ "$dir_pw_preprocessor" ]
43  public = [ "public/pw_assert_tokenized/handler.h" ]
44}
45
46pw_source_set("assert_backend") {
47  public_configs = [
48    ":public_include_path",
49    ":assert_backend_config",
50  ]
51  public_deps = [
52    ":handler",
53    "$dir_pw_tokenizer",
54  ]
55  public = [
56    "assert_public_overrides/pw_assert_backend/assert_backend.h",
57    "public/pw_assert_tokenized/assert_tokenized.h",
58  ]
59}
60
61pw_source_set("assert_backend.impl") {
62  public_deps = [ pw_assert_tokenized_HANDLER_BACKEND ]
63}
64
65pw_source_set("check_backend") {
66  public_configs = [
67    ":public_include_path",
68    ":check_backend_config",
69  ]
70  public_deps = [
71    ":handler",
72    "$dir_pw_log_tokenized",
73    "$dir_pw_tokenizer",
74  ]
75  public = [
76    "check_public_overrides/pw_assert_backend/check_backend.h",
77    "public/pw_assert_tokenized/check_tokenized.h",
78  ]
79}
80
81pw_source_set("check_backend.impl") {
82  public_deps = [ pw_assert_tokenized_HANDLER_BACKEND ]
83}
84
85pw_source_set("pw_assert_tokenized") {
86  public_deps = [
87    ":assert_backend",
88    ":check_backend",
89  ]
90}
91
92pw_source_set("pw_assert_tokenized.impl") {
93  deps = [
94    ":assert_backend.impl",
95    ":check_backend.impl",
96  ]
97}
98
99pw_source_set("log_handler") {
100  deps = [
101    ":handler",
102    "$dir_pw_assert:config",
103    "$dir_pw_base64",
104    "$dir_pw_bytes",
105    "$dir_pw_log",
106    "$dir_pw_log_tokenized",
107    "$dir_pw_span",
108  ]
109  sources = [ "log_handler.cc" ]
110}
111
112pw_doc_group("docs") {
113  sources = [ "docs.rst" ]
114}
115
116pw_test_group("tests") {
117}
118