• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15include($ENV{PW_ROOT}/pw_build/pigweed.cmake)
16
17pw_add_module_config(pw_string_CONFIG)
18
19pw_add_library(pw_string.config INTERFACE
20  HEADERS
21    public/pw_string/internal/config.h
22  PUBLIC_INCLUDES
23    public
24  PUBLIC_DEPS
25    ${pw_string_CONFIG}
26)
27
28pw_add_library(pw_string INTERFACE
29  PUBLIC_DEPS
30    pw_string.builder
31    pw_string.format
32    pw_string.to_string
33    pw_string.util
34)
35
36pw_add_library(pw_string.builder STATIC
37  HEADERS
38    public/pw_string/string_builder.h
39  PUBLIC_INCLUDES
40    public
41  PUBLIC_DEPS
42    pw_string.format
43    pw_string.string
44    pw_string.to_string
45    pw_string.util
46    pw_preprocessor
47    pw_status
48  SOURCES
49    string_builder.cc
50)
51
52pw_add_library(pw_string.format STATIC
53  HEADERS
54    public/pw_string/format.h
55  PUBLIC_INCLUDES
56    public
57  PUBLIC_DEPS
58    pw_preprocessor
59    pw_span
60    pw_status
61    pw_string.string
62  SOURCES
63    format.cc
64)
65
66pw_add_library(pw_string.string INTERFACE
67  HEADERS
68    public/pw_string/string.h
69    public/pw_string/internal/string_impl.h
70  PUBLIC_INCLUDES
71    public
72  PUBLIC_DEPS
73    pw_assert
74)
75
76pw_add_library(pw_string.to_string STATIC
77  HEADERS
78    public/pw_string/to_string.h
79    public/pw_string/type_to_string.h
80  PUBLIC_INCLUDES
81    public
82  PUBLIC_DEPS
83    pw_result
84    pw_string.config
85    pw_string.format
86    pw_string.util
87    pw_status
88    pw_third_party.fuchsia.stdcompat
89  SOURCES
90    type_to_string.cc
91)
92
93pw_add_library(pw_string.util INTERFACE
94  HEADERS
95    public/pw_string/util.h
96    public/pw_string/internal/length.h
97  PUBLIC_INCLUDES
98    public
99  PUBLIC_DEPS
100    pw_assert
101    pw_result
102    pw_span
103    pw_status
104    pw_string.string
105)
106
107pw_add_test(pw_string.format_test
108  SOURCES
109    format_test.cc
110  PRIVATE_DEPS
111    pw_string
112  GROUPS
113    modules
114    pw_string
115)
116
117pw_add_test(pw_string.string_builder_test
118  SOURCES
119    string_builder_test.cc
120  PRIVATE_DEPS
121    pw_string
122  GROUPS
123    modules
124    pw_string
125)
126
127pw_add_test(pw_string.string_test
128  SOURCES
129    string_test.cc
130  PRIVATE_DEPS
131    pw_compilation_testing._pigweed_only_negative_compilation
132    pw_string.string
133  GROUPS
134    modules
135    pw_string
136)
137
138pw_add_test(pw_string.to_string_test
139  SOURCES
140    to_string_test.cc
141  PRIVATE_DEPS
142    pw_string
143    pw_string.config
144  GROUPS
145    modules
146    pw_string
147)
148
149pw_add_test(pw_string.type_to_string_test
150  SOURCES
151    type_to_string_test.cc
152  PRIVATE_DEPS
153    pw_string
154  GROUPS
155    modules
156    pw_string
157)
158
159pw_add_test(pw_string.util_test
160  SOURCES
161    util_test.cc
162  PRIVATE_DEPS
163    pw_string
164  GROUPS
165    modules
166    pw_string
167)
168