• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2024 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
17# Libraries
18
19pw_add_library(pw_allocator.benchmarks.measurements STATIC
20  HEADERS
21    public/pw_allocator/benchmarks/measurements.h
22  PUBLIC_INCLUDES
23    public
24  PUBLIC_DEPS
25    pw_chrono.system_clock
26    pw_containers.intrusive_map
27    pw_metric
28  SOURCES
29    measurements.cc
30)
31
32pw_add_library(pw_allocator.benchmarks.benchmark STATIC
33  HEADERS
34    public/pw_allocator/benchmarks/benchmark.h
35    public/pw_allocator/benchmarks/config.h
36  PUBLIC_INCLUDES
37    public
38  PUBLIC_DEPS
39    pw_allocator
40    pw_allocator.benchmarks.measurements
41    pw_allocator.block_allocator
42    pw_allocator.fragmentation
43    pw_allocator.test_harness
44    pw_assert
45    pw_chrono.system_clock
46    pw_metric
47    pw_tokenizer
48  SOURCES
49    benchmark.cc
50)
51
52# Unit tests
53
54pw_add_test(pw_allocator.benchmarks.measurements_test
55  SOURCES
56    measurements_test.cc
57  PRIVATE_DEPS
58    pw_allocator.benchmarks.measurements
59    pw_metric
60  GROUPS
61    modules
62    pw_allocator
63)
64
65pw_add_test(pw_allocator.benchmarks.benchmark_test
66  SOURCES
67    benchmark_test.cc
68  PRIVATE_DEPS
69    pw_allocator.benchmarks.benchmark
70    pw_allocator.benchmarks.measurements
71    pw_allocator.fragmentation
72    pw_allocator.testing
73    pw_allocator.test_harness
74    pw_random
75  GROUPS
76    modules
77    pw_allocator
78)
79