Wyatt Hepler | 0fbcdfc | 2020-01-02 07:53:39 -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 | 0a6f763 | 2020-10-29 09:08:19 -0700 | [diff] [blame] | 15 | include($ENV{PW_ROOT}/pw_build/pigweed.cmake) |
| 16 | |
Ewout van Bekkum | fdf1cd4 | 2022-01-19 17:26:59 -0800 | [diff] [blame] | 17 | pw_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 Hepler | 0fbcdfc | 2020-01-02 07:53:39 -0800 | [diff] [blame] | 27 | PUBLIC_DEPS |
Ewout van Bekkum | c2e9d88 | 2021-04-29 16:01:27 -0700 | [diff] [blame] | 28 | pw_assert |
Ewout van Bekkum | fdf1cd4 | 2022-01-19 17:26:59 -0800 | [diff] [blame] | 29 | pw_polyfill.span |
Wyatt Hepler | 0fbcdfc | 2020-01-02 07:53:39 -0800 | [diff] [blame] | 30 | pw_preprocessor |
Ewout van Bekkum | f89f137 | 2021-05-03 11:15:54 -0700 | [diff] [blame] | 31 | pw_result |
Wyatt Hepler | 0fbcdfc | 2020-01-02 07:53:39 -0800 | [diff] [blame] | 32 | pw_status |
Ewout van Bekkum | fdf1cd4 | 2022-01-19 17:26:59 -0800 | [diff] [blame] | 33 | SOURCES |
| 34 | format.cc |
| 35 | string_builder.cc |
| 36 | type_to_string.cc |
Wyatt Hepler | 0fbcdfc | 2020-01-02 07:53:39 -0800 | [diff] [blame] | 37 | ) |
Yuval Peress | b8f3ad2 | 2021-10-26 22:55:27 -0600 | [diff] [blame] | 38 | if(Zephyr_FOUND AND CONFIG_PIGWEED_STRING) |
| 39 | zephyr_link_libraries(pw_string) |
| 40 | endif() |
Ewout van Bekkum | fdf1cd4 | 2022-01-19 17:26:59 -0800 | [diff] [blame] | 41 | |
| 42 | pw_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 | |
| 52 | pw_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 | |
| 62 | pw_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 | |
| 72 | pw_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 | |
| 82 | pw_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 | ) |