Wyatt Hepler | 76293e3 | 2020-02-07 18:07:19 -0800 | [diff] [blame] | 1 | # Copyright 2019 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 | |
Armando Montanez | fb3d3fb | 2020-06-09 18:12:12 -0700 | [diff] [blame] | 15 | import("//build_overrides/pigweed.gni") |
| 16 | |
Alexei Frolov | edd2f14 | 2020-06-09 19:11:27 -0700 | [diff] [blame] | 17 | import("$dir_pw_build/target_types.gni") |
Wyatt Hepler | 3c4e5de | 2020-03-03 14:37:52 -0800 | [diff] [blame] | 18 | import("$dir_pw_docgen/docs.gni") |
Wyatt Hepler | 76293e3 | 2020-02-07 18:07:19 -0800 | [diff] [blame] | 19 | import("$dir_pw_unit_test/test.gni") |
Wyatt Hepler | d49f8fe | 2020-10-15 10:13:47 -0700 | [diff] [blame] | 20 | |
Wyatt Hepler | 100a160 | 2021-10-05 14:02:02 -0700 | [diff] [blame] | 21 | config("public_include_path") { |
Wyatt Hepler | 76293e3 | 2020-02-07 18:07:19 -0800 | [diff] [blame] | 22 | include_dirs = [ "public" ] |
| 23 | } |
| 24 | |
Armando Montanez | 516022c | 2020-05-14 09:12:19 -0700 | [diff] [blame] | 25 | group("pw_containers") { |
| 26 | public_deps = [ |
Kevin Zeng | b0bb849 | 2021-01-11 21:32:24 -0800 | [diff] [blame] | 27 | ":flat_map", |
Armando Montanez | 516022c | 2020-05-14 09:12:19 -0700 | [diff] [blame] | 28 | ":intrusive_list", |
| 29 | ":vector", |
| 30 | ] |
| 31 | } |
| 32 | |
Wyatt Hepler | 100a160 | 2021-10-05 14:02:02 -0700 | [diff] [blame] | 33 | pw_source_set("filtered_view") { |
| 34 | public_configs = [ ":public_include_path" ] |
| 35 | public = [ "public/pw_containers/filtered_view.h" ] |
| 36 | } |
| 37 | |
Kevin Zeng | b0bb849 | 2021-01-11 21:32:24 -0800 | [diff] [blame] | 38 | pw_source_set("flat_map") { |
Wyatt Hepler | 100a160 | 2021-10-05 14:02:02 -0700 | [diff] [blame] | 39 | public_configs = [ ":public_include_path" ] |
Kevin Zeng | b0bb849 | 2021-01-11 21:32:24 -0800 | [diff] [blame] | 40 | public = [ "public/pw_containers/flat_map.h" ] |
| 41 | } |
| 42 | |
Wyatt Hepler | fff3c7c | 2021-08-17 18:15:10 -0700 | [diff] [blame] | 43 | pw_source_set("to_array") { |
| 44 | public_configs = [ ":public_include_path" ] |
| 45 | public = [ "public/pw_containers/to_array.h" ] |
| 46 | } |
| 47 | |
Alexei Frolov | edd2f14 | 2020-06-09 19:11:27 -0700 | [diff] [blame] | 48 | pw_source_set("vector") { |
Wyatt Hepler | 100a160 | 2021-10-05 14:02:02 -0700 | [diff] [blame] | 49 | public_configs = [ ":public_include_path" ] |
Wyatt Hepler | be37ef0 | 2021-03-25 17:45:01 -0700 | [diff] [blame] | 50 | public_deps = [ dir_pw_assert ] |
Rob Mohr | a0ba54f | 2020-02-27 11:43:49 -0800 | [diff] [blame] | 51 | public = [ "public/pw_containers/vector.h" ] |
Armando Montanez | 516022c | 2020-05-14 09:12:19 -0700 | [diff] [blame] | 52 | } |
| 53 | |
Wyatt Hepler | bfb9887 | 2021-10-07 21:16:24 -0700 | [diff] [blame] | 54 | pw_source_set("wrapped_iterator") { |
| 55 | public_configs = [ ":public_include_path" ] |
| 56 | public = [ "public/pw_containers/wrapped_iterator.h" ] |
| 57 | } |
| 58 | |
Alexei Frolov | edd2f14 | 2020-06-09 19:11:27 -0700 | [diff] [blame] | 59 | pw_source_set("intrusive_list") { |
Wyatt Hepler | 100a160 | 2021-10-05 14:02:02 -0700 | [diff] [blame] | 60 | public_configs = [ ":public_include_path" ] |
Armando Montanez | 516022c | 2020-05-14 09:12:19 -0700 | [diff] [blame] | 61 | public = [ |
| 62 | "public/pw_containers/internal/intrusive_list_impl.h", |
| 63 | "public/pw_containers/intrusive_list.h", |
| 64 | ] |
Armando Montanez | 516022c | 2020-05-14 09:12:19 -0700 | [diff] [blame] | 65 | sources = [ "intrusive_list.cc" ] |
Kevin Zeng | b0bb849 | 2021-01-11 21:32:24 -0800 | [diff] [blame] | 66 | deps = [ dir_pw_assert ] |
Wyatt Hepler | 76293e3 | 2020-02-07 18:07:19 -0800 | [diff] [blame] | 67 | } |
| 68 | |
| 69 | pw_test_group("tests") { |
Armando Montanez | 516022c | 2020-05-14 09:12:19 -0700 | [diff] [blame] | 70 | tests = [ |
Wyatt Hepler | 100a160 | 2021-10-05 14:02:02 -0700 | [diff] [blame] | 71 | ":filtered_view_test", |
Kevin Zeng | b0bb849 | 2021-01-11 21:32:24 -0800 | [diff] [blame] | 72 | ":flat_map_test", |
Armando Montanez | 516022c | 2020-05-14 09:12:19 -0700 | [diff] [blame] | 73 | ":intrusive_list_test", |
Wyatt Hepler | fff3c7c | 2021-08-17 18:15:10 -0700 | [diff] [blame] | 74 | ":to_array_test", |
Kevin Zeng | b0bb849 | 2021-01-11 21:32:24 -0800 | [diff] [blame] | 75 | ":vector_test", |
Wyatt Hepler | bfb9887 | 2021-10-07 21:16:24 -0700 | [diff] [blame] | 76 | ":wrapped_iterator_test", |
Armando Montanez | 516022c | 2020-05-14 09:12:19 -0700 | [diff] [blame] | 77 | ] |
Wyatt Hepler | 76293e3 | 2020-02-07 18:07:19 -0800 | [diff] [blame] | 78 | } |
| 79 | |
Wyatt Hepler | 100a160 | 2021-10-05 14:02:02 -0700 | [diff] [blame] | 80 | pw_test("filtered_view_test") { |
| 81 | sources = [ "filtered_view_test.cc" ] |
| 82 | deps = [ |
| 83 | ":filtered_view", |
| 84 | ":intrusive_list", |
| 85 | ] |
| 86 | } |
| 87 | |
Kevin Zeng | b0bb849 | 2021-01-11 21:32:24 -0800 | [diff] [blame] | 88 | pw_test("flat_map_test") { |
| 89 | sources = [ "flat_map_test.cc" ] |
| 90 | deps = [ ":flat_map" ] |
| 91 | } |
| 92 | |
Wyatt Hepler | fff3c7c | 2021-08-17 18:15:10 -0700 | [diff] [blame] | 93 | pw_test("to_array_test") { |
| 94 | sources = [ "to_array_test.cc" ] |
| 95 | deps = [ ":to_array" ] |
| 96 | } |
| 97 | |
Wyatt Hepler | 76293e3 | 2020-02-07 18:07:19 -0800 | [diff] [blame] | 98 | pw_test("vector_test") { |
Rob Mohr | a0ba54f | 2020-02-27 11:43:49 -0800 | [diff] [blame] | 99 | sources = [ "vector_test.cc" ] |
Kevin Zeng | b0bb849 | 2021-01-11 21:32:24 -0800 | [diff] [blame] | 100 | deps = [ ":vector" ] |
Wyatt Hepler | 76293e3 | 2020-02-07 18:07:19 -0800 | [diff] [blame] | 101 | } |
Wyatt Hepler | 3c4e5de | 2020-03-03 14:37:52 -0800 | [diff] [blame] | 102 | |
Wyatt Hepler | bfb9887 | 2021-10-07 21:16:24 -0700 | [diff] [blame] | 103 | pw_test("wrapped_iterator_test") { |
| 104 | sources = [ "wrapped_iterator_test.cc" ] |
| 105 | deps = [ ":wrapped_iterator" ] |
| 106 | } |
| 107 | |
Armando Montanez | 516022c | 2020-05-14 09:12:19 -0700 | [diff] [blame] | 108 | pw_test("intrusive_list_test") { |
Kevin Zeng | b0bb849 | 2021-01-11 21:32:24 -0800 | [diff] [blame] | 109 | sources = [ "intrusive_list_test.cc" ] |
Armando Montanez | 516022c | 2020-05-14 09:12:19 -0700 | [diff] [blame] | 110 | deps = [ |
| 111 | ":intrusive_list", |
| 112 | "$dir_pw_preprocessor", |
| 113 | ] |
Armando Montanez | 516022c | 2020-05-14 09:12:19 -0700 | [diff] [blame] | 114 | } |
| 115 | |
Wyatt Hepler | 3c4e5de | 2020-03-03 14:37:52 -0800 | [diff] [blame] | 116 | pw_doc_group("docs") { |
| 117 | sources = [ "docs.rst" ] |
| 118 | } |