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_library(pw_bytes STATIC 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 26 PUBLIC_DEPS 27 pw_bytes.bit 28 pw_containers.iterator 29 pw_polyfill 30 pw_preprocessor 31 pw_span 32 pw_status 33 SOURCES 34 byte_builder.cc 35) 36if(Zephyr_FOUND AND CONFIG_PIGWEED_BYTES) 37 zephyr_link_libraries(pw_bytes) 38endif() 39 40pw_add_library(pw_bytes.bit INTERFACE 41 HEADERS 42 public/pw_bytes/bit.h 43 PUBLIC_INCLUDES 44 public 45) 46 47pw_add_test(pw_bytes.array_test 48 SOURCES 49 array_test.cc 50 PRIVATE_DEPS 51 pw_bytes 52 GROUPS 53 modules 54 pw_bytes 55) 56 57pw_add_test(pw_bytes.bit_test 58 SOURCES 59 bit_test.cc 60 PRIVATE_DEPS 61 pw_bytes.bit 62 GROUPS 63 modules 64 pw_bytes 65) 66 67pw_add_test(pw_bytes.byte_builder_test 68 SOURCES 69 byte_builder_test.cc 70 PRIVATE_DEPS 71 pw_bytes 72 GROUPS 73 modules 74 pw_bytes 75) 76 77pw_add_test(pw_bytes.endian_test 78 SOURCES 79 endian_test.cc 80 PRIVATE_DEPS 81 pw_bytes 82 GROUPS 83 modules 84 pw_bytes 85) 86 87pw_add_test(pw_bytes.units_test 88 SOURCES 89 units_test.cc 90 PRIVATE_DEPS 91 pw_bytes 92 GROUPS 93 modules 94 pw_bytes 95) 96