blob: c5c7980546aff61fda1528ecc34a56a36f867362 [file] [log] [blame]
Alexei Frolov8ecefe92020-01-13 10:40:08 -08001# Copyright 2020 The Pigweed Authors
Alexei Frolov82d3cb32019-11-27 14:38:39 -08002#
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
Armando Montanezfb3d3fb2020-06-09 18:12:12 -070015import("//build_overrides/pigweed.gni")
16
Alexei Frolovedd2f142020-06-09 19:11:27 -070017import("$dir_pw_build/target_types.gni")
Wyatt Hepler3c4e5de2020-03-03 14:37:52 -080018import("$dir_pw_docgen/docs.gni")
Alexei Frolov82d3cb32019-11-27 14:38:39 -080019import("$dir_pw_unit_test/test.gni")
Wyatt Heplerd49f8fe2020-10-15 10:13:47 -070020
Alexei Frolov82d3cb32019-11-27 14:38:39 -080021config("default_config") {
22 include_dirs = [ "public" ]
23}
24
Alexei Frolovedd2f142020-06-09 19:11:27 -070025pw_source_set("pw_varint") {
Wyatt Hepler21192402020-01-15 15:40:51 -080026 public_configs = [ ":default_config" ]
Wyatt Hepler7abd8cc2021-01-19 16:49:33 -080027 public_deps = [ dir_pw_preprocessor ]
Alexei Frolov82d3cb32019-11-27 14:38:39 -080028 sources = [
29 "public/pw_varint/varint.h",
30 "varint.cc",
31 ]
Rob Mohra0ba54f2020-02-27 11:43:49 -080032 public = [ "public/pw_varint/varint.h" ]
Alexei Frolov82d3cb32019-11-27 14:38:39 -080033}
34
35pw_test_group("tests") {
36 tests = [ ":varint_test" ]
37}
38
39pw_test("varint_test") {
Rob Mohra0ba54f2020-02-27 11:43:49 -080040 deps = [ ":pw_varint" ]
Alexei Frolov82d3cb32019-11-27 14:38:39 -080041 sources = [
Alexei Frolov82d3cb32019-11-27 14:38:39 -080042 "varint_test.cc",
Michael Spanga99220e2020-06-11 20:07:16 -040043 "varint_test_c.c",
Alexei Frolov82d3cb32019-11-27 14:38:39 -080044 ]
45}
Wyatt Hepler3c4e5de2020-03-03 14:37:52 -080046
47pw_doc_group("docs") {
48 sources = [ "docs.rst" ]
49}