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 | # gn-format disable |
| 16 | import("//build_overrides/pigweed.gni") |
| 17 | |
Alexei Frolov | edd2f14 | 2020-06-09 19:11:27 -0700 | [diff] [blame] | 18 | import("$dir_pw_build/target_types.gni") |
Alexei Frolov | baaa2d6 | 2019-11-12 16:20:51 -0800 | [diff] [blame] | 19 | import("$dir_pw_docgen/docs.gni") |
Alexei Frolov | 925fb8f | 2019-11-05 16:32:30 -0800 | [diff] [blame] | 20 | import("$dir_pw_unit_test/test.gni") |
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 = [ |
| 28 | "public/pw_preprocessor/boolean.h", |
| 29 | "public/pw_preprocessor/compiler.h", |
| 30 | "public/pw_preprocessor/concat.h", |
| 31 | "public/pw_preprocessor/macro_arg_count.h", |
| 32 | "public/pw_preprocessor/util.h", |
| 33 | ] |
| 34 | sources = public |
| 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 = [ |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 44 | ":boolean_test", |
| 45 | ":concat_test", |
| 46 | ":macro_arg_count_test", |
| 47 | ":util_test", |
| 48 | ] |
| 49 | } |
| 50 | |
Wyatt Hepler | c5e511e | 2020-06-12 16:56:22 -0700 | [diff] [blame] | 51 | pw_test("boolean_test") { |
| 52 | deps = [ ":pw_preprocessor" ] |
| 53 | sources = [ "boolean_test.cc" ] |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 54 | } |
| 55 | |
Wyatt Hepler | c5e511e | 2020-06-12 16:56:22 -0700 | [diff] [blame] | 56 | pw_test("concat_test") { |
| 57 | deps = [ ":pw_preprocessor" ] |
| 58 | sources = [ "concat_test.cc" ] |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 59 | } |
Wyatt Hepler | c5e511e | 2020-06-12 16:56:22 -0700 | [diff] [blame] | 60 | |
| 61 | pw_test("macro_arg_count_test") { |
| 62 | deps = [ ":pw_preprocessor" ] |
| 63 | sources = [ "macro_arg_count_test.cc" ] |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 64 | } |
Wyatt Hepler | c5e511e | 2020-06-12 16:56:22 -0700 | [diff] [blame] | 65 | |
| 66 | pw_test("util_test") { |
| 67 | deps = [ ":pw_preprocessor" ] |
| 68 | sources = [ "util_test.cc" ] |
Alexei Frolov | c10c812 | 2019-11-01 16:31:19 -0700 | [diff] [blame] | 69 | } |