Rob Mohr | 75e5fc9 | 2019-11-14 09:16:03 -0800 | [diff] [blame] | 1 | # Copyright 2019 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 | |
Rob Mohr | 75e5fc9 | 2019-11-14 09:16:03 -0800 | [diff] [blame] | 15 | load( |
| 16 | "//pw_build:pigweed.bzl", |
Rob Mohr | c70366e | 2019-11-18 11:09:39 -0800 | [diff] [blame] | 17 | "pw_cc_library", |
| 18 | "pw_cc_test", |
Rob Mohr | 75e5fc9 | 2019-11-14 09:16:03 -0800 | [diff] [blame] | 19 | ) |
| 20 | |
Rob Mohr | c278750 | 2019-11-19 09:50:42 -0800 | [diff] [blame] | 21 | package(default_visibility = ["//visibility:public"]) |
| 22 | |
| 23 | licenses(["notice"]) # Apache License 2.0 |
| 24 | |
Rob Mohr | c70366e | 2019-11-18 11:09:39 -0800 | [diff] [blame] | 25 | pw_cc_library( |
Rob Mohr | 75e5fc9 | 2019-11-14 09:16:03 -0800 | [diff] [blame] | 26 | name = "pw_string", |
Wyatt Hepler | e2dc6d1 | 2019-11-15 09:05:07 -0800 | [diff] [blame] | 27 | srcs = [ |
| 28 | "format.cc", |
Wyatt Hepler | ce9b952 | 2019-11-11 10:45:48 -0800 | [diff] [blame] | 29 | "string_builder.cc", |
Wyatt Hepler | e2dc6d1 | 2019-11-15 09:05:07 -0800 | [diff] [blame] | 30 | "type_to_string.cc", |
| 31 | ], |
Rob Mohr | cf185b4 | 2019-11-14 10:23:28 -0800 | [diff] [blame] | 32 | hdrs = [ |
Wyatt Hepler | e2dc6d1 | 2019-11-15 09:05:07 -0800 | [diff] [blame] | 33 | "public/pw_string/format.h", |
Wyatt Hepler | ce9b952 | 2019-11-11 10:45:48 -0800 | [diff] [blame] | 34 | "public/pw_string/string_builder.h", |
Rob Mohr | cf185b4 | 2019-11-14 10:23:28 -0800 | [diff] [blame] | 35 | "public/pw_string/to_string.h", |
| 36 | "public/pw_string/type_to_string.h", |
Wyatt Hepler | ce9b952 | 2019-11-11 10:45:48 -0800 | [diff] [blame] | 37 | "public/pw_string/util.h", |
Rob Mohr | cf185b4 | 2019-11-14 10:23:28 -0800 | [diff] [blame] | 38 | ], |
Wyatt Hepler | 61def0a | 2020-01-06 10:30:14 -0800 | [diff] [blame] | 39 | includes = ["public"], |
Rob Mohr | 75e5fc9 | 2019-11-14 09:16:03 -0800 | [diff] [blame] | 40 | deps = [ |
| 41 | "//pw_preprocessor", |
| 42 | "//pw_span", |
| 43 | "//pw_status", |
| 44 | ], |
| 45 | ) |
| 46 | |
Rob Mohr | c70366e | 2019-11-18 11:09:39 -0800 | [diff] [blame] | 47 | pw_cc_test( |
Wyatt Hepler | e2dc6d1 | 2019-11-15 09:05:07 -0800 | [diff] [blame] | 48 | name = "format_test", |
| 49 | srcs = ["format_test.cc"], |
Rob Mohr | c8dd7fd | 2019-11-19 09:15:26 -0800 | [diff] [blame] | 50 | deps = [ |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 51 | ":pw_string", |
Rob Mohr | c8dd7fd | 2019-11-19 09:15:26 -0800 | [diff] [blame] | 52 | "//pw_span", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 53 | "//pw_unit_test", |
Rob Mohr | c8dd7fd | 2019-11-19 09:15:26 -0800 | [diff] [blame] | 54 | ], |
Wyatt Hepler | e2dc6d1 | 2019-11-15 09:05:07 -0800 | [diff] [blame] | 55 | ) |
| 56 | |
Rob Mohr | c70366e | 2019-11-18 11:09:39 -0800 | [diff] [blame] | 57 | pw_cc_test( |
Rob Mohr | 75e5fc9 | 2019-11-14 09:16:03 -0800 | [diff] [blame] | 58 | name = "type_to_string_test", |
| 59 | srcs = ["type_to_string_test.cc"], |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 60 | deps = [ |
| 61 | ":pw_string", |
| 62 | "//pw_unit_test", |
| 63 | ], |
Rob Mohr | 75e5fc9 | 2019-11-14 09:16:03 -0800 | [diff] [blame] | 64 | ) |
Rob Mohr | cf185b4 | 2019-11-14 10:23:28 -0800 | [diff] [blame] | 65 | |
Rob Mohr | c70366e | 2019-11-18 11:09:39 -0800 | [diff] [blame] | 66 | pw_cc_test( |
Wyatt Hepler | ce9b952 | 2019-11-11 10:45:48 -0800 | [diff] [blame] | 67 | name = "string_builder_test", |
| 68 | srcs = ["string_builder_test.cc"], |
| 69 | deps = [ |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 70 | ":pw_string", |
| 71 | "//pw_unit_test", |
Wyatt Hepler | ce9b952 | 2019-11-11 10:45:48 -0800 | [diff] [blame] | 72 | ], |
| 73 | ) |
| 74 | |
| 75 | pw_cc_test( |
Rob Mohr | cf185b4 | 2019-11-14 10:23:28 -0800 | [diff] [blame] | 76 | name = "to_string_test", |
| 77 | srcs = ["to_string_test.cc"], |
Rob Mohr | 905d628 | 2019-11-18 14:24:30 -0800 | [diff] [blame] | 78 | deps = [ |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 79 | ":pw_string", |
Rob Mohr | 905d628 | 2019-11-18 14:24:30 -0800 | [diff] [blame] | 80 | "//pw_status", |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 81 | "//pw_unit_test", |
Rob Mohr | 905d628 | 2019-11-18 14:24:30 -0800 | [diff] [blame] | 82 | ], |
Rob Mohr | cf185b4 | 2019-11-14 10:23:28 -0800 | [diff] [blame] | 83 | ) |
Rob Mohr | 3895a12 | 2019-12-02 11:49:18 -0800 | [diff] [blame] | 84 | |
| 85 | pw_cc_test( |
| 86 | name = "util_test", |
| 87 | srcs = ["util_test.cc"], |
Rob Mohr | 0681948 | 2020-04-06 13:25:43 -0700 | [diff] [blame] | 88 | deps = [ |
| 89 | ":pw_string", |
| 90 | "//pw_unit_test", |
| 91 | ], |
Rob Mohr | 3895a12 | 2019-12-02 11:49:18 -0800 | [diff] [blame] | 92 | ) |