Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [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") |
Alexei Frolov | baaa2d6 | 2019-11-12 16:20:51 -0800 | [diff] [blame] | 18 | import("$dir_pw_docgen/docs.gni") |
Alexei Frolov | 925fb8f | 2019-11-05 16:32:30 -0800 | [diff] [blame] | 19 | import("$dir_pw_unit_test/test.gni") |
Wyatt Hepler | d49f8fe | 2020-10-15 10:13:47 -0700 | [diff] [blame] | 20 | |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 21 | config("default_config") { |
| 22 | include_dirs = [ "public" ] |
| 23 | } |
| 24 | |
Alexei Frolov | edd2f14 | 2020-06-09 19:11:27 -0700 | [diff] [blame] | 25 | pw_source_set("pw_preprocessor") { |
Wyatt Hepler | 2119240 | 2020-01-15 15:40:51 -0800 | [diff] [blame] | 26 | public_configs = [ ":default_config" ] |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 27 | public = [ |
Wyatt Hepler | eb3304c | 2020-09-01 11:36:10 -0700 | [diff] [blame] | 28 | "public/pw_preprocessor/arguments.h", |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 29 | "public/pw_preprocessor/boolean.h", |
| 30 | "public/pw_preprocessor/compiler.h", |
| 31 | "public/pw_preprocessor/concat.h", |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 32 | "public/pw_preprocessor/util.h", |
| 33 | ] |
Wyatt Hepler | 880cd68 | 2020-08-18 16:15:48 -0700 | [diff] [blame] | 34 | sources = [ "public/pw_preprocessor/internal/arg_count_impl.h" ] |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 35 | } |
| 36 | |
Alexei Frolov | baaa2d6 | 2019-11-12 16:20:51 -0800 | [diff] [blame] | 37 | pw_doc_group("docs") { |
Rob Mohr | a0ba54f | 2020-02-27 11:43:49 -0800 | [diff] [blame] | 38 | sources = [ "docs.rst" ] |
Alexei Frolov | baaa2d6 | 2019-11-12 16:20:51 -0800 | [diff] [blame] | 39 | } |
| 40 | |
Alexei Frolov | 925fb8f | 2019-11-05 16:32:30 -0800 | [diff] [blame] | 41 | # All pw_preprocessor test binaries. |
Alexei Frolov | a454c68 | 2019-11-19 10:55:07 -0800 | [diff] [blame] | 42 | pw_test_group("tests") { |
| 43 | tests = [ |
Wyatt Hepler | eb3304c | 2020-09-01 11:36:10 -0700 | [diff] [blame] | 44 | ":arguments_test", |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 45 | ":boolean_test", |
Wyatt Hepler | 38b6d44 | 2021-04-09 15:32:34 -0700 | [diff] [blame] | 46 | ":compiler_test", |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 47 | ":concat_test", |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 48 | ":util_test", |
| 49 | ] |
| 50 | } |
| 51 | |
Wyatt Hepler | eb3304c | 2020-09-01 11:36:10 -0700 | [diff] [blame] | 52 | pw_test("arguments_test") { |
| 53 | deps = [ ":pw_preprocessor" ] |
| 54 | sources = [ "arguments_test.cc" ] |
| 55 | } |
| 56 | |
Wyatt Hepler | c5e511e | 2020-06-12 16:56:22 -0700 | [diff] [blame] | 57 | pw_test("boolean_test") { |
| 58 | deps = [ ":pw_preprocessor" ] |
| 59 | sources = [ "boolean_test.cc" ] |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 60 | } |
| 61 | |
Wyatt Hepler | 38b6d44 | 2021-04-09 15:32:34 -0700 | [diff] [blame] | 62 | pw_test("compiler_test") { |
| 63 | deps = [ ":pw_preprocessor" ] |
| 64 | sources = [ "compiler_test.cc" ] |
| 65 | } |
| 66 | |
Wyatt Hepler | c5e511e | 2020-06-12 16:56:22 -0700 | [diff] [blame] | 67 | pw_test("concat_test") { |
| 68 | deps = [ ":pw_preprocessor" ] |
| 69 | sources = [ "concat_test.cc" ] |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 70 | } |
Wyatt Hepler | c5e511e | 2020-06-12 16:56:22 -0700 | [diff] [blame] | 71 | |
Wyatt Hepler | c5e511e | 2020-06-12 16:56:22 -0700 | [diff] [blame] | 72 | pw_test("util_test") { |
| 73 | deps = [ ":pw_preprocessor" ] |
| 74 | sources = [ "util_test.cc" ] |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 75 | } |