blob: 72cbcaf7010bbdf11bc29a5ad06cf82c7bd3fdfa [file] [log] [blame]
Rob Mohr75e5fc92019-11-14 09:16:03 -08001# 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 Mohr75e5fc92019-11-14 09:16:03 -080015load(
16 "//pw_build:pigweed.bzl",
Rob Mohrc70366e2019-11-18 11:09:39 -080017 "pw_cc_library",
18 "pw_cc_test",
Rob Mohr75e5fc92019-11-14 09:16:03 -080019)
20
Rob Mohrc2787502019-11-19 09:50:42 -080021package(default_visibility = ["//visibility:public"])
22
23licenses(["notice"]) # Apache License 2.0
24
Rob Mohrc70366e2019-11-18 11:09:39 -080025pw_cc_library(
Rob Mohr75e5fc92019-11-14 09:16:03 -080026 name = "pw_string",
Wyatt Heplere2dc6d12019-11-15 09:05:07 -080027 srcs = [
28 "format.cc",
Wyatt Heplerce9b9522019-11-11 10:45:48 -080029 "string_builder.cc",
Wyatt Heplere2dc6d12019-11-15 09:05:07 -080030 "type_to_string.cc",
31 ],
Rob Mohrcf185b42019-11-14 10:23:28 -080032 hdrs = [
Wyatt Heplere2dc6d12019-11-15 09:05:07 -080033 "public/pw_string/format.h",
Wyatt Heplerce9b9522019-11-11 10:45:48 -080034 "public/pw_string/string_builder.h",
Rob Mohrcf185b42019-11-14 10:23:28 -080035 "public/pw_string/to_string.h",
36 "public/pw_string/type_to_string.h",
Wyatt Heplerce9b9522019-11-11 10:45:48 -080037 "public/pw_string/util.h",
Rob Mohrcf185b42019-11-14 10:23:28 -080038 ],
Wyatt Hepler61def0a2020-01-06 10:30:14 -080039 includes = ["public"],
Rob Mohr75e5fc92019-11-14 09:16:03 -080040 deps = [
41 "//pw_preprocessor",
42 "//pw_span",
43 "//pw_status",
44 ],
45)
46
Rob Mohrc70366e2019-11-18 11:09:39 -080047pw_cc_test(
Wyatt Heplere2dc6d12019-11-15 09:05:07 -080048 name = "format_test",
49 srcs = ["format_test.cc"],
Rob Mohrc8dd7fd2019-11-19 09:15:26 -080050 deps = [
51 "//pw_span",
52 "//pw_string",
53 ],
Wyatt Heplere2dc6d12019-11-15 09:05:07 -080054)
55
Rob Mohrc70366e2019-11-18 11:09:39 -080056pw_cc_test(
Rob Mohr75e5fc92019-11-14 09:16:03 -080057 name = "type_to_string_test",
58 srcs = ["type_to_string_test.cc"],
Rob Mohr75e5fc92019-11-14 09:16:03 -080059 deps = ["//pw_string"],
60)
Rob Mohrcf185b42019-11-14 10:23:28 -080061
Rob Mohrc70366e2019-11-18 11:09:39 -080062pw_cc_test(
Wyatt Heplerce9b9522019-11-11 10:45:48 -080063 name = "string_builder_test",
64 srcs = ["string_builder_test.cc"],
65 deps = [
66 "//pw_string",
67 ],
68)
69
70pw_cc_test(
Rob Mohrcf185b42019-11-14 10:23:28 -080071 name = "to_string_test",
72 srcs = ["to_string_test.cc"],
Rob Mohr905d6282019-11-18 14:24:30 -080073 deps = [
74 "//pw_status",
75 "//pw_string",
76 ],
Rob Mohrcf185b42019-11-14 10:23:28 -080077)
Rob Mohr3895a122019-12-02 11:49:18 -080078
79pw_cc_test(
80 name = "util_test",
81 srcs = ["util_test.cc"],
82 deps = ["//pw_string"],
83)