1*61c4878aSAndroid Build Coastguard Worker# Copyright 2024 The Pigweed Authors 2*61c4878aSAndroid Build Coastguard Worker# 3*61c4878aSAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4*61c4878aSAndroid Build Coastguard Worker# use this file except in compliance with the License. You may obtain a copy of 5*61c4878aSAndroid Build Coastguard Worker# the License at 6*61c4878aSAndroid Build Coastguard Worker# 7*61c4878aSAndroid Build Coastguard Worker# https://www.apache.org/licenses/LICENSE-2.0 8*61c4878aSAndroid Build Coastguard Worker# 9*61c4878aSAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software 10*61c4878aSAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 11*61c4878aSAndroid Build Coastguard Worker# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12*61c4878aSAndroid Build Coastguard Worker# License for the specific language governing permissions and limitations under 13*61c4878aSAndroid Build Coastguard Worker# the License. 14*61c4878aSAndroid Build Coastguard Worker 15*61c4878aSAndroid Build Coastguard Workerinclude($ENV{PW_ROOT}/pw_build/pigweed.cmake) 16*61c4878aSAndroid Build Coastguard Worker 17*61c4878aSAndroid Build Coastguard Workerpw_add_library(pw_multibuf.chunk STATIC 18*61c4878aSAndroid Build Coastguard Worker HEADERS 19*61c4878aSAndroid Build Coastguard Worker public/pw_multibuf/chunk.h 20*61c4878aSAndroid Build Coastguard Worker PUBLIC_INCLUDES 21*61c4878aSAndroid Build Coastguard Worker public 22*61c4878aSAndroid Build Coastguard Worker PUBLIC_DEPS 23*61c4878aSAndroid Build Coastguard Worker pw_assert 24*61c4878aSAndroid Build Coastguard Worker pw_bytes 25*61c4878aSAndroid Build Coastguard Worker pw_preprocessor 26*61c4878aSAndroid Build Coastguard Worker pw_span 27*61c4878aSAndroid Build Coastguard Worker pw_sync.interrupt_spin_lock 28*61c4878aSAndroid Build Coastguard Worker PRIVATE_DEPS 29*61c4878aSAndroid Build Coastguard Worker pw_assert.check 30*61c4878aSAndroid Build Coastguard Worker SOURCES 31*61c4878aSAndroid Build Coastguard Worker chunk.cc 32*61c4878aSAndroid Build Coastguard Worker) 33*61c4878aSAndroid Build Coastguard Worker 34*61c4878aSAndroid Build Coastguard Workerpw_add_library(pw_multibuf.header_chunk_region_tracker INTERFACE 35*61c4878aSAndroid Build Coastguard Worker HEADERS 36*61c4878aSAndroid Build Coastguard Worker public/pw_multibuf/header_chunk_region_tracker.h 37*61c4878aSAndroid Build Coastguard Worker PUBLIC_INCLUDES 38*61c4878aSAndroid Build Coastguard Worker public 39*61c4878aSAndroid Build Coastguard Worker PUBLIC_DEPS 40*61c4878aSAndroid Build Coastguard Worker pw_allocator.allocator 41*61c4878aSAndroid Build Coastguard Worker pw_bytes 42*61c4878aSAndroid Build Coastguard Worker pw_multibuf.chunk 43*61c4878aSAndroid Build Coastguard Worker) 44*61c4878aSAndroid Build Coastguard Worker 45*61c4878aSAndroid Build Coastguard Workerpw_add_library(pw_multibuf.single_chunk_region_tracker INTERFACE 46*61c4878aSAndroid Build Coastguard Worker HEADERS 47*61c4878aSAndroid Build Coastguard Worker public/pw_multibuf/single_chunk_region_tracker.h 48*61c4878aSAndroid Build Coastguard Worker PUBLIC_INCLUDES 49*61c4878aSAndroid Build Coastguard Worker public 50*61c4878aSAndroid Build Coastguard Worker PUBLIC_DEPS 51*61c4878aSAndroid Build Coastguard Worker pw_assert 52*61c4878aSAndroid Build Coastguard Worker pw_bytes 53*61c4878aSAndroid Build Coastguard Worker pw_multibuf.chunk 54*61c4878aSAndroid Build Coastguard Worker) 55*61c4878aSAndroid Build Coastguard Worker 56*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_multibuf.chunk_test 57*61c4878aSAndroid Build Coastguard Worker SOURCES 58*61c4878aSAndroid Build Coastguard Worker chunk_test.cc 59*61c4878aSAndroid Build Coastguard Worker PRIVATE_DEPS 60*61c4878aSAndroid Build Coastguard Worker pw_allocator.testing 61*61c4878aSAndroid Build Coastguard Worker pw_multibuf.chunk 62*61c4878aSAndroid Build Coastguard Worker pw_multibuf.header_chunk_region_tracker 63*61c4878aSAndroid Build Coastguard Worker GROUPS 64*61c4878aSAndroid Build Coastguard Worker modules 65*61c4878aSAndroid Build Coastguard Worker pw_multibuf 66*61c4878aSAndroid Build Coastguard Worker) 67*61c4878aSAndroid Build Coastguard Worker 68*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_multibuf.header_chunk_region_tracker_test 69*61c4878aSAndroid Build Coastguard Worker SOURCES 70*61c4878aSAndroid Build Coastguard Worker header_chunk_region_tracker_test.cc 71*61c4878aSAndroid Build Coastguard Worker PRIVATE_DEPS 72*61c4878aSAndroid Build Coastguard Worker pw_allocator.testing 73*61c4878aSAndroid Build Coastguard Worker pw_multibuf.chunk 74*61c4878aSAndroid Build Coastguard Worker pw_multibuf.header_chunk_region_tracker 75*61c4878aSAndroid Build Coastguard Worker pw_status 76*61c4878aSAndroid Build Coastguard Worker GROUPS 77*61c4878aSAndroid Build Coastguard Worker modules 78*61c4878aSAndroid Build Coastguard Worker pw_multibuf 79*61c4878aSAndroid Build Coastguard Worker) 80*61c4878aSAndroid Build Coastguard Worker 81*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_multibuf.single_chunk_region_tracker_test 82*61c4878aSAndroid Build Coastguard Worker SOURCES 83*61c4878aSAndroid Build Coastguard Worker single_chunk_region_tracker_test.cc 84*61c4878aSAndroid Build Coastguard Worker PRIVATE_DEPS 85*61c4878aSAndroid Build Coastguard Worker pw_multibuf.chunk 86*61c4878aSAndroid Build Coastguard Worker pw_multibuf.single_chunk_region_tracker 87*61c4878aSAndroid Build Coastguard Worker GROUPS 88*61c4878aSAndroid Build Coastguard Worker modules 89*61c4878aSAndroid Build Coastguard Worker pw_multibuf 90*61c4878aSAndroid Build Coastguard Worker) 91*61c4878aSAndroid Build Coastguard Worker 92*61c4878aSAndroid Build Coastguard Workerpw_add_library(pw_multibuf STATIC 93*61c4878aSAndroid Build Coastguard Worker HEADERS 94*61c4878aSAndroid Build Coastguard Worker public/pw_multibuf/multibuf.h 95*61c4878aSAndroid Build Coastguard Worker PUBLIC_INCLUDES 96*61c4878aSAndroid Build Coastguard Worker public 97*61c4878aSAndroid Build Coastguard Worker PUBLIC_DEPS 98*61c4878aSAndroid Build Coastguard Worker pw_multibuf.chunk 99*61c4878aSAndroid Build Coastguard Worker pw_preprocessor 100*61c4878aSAndroid Build Coastguard Worker SOURCES 101*61c4878aSAndroid Build Coastguard Worker multibuf.cc 102*61c4878aSAndroid Build Coastguard Worker) 103*61c4878aSAndroid Build Coastguard Worker 104*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_multibuf.multibuf_test 105*61c4878aSAndroid Build Coastguard Worker SOURCES 106*61c4878aSAndroid Build Coastguard Worker multibuf_test.cc 107*61c4878aSAndroid Build Coastguard Worker PRIVATE_DEPS 108*61c4878aSAndroid Build Coastguard Worker pw_bytes 109*61c4878aSAndroid Build Coastguard Worker pw_multibuf 110*61c4878aSAndroid Build Coastguard Worker pw_multibuf._internal_test_utils 111*61c4878aSAndroid Build Coastguard Worker GROUPS 112*61c4878aSAndroid Build Coastguard Worker modules 113*61c4878aSAndroid Build Coastguard Worker pw_multibuf 114*61c4878aSAndroid Build Coastguard Worker) 115*61c4878aSAndroid Build Coastguard Worker 116*61c4878aSAndroid Build Coastguard Workerpw_add_library(pw_multibuf.allocator STATIC 117*61c4878aSAndroid Build Coastguard Worker HEADERS 118*61c4878aSAndroid Build Coastguard Worker public/pw_multibuf/allocator.h 119*61c4878aSAndroid Build Coastguard Worker PUBLIC_INCLUDES 120*61c4878aSAndroid Build Coastguard Worker public 121*61c4878aSAndroid Build Coastguard Worker PUBLIC_DEPS 122*61c4878aSAndroid Build Coastguard Worker pw_async2.dispatcher 123*61c4878aSAndroid Build Coastguard Worker pw_async2.poll 124*61c4878aSAndroid Build Coastguard Worker pw_containers.intrusive_forward_list 125*61c4878aSAndroid Build Coastguard Worker pw_multibuf 126*61c4878aSAndroid Build Coastguard Worker pw_result 127*61c4878aSAndroid Build Coastguard Worker SOURCES 128*61c4878aSAndroid Build Coastguard Worker allocator.cc 129*61c4878aSAndroid Build Coastguard Worker) 130*61c4878aSAndroid Build Coastguard Worker 131*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_multibuf.allocator_test 132*61c4878aSAndroid Build Coastguard Worker SOURCES 133*61c4878aSAndroid Build Coastguard Worker allocator_test.cc 134*61c4878aSAndroid Build Coastguard Worker PRIVATE_DEPS 135*61c4878aSAndroid Build Coastguard Worker pw_async2.dispatcher 136*61c4878aSAndroid Build Coastguard Worker pw_async2.poll 137*61c4878aSAndroid Build Coastguard Worker pw_multibuf.allocator 138*61c4878aSAndroid Build Coastguard Worker GROUPS 139*61c4878aSAndroid Build Coastguard Worker modules 140*61c4878aSAndroid Build Coastguard Worker pw_multibuf 141*61c4878aSAndroid Build Coastguard Worker) 142*61c4878aSAndroid Build Coastguard Worker 143*61c4878aSAndroid Build Coastguard Workerpw_add_library(pw_multibuf.simple_allocator STATIC 144*61c4878aSAndroid Build Coastguard Worker HEADERS 145*61c4878aSAndroid Build Coastguard Worker public/pw_multibuf/simple_allocator.h 146*61c4878aSAndroid Build Coastguard Worker PUBLIC_INCLUDES 147*61c4878aSAndroid Build Coastguard Worker public 148*61c4878aSAndroid Build Coastguard Worker PUBLIC_DEPS 149*61c4878aSAndroid Build Coastguard Worker pw_allocator.allocator 150*61c4878aSAndroid Build Coastguard Worker pw_containers.intrusive_list 151*61c4878aSAndroid Build Coastguard Worker pw_multibuf 152*61c4878aSAndroid Build Coastguard Worker pw_multibuf.allocator 153*61c4878aSAndroid Build Coastguard Worker SOURCES 154*61c4878aSAndroid Build Coastguard Worker simple_allocator.cc 155*61c4878aSAndroid Build Coastguard Worker) 156*61c4878aSAndroid Build Coastguard Worker 157*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_multibuf.simple_allocator_test 158*61c4878aSAndroid Build Coastguard Worker SOURCES 159*61c4878aSAndroid Build Coastguard Worker simple_allocator_test.cc 160*61c4878aSAndroid Build Coastguard Worker PRIVATE_DEPS 161*61c4878aSAndroid Build Coastguard Worker pw_multibuf.simple_allocator 162*61c4878aSAndroid Build Coastguard Worker pw_allocator.testing 163*61c4878aSAndroid Build Coastguard Worker pw_allocator.null_allocator 164*61c4878aSAndroid Build Coastguard Worker GROUPS 165*61c4878aSAndroid Build Coastguard Worker modules 166*61c4878aSAndroid Build Coastguard Worker pw_multibuf 167*61c4878aSAndroid Build Coastguard Worker) 168*61c4878aSAndroid Build Coastguard Worker 169*61c4878aSAndroid Build Coastguard Workerpw_add_library(pw_multibuf.stream STATIC 170*61c4878aSAndroid Build Coastguard Worker HEADERS 171*61c4878aSAndroid Build Coastguard Worker public/pw_multibuf/stream.h 172*61c4878aSAndroid Build Coastguard Worker PUBLIC_INCLUDES 173*61c4878aSAndroid Build Coastguard Worker public 174*61c4878aSAndroid Build Coastguard Worker PUBLIC_DEPS 175*61c4878aSAndroid Build Coastguard Worker pw_multibuf 176*61c4878aSAndroid Build Coastguard Worker pw_stream 177*61c4878aSAndroid Build Coastguard Worker SOURCES 178*61c4878aSAndroid Build Coastguard Worker stream.cc 179*61c4878aSAndroid Build Coastguard Worker) 180*61c4878aSAndroid Build Coastguard Worker 181*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_multibuf.stream_test 182*61c4878aSAndroid Build Coastguard Worker SOURCES 183*61c4878aSAndroid Build Coastguard Worker stream_test.cc 184*61c4878aSAndroid Build Coastguard Worker PRIVATE_DEPS 185*61c4878aSAndroid Build Coastguard Worker pw_allocator.testing 186*61c4878aSAndroid Build Coastguard Worker pw_bytes 187*61c4878aSAndroid Build Coastguard Worker pw_multibuf.stream 188*61c4878aSAndroid Build Coastguard Worker pw_multibuf._internal_test_utils 189*61c4878aSAndroid Build Coastguard Worker GROUPS 190*61c4878aSAndroid Build Coastguard Worker modules 191*61c4878aSAndroid Build Coastguard Worker pw_multibuf 192*61c4878aSAndroid Build Coastguard Worker) 193*61c4878aSAndroid Build Coastguard Worker 194*61c4878aSAndroid Build Coastguard Workerpw_add_library(pw_multibuf.from_span STATIC 195*61c4878aSAndroid Build Coastguard Worker HEADERS 196*61c4878aSAndroid Build Coastguard Worker public/pw_multibuf/from_span.h 197*61c4878aSAndroid Build Coastguard Worker PUBLIC_INCLUDES 198*61c4878aSAndroid Build Coastguard Worker public 199*61c4878aSAndroid Build Coastguard Worker PUBLIC_DEPS 200*61c4878aSAndroid Build Coastguard Worker pw_allocator.allocator 201*61c4878aSAndroid Build Coastguard Worker pw_multibuf 202*61c4878aSAndroid Build Coastguard Worker pw_function 203*61c4878aSAndroid Build Coastguard Worker SOURCES 204*61c4878aSAndroid Build Coastguard Worker from_span.cc 205*61c4878aSAndroid Build Coastguard Worker) 206*61c4878aSAndroid Build Coastguard Worker 207*61c4878aSAndroid Build Coastguard Workerpw_add_test(pw_multibuf.from_span_test 208*61c4878aSAndroid Build Coastguard Worker SOURCES 209*61c4878aSAndroid Build Coastguard Worker from_span_test.cc 210*61c4878aSAndroid Build Coastguard Worker PRIVATE_DEPS 211*61c4878aSAndroid Build Coastguard Worker pw_allocator.testing 212*61c4878aSAndroid Build Coastguard Worker pw_multibuf.from_span 213*61c4878aSAndroid Build Coastguard Worker SOURCES 214*61c4878aSAndroid Build Coastguard Worker from_span_test.cc 215*61c4878aSAndroid Build Coastguard Worker GROUPS 216*61c4878aSAndroid Build Coastguard Worker modules 217*61c4878aSAndroid Build Coastguard Worker pw_multibuf 218*61c4878aSAndroid Build Coastguard Worker) 219*61c4878aSAndroid Build Coastguard Worker 220*61c4878aSAndroid Build Coastguard Workerpw_add_library(pw_multibuf.testing INTERFACE 221*61c4878aSAndroid Build Coastguard Worker HEADERS 222*61c4878aSAndroid Build Coastguard Worker public/pw_multibuf/simple_allocator_for_test.h 223*61c4878aSAndroid Build Coastguard Worker PUBLIC_INCLUDES 224*61c4878aSAndroid Build Coastguard Worker public 225*61c4878aSAndroid Build Coastguard Worker PUBLIC_DEPS 226*61c4878aSAndroid Build Coastguard Worker pw_assert 227*61c4878aSAndroid Build Coastguard Worker pw_allocator.testing 228*61c4878aSAndroid Build Coastguard Worker pw_multibuf.simple_allocator 229*61c4878aSAndroid Build Coastguard Worker) 230*61c4878aSAndroid Build Coastguard Worker 231*61c4878aSAndroid Build Coastguard Workerpw_add_library(pw_multibuf._internal_test_utils INTERFACE 232*61c4878aSAndroid Build Coastguard Worker HEADERS 233*61c4878aSAndroid Build Coastguard Worker pw_multibuf_private/test_utils.h 234*61c4878aSAndroid Build Coastguard Worker PUBLIC_DEPS 235*61c4878aSAndroid Build Coastguard Worker pw_assert 236*61c4878aSAndroid Build Coastguard Worker pw_allocator.testing 237*61c4878aSAndroid Build Coastguard Worker pw_bytes 238*61c4878aSAndroid Build Coastguard Worker pw_multibuf.chunk 239*61c4878aSAndroid Build Coastguard Worker pw_multibuf.header_chunk_region_tracker 240*61c4878aSAndroid Build Coastguard Worker) 241