1# Copyright 2023 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_allocator.block STATIC 18 HEADERS 19 public/pw_allocator/block.h 20 PUBLIC_INCLUDES 21 public 22 PUBLIC_DEPS 23 pw_assert 24 pw_span 25 pw_status 26 SOURCES 27 block.cc 28) 29 30pw_add_library(pw_allocator.freelist STATIC 31 HEADERS 32 public/pw_allocator/freelist.h 33 PUBLIC_INCLUDES 34 public 35 PUBLIC_DEPS 36 pw_containers.vector 37 pw_span 38 pw_status 39 SOURCES 40 freelist.cc 41) 42 43pw_add_library(pw_allocator.freelist_heap STATIC 44 HEADERS 45 public/pw_allocator/freelist_heap.h 46 PUBLIC_INCLUDES 47 public 48 PUBLIC_DEPS 49 pw_allocator.block 50 pw_allocator.freelist 51 PRIVATE_DEPS 52 pw_assert 53 pw_log 54 pw_span 55 SOURCES 56 freelist_heap.cc 57) 58 59pw_add_test(pw_allocator.block_test 60 SOURCES 61 block_test.cc 62 PRIVATE_DEPS 63 pw_allocator.block 64 pw_span 65 GROUPS 66 modules 67 pw_allocator 68) 69 70pw_add_test(pw_allocator.freelist_test 71 SOURCES 72 freelist_test.cc 73 PRIVATE_DEPS 74 pw_allocator.freelist 75 pw_span 76 pw_status 77 GROUPS 78 modules 79 pw_allocator 80) 81 82pw_add_test(pw_allocator.freelist_heap_test 83 SOURCES 84 freelist_heap_test.cc 85 PRIVATE_DEPS 86 pw_allocator.freelist_heap 87 GROUPS 88 modules 89 pw_allocator 90) 91