blob: 6103ddcd6f3a7527926602b8e8f6f48b02eba68c [file] [log] [blame]
Wyatt Hepler0fbcdfc2020-01-02 07:53:39 -08001# 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 Hepler0a6f7632020-10-29 09:08:19 -070015include($ENV{PW_ROOT}/pw_build/pigweed.cmake)
16
Ewout van Bekkumfdf1cd42022-01-19 17:26:59 -080017pw_add_module_library(pw_string
18 HEADERS
19 public/pw_string/format.h
20 public/pw_string/internal/length.h
21 public/pw_string/string_builder.h
22 public/pw_string/to_string.h
23 public/pw_string/type_to_string.h
24 public/pw_string/util.h
25 PUBLIC_INCLUDES
26 public
Wyatt Hepler0fbcdfc2020-01-02 07:53:39 -080027 PUBLIC_DEPS
Ewout van Bekkumc2e9d882021-04-29 16:01:27 -070028 pw_assert
Ewout van Bekkumfdf1cd42022-01-19 17:26:59 -080029 pw_polyfill.span
Wyatt Hepler0fbcdfc2020-01-02 07:53:39 -080030 pw_preprocessor
Ewout van Bekkumf89f1372021-05-03 11:15:54 -070031 pw_result
Wyatt Hepler0fbcdfc2020-01-02 07:53:39 -080032 pw_status
Ewout van Bekkumfdf1cd42022-01-19 17:26:59 -080033 SOURCES
34 format.cc
35 string_builder.cc
36 type_to_string.cc
Wyatt Hepler0fbcdfc2020-01-02 07:53:39 -080037)
Yuval Peressb8f3ad22021-10-26 22:55:27 -060038if(Zephyr_FOUND AND CONFIG_PIGWEED_STRING)
39 zephyr_link_libraries(pw_string)
40endif()
Ewout van Bekkumfdf1cd42022-01-19 17:26:59 -080041
42pw_add_test(pw_string.format_test
43 SOURCES
44 format_test.cc
45 DEPS
46 pw_string
47 GROUPS
48 modules
49 pw_string
50)
51
52pw_add_test(pw_string.string_builder_test
53 SOURCES
54 string_builder_test.cc
55 DEPS
56 pw_string
57 GROUPS
58 modules
59 pw_string
60)
61
62pw_add_test(pw_string.to_string_test
63 SOURCES
64 to_string_test.cc
65 DEPS
66 pw_string
67 GROUPS
68 modules
69 pw_string
70)
71
72pw_add_test(pw_string.type_to_string_test
73 SOURCES
74 type_to_string_test.cc
75 DEPS
76 pw_string
77 GROUPS
78 modules
79 pw_string
80)
81
82pw_add_test(pw_string.util_test
83 SOURCES
84 util_test.cc
85 DEPS
86 pw_string
87 GROUPS
88 modules
89 pw_string
90)