Wyatt Hepler | 0fbcdfc | 2020-01-02 07:53:39 -0800 | [diff] [blame] | 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 | |
Wyatt Hepler | 0a6f763 | 2020-10-29 09:08:19 -0700 | [diff] [blame] | 15 | include($ENV{PW_ROOT}/pw_build/pigweed.cmake) |
| 16 | |
Ewout van Bekkum | c5c8b27 | 2022-01-26 16:23:08 -0800 | [diff] [blame] | 17 | pw_add_module_library(pw_varint |
| 18 | HEADERS |
| 19 | public/pw_varint/varint.h |
| 20 | PUBLIC_INCLUDES |
| 21 | public |
Aaron Green | 1f1c251 | 2020-04-16 10:05:43 -0700 | [diff] [blame] | 22 | PUBLIC_DEPS |
Ewout van Bekkum | c5c8b27 | 2022-01-26 16:23:08 -0800 | [diff] [blame] | 23 | pw_polyfill.cstddef |
| 24 | pw_polyfill.span |
Aaron Green | 1f1c251 | 2020-04-16 10:05:43 -0700 | [diff] [blame] | 25 | pw_preprocessor |
Ewout van Bekkum | c5c8b27 | 2022-01-26 16:23:08 -0800 | [diff] [blame] | 26 | SOURCES |
| 27 | varint.cc |
Aaron Green | 1f1c251 | 2020-04-16 10:05:43 -0700 | [diff] [blame] | 28 | ) |
Yuval Peress | b8f3ad2 | 2021-10-26 22:55:27 -0600 | [diff] [blame] | 29 | if(Zephyr_FOUND AND CONFIG_PIGWEED_VARINT) |
| 30 | zephyr_link_libraries(pw_varint) |
| 31 | endif() |
Ewout van Bekkum | c5c8b27 | 2022-01-26 16:23:08 -0800 | [diff] [blame] | 32 | |
| 33 | pw_add_module_library(pw_varint.stream |
| 34 | HEADERS |
| 35 | public/pw_varint/stream.h |
| 36 | PUBLIC_INCLUDES |
| 37 | public |
| 38 | PUBLIC_DEPS |
| 39 | pw_status |
| 40 | pw_stream |
| 41 | SOURCES |
| 42 | stream.cc |
| 43 | PRIVATE_DEPS |
| 44 | pw_varint |
| 45 | ) |
| 46 | |
| 47 | pw_add_test(pw_varint.varint_test |
| 48 | SOURCES |
| 49 | varint_test.cc |
| 50 | varint_test_c.c |
| 51 | DEPS |
| 52 | pw_varint |
| 53 | GROUPS |
| 54 | modules |
| 55 | pw_varint |
| 56 | ) |
| 57 | |
| 58 | pw_add_test(pw_varint.stream_test |
| 59 | SOURCES |
| 60 | stream_test.cc |
| 61 | DEPS |
| 62 | pw_stream |
| 63 | pw_varint.stream |
| 64 | GROUPS |
| 65 | modules |
| 66 | pw_varint |
| 67 | ) |