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/suffix.h 24 public/pw_bytes/units.h 25 PUBLIC_INCLUDES 26 public 27 PUBLIC_DEPS 28 pw_bytes.bit 29 pw_containers.iterator 30 pw_polyfill 31 pw_preprocessor 32 pw_span 33 pw_status 34 SOURCES 35 byte_builder.cc 36) 37 38pw_add_library(pw_bytes.alignment STATIC 39 HEADERS 40 public/pw_bytes/alignment.h 41 PUBLIC_INCLUDES 42 public 43 PUBLIC_DEPS 44 pw_assert 45 pw_bytes 46 pw_preprocessor 47 pw_third_party.fuchsia.stdcompat 48 SOURCES 49 alignment.cc 50) 51 52pw_add_library(pw_bytes.bit INTERFACE 53 HEADERS 54 public/pw_bytes/bit.h 55 PUBLIC_INCLUDES 56 public 57 PUBLIC_DEPS 58 pw_third_party.fuchsia.stdcompat 59) 60 61pw_add_library(pw_bytes.packed_ptr INTERFACE 62 HEADERS 63 public/pw_bytes/packed_ptr.h 64 PUBLIC_INCLUDES 65 public 66 PUBLIC_DEPS 67 pw_assert 68 pw_third_party.fuchsia.stdcompat 69) 70 71pw_add_test(pw_bytes.alignment_test 72 SOURCES 73 alignment_test.cc 74 PRIVATE_DEPS 75 pw_bytes.alignment 76 GROUPS 77 modules 78 pw_bytes 79) 80 81pw_add_test(pw_bytes.array_test 82 SOURCES 83 array_test.cc 84 PRIVATE_DEPS 85 pw_bytes 86 GROUPS 87 modules 88 pw_bytes 89) 90 91pw_add_test(pw_bytes.bit_test 92 SOURCES 93 bit_test.cc 94 PRIVATE_DEPS 95 pw_bytes.bit 96 GROUPS 97 modules 98 pw_bytes 99) 100 101pw_add_test(pw_bytes.byte_builder_test 102 SOURCES 103 byte_builder_test.cc 104 PRIVATE_DEPS 105 pw_bytes 106 GROUPS 107 modules 108 pw_bytes 109) 110 111pw_add_test(pw_bytes.endian_test 112 SOURCES 113 endian_test.cc 114 PRIVATE_DEPS 115 pw_bytes 116 GROUPS 117 modules 118 pw_bytes 119) 120 121pw_add_test(pw_bytes.packed_ptr_test 122 SOURCES 123 packed_ptr_test.cc 124 PRIVATE_DEPS 125 pw_compilation_testing._pigweed_only_negative_compilation 126 pw_bytes.packed_ptr 127 GROUPS 128 modules 129 pw_bytes 130) 131 132pw_add_test(pw_bytes.suffix_test 133 SOURCES 134 suffix_test.cc 135 PRIVATE_DEPS 136 pw_compilation_testing._pigweed_only_negative_compilation 137 pw_bytes 138 GROUPS 139 modules 140 pw_bytes 141) 142 143pw_add_test(pw_bytes.units_test 144 SOURCES 145 units_test.cc 146 PRIVATE_DEPS 147 pw_bytes 148 GROUPS 149 modules 150 pw_bytes 151) 152