shaneajg | 9c19db4 | 2020-06-11 15:49:51 -0400 | [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 | 984921a | 2022-01-20 08:13:54 -0800 | [diff] [blame] | 17 | pw_add_module_library(pw_bytes |
| 18 | HEADERS |
| 19 | public/pw_bytes/array.h |
| 20 | public/pw_bytes/byte_builder.h |
| 21 | public/pw_bytes/endian.h |
| 22 | public/pw_bytes/span.h |
| 23 | public/pw_bytes/units.h |
| 24 | PUBLIC_INCLUDES |
| 25 | public |
shaneajg | 9c19db4 | 2020-06-11 15:49:51 -0400 | [diff] [blame] | 26 | PUBLIC_DEPS |
Ewout van Bekkum | 984921a | 2022-01-20 08:13:54 -0800 | [diff] [blame] | 27 | pw_polyfill |
| 28 | pw_polyfill.cstddef |
| 29 | pw_polyfill.span |
shaneajg | 9c19db4 | 2020-06-11 15:49:51 -0400 | [diff] [blame] | 30 | pw_preprocessor |
shaneajg | 9c19db4 | 2020-06-11 15:49:51 -0400 | [diff] [blame] | 31 | pw_status |
Ewout van Bekkum | 984921a | 2022-01-20 08:13:54 -0800 | [diff] [blame] | 32 | SOURCES |
| 33 | byte_builder.cc |
shaneajg | 9c19db4 | 2020-06-11 15:49:51 -0400 | [diff] [blame] | 34 | ) |
Yuval Peress | b8f3ad2 | 2021-10-26 22:55:27 -0600 | [diff] [blame] | 35 | if(Zephyr_FOUND AND CONFIG_PIGWEED_BYTES) |
| 36 | zephyr_link_libraries(pw_bytes) |
| 37 | endif() |
Ewout van Bekkum | 984921a | 2022-01-20 08:13:54 -0800 | [diff] [blame] | 38 | |
| 39 | pw_add_test(pw_bytes.array_test |
| 40 | SOURCES |
| 41 | array_test.cc |
| 42 | DEPS |
| 43 | pw_bytes |
| 44 | GROUPS |
| 45 | modules |
| 46 | pw_bytes |
| 47 | ) |
| 48 | |
| 49 | pw_add_test(pw_bytes.byte_builder_test |
| 50 | SOURCES |
| 51 | byte_builder_test.cc |
| 52 | DEPS |
| 53 | pw_bytes |
| 54 | GROUPS |
| 55 | modules |
| 56 | pw_bytes |
| 57 | ) |
| 58 | |
| 59 | pw_add_test(pw_bytes.endian_test |
| 60 | SOURCES |
| 61 | endian_test.cc |
| 62 | DEPS |
| 63 | pw_bytes |
| 64 | GROUPS |
| 65 | modules |
| 66 | pw_bytes |
| 67 | ) |
| 68 | |
| 69 | pw_add_test(pw_bytes.units_test |
| 70 | SOURCES |
| 71 | units_test.cc |
| 72 | DEPS |
| 73 | pw_bytes |
| 74 | GROUPS |
| 75 | modules |
| 76 | pw_bytes |
| 77 | ) |