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) 16include($ENV{PW_ROOT}/pw_unit_test/test.cmake) 17 18pw_add_library(pw_varint STATIC 19 HEADERS 20 public/pw_varint/varint.h 21 PUBLIC_INCLUDES 22 public 23 PUBLIC_DEPS 24 pw_preprocessor 25 pw_span 26 pw_third_party.fuchsia.stdcompat 27 SOURCES 28 varint.cc 29 varint_c.c 30) 31 32pw_add_library(pw_varint.stream STATIC 33 HEADERS 34 public/pw_varint/stream.h 35 PUBLIC_INCLUDES 36 public 37 PUBLIC_DEPS 38 pw_status 39 pw_stream 40 SOURCES 41 stream.cc 42 PRIVATE_DEPS 43 pw_varint 44) 45 46pw_add_test(pw_varint.varint_test 47 SOURCES 48 varint_test.cc 49 varint_test_c.c 50 PRIVATE_DEPS 51 pw_varint 52 pw_fuzzer.fuzztest 53 GROUPS 54 modules 55 pw_varint 56) 57 58pw_add_test(pw_varint.stream_test 59 SOURCES 60 stream_test.cc 61 PRIVATE_DEPS 62 pw_stream 63 pw_varint.stream 64 GROUPS 65 modules 66 pw_varint 67) 68