Keir Mierle | af5e358 | 2019-12-30 13:11:05 -0800 | [diff] [blame] | 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 | |
Wyatt Hepler | 4981058 | 2020-01-24 11:26:35 -0800 | [diff] [blame] | 15 | load( |
| 16 | "//pw_build:pigweed.bzl", |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 17 | "pw_cc_facade", |
Wyatt Hepler | 4981058 | 2020-01-24 11:26:35 -0800 | [diff] [blame] | 18 | "pw_cc_library", |
| 19 | "pw_cc_test", |
| 20 | ) |
| 21 | |
Keir Mierle | af5e358 | 2019-12-30 13:11:05 -0800 | [diff] [blame] | 22 | package(default_visibility = ["//visibility:public"]) |
| 23 | |
| 24 | licenses(["notice"]) # Apache License 2.0 |
| 25 | |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 26 | pw_cc_facade( |
Wyatt Hepler | 4981058 | 2020-01-24 11:26:35 -0800 | [diff] [blame] | 27 | name = "facade", |
| 28 | hdrs = [ |
Keir Mierle | af5e358 | 2019-12-30 13:11:05 -0800 | [diff] [blame] | 29 | "public/pw_log/levels.h", |
Wyatt Hepler | 4981058 | 2020-01-24 11:26:35 -0800 | [diff] [blame] | 30 | "public/pw_log/log.h", |
Wyatt Hepler | 9a5d64e | 2020-08-06 12:36:11 -0700 | [diff] [blame] | 31 | "public/pw_log/options.h", |
Wyatt Hepler | 0cdb1a3 | 2021-03-05 14:16:13 -0800 | [diff] [blame] | 32 | "public/pw_log/short.h", |
| 33 | "public/pw_log/shorter.h", |
Wyatt Hepler | 4981058 | 2020-01-24 11:26:35 -0800 | [diff] [blame] | 34 | ], |
| 35 | includes = ["public"], |
| 36 | deps = [ |
| 37 | "//pw_preprocessor", |
Keir Mierle | af5e358 | 2019-12-30 13:11:05 -0800 | [diff] [blame] | 38 | ], |
| 39 | ) |
| 40 | |
Wyatt Hepler | 4981058 | 2020-01-24 11:26:35 -0800 | [diff] [blame] | 41 | pw_cc_library( |
| 42 | name = "pw_log", |
| 43 | deps = [ |
| 44 | ":facade", |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 45 | "@pigweed_config//:pw_log_backend", |
Rob Mohr | 4d61540 | 2020-04-03 12:13:19 -0700 | [diff] [blame] | 46 | ], |
| 47 | ) |
| 48 | |
| 49 | pw_cc_library( |
Prashanth Swaminathan | 8015cec | 2021-06-04 10:00:40 -0700 | [diff] [blame] | 50 | name = "proto_utils", |
| 51 | srcs = [ |
| 52 | "proto_utils.cc", |
| 53 | ], |
| 54 | hdrs = [ |
| 55 | "public/pw_log/proto_utils.h", |
| 56 | ], |
| 57 | deps = [ |
| 58 | ":facade", |
| 59 | "//pw_bytes", |
| 60 | "//pw_log_tokenized", |
| 61 | "//pw_result", |
| 62 | ], |
| 63 | ) |
| 64 | |
| 65 | pw_cc_library( |
Nathaniel Brough | c2d5781 | 2021-04-18 22:52:00 +0800 | [diff] [blame] | 66 | name = "backend_multiplexer", |
| 67 | visibility = ["@pigweed_config//:__pkg__"], |
| 68 | deps = ["//pw_log_basic"], |
Wyatt Hepler | 4981058 | 2020-01-24 11:26:35 -0800 | [diff] [blame] | 69 | ) |
| 70 | |
| 71 | pw_cc_test( |
Keir Mierle | af5e358 | 2019-12-30 13:11:05 -0800 | [diff] [blame] | 72 | name = "test", |
| 73 | srcs = [ |
| 74 | "basic_log_test.cc", |
| 75 | "basic_log_test_plain_c.c", |
| 76 | ], |
Rob Mohr | 4d61540 | 2020-04-03 12:13:19 -0700 | [diff] [blame] | 77 | deps = [ |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 78 | ":facade", |
Rob Mohr | 4d61540 | 2020-04-03 12:13:19 -0700 | [diff] [blame] | 79 | ":pw_log", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 80 | "//pw_preprocessor", |
| 81 | "//pw_unit_test", |
Rob Mohr | 4d61540 | 2020-04-03 12:13:19 -0700 | [diff] [blame] | 82 | ], |
Keir Mierle | af5e358 | 2019-12-30 13:11:05 -0800 | [diff] [blame] | 83 | ) |
Prashanth Swaminathan | 8015cec | 2021-06-04 10:00:40 -0700 | [diff] [blame] | 84 | |
| 85 | pw_cc_test( |
| 86 | name = "proto_utils_test", |
| 87 | srcs = [ |
| 88 | "proto_utils_test.cc", |
| 89 | ], |
| 90 | deps = [ |
| 91 | ":facade", |
| 92 | ":proto_utils", |
Prashanth Swaminathan | 8015cec | 2021-06-04 10:00:40 -0700 | [diff] [blame] | 93 | "//pw_preprocessor", |
Rob Mohr | 9c266ab | 2021-06-14 17:48:49 -0700 | [diff] [blame] | 94 | "//pw_protobuf", |
Prashanth Swaminathan | 8015cec | 2021-06-04 10:00:40 -0700 | [diff] [blame] | 95 | "//pw_unit_test", |
| 96 | ], |
| 97 | ) |