blob: 95459e4ca514182ba62fdd9d8dfd1bff7b476e64 [file] [log] [blame]
Alexei Frolovc10c8122019-11-01 16:31:19 -07001# 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 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")
Alexei Frolovbaaa2d62019-11-12 16:20:51 -080018import("$dir_pw_docgen/docs.gni")
Alexei Frolov925fb8f2019-11-05 16:32:30 -080019import("$dir_pw_unit_test/test.gni")
Wyatt Heplerd49f8fe2020-10-15 10:13:47 -070020
Alexei Frolovc10c8122019-11-01 16:31:19 -070021config("default_config") {
22 include_dirs = [ "public" ]
23}
24
Alexei Frolovedd2f142020-06-09 19:11:27 -070025pw_source_set("pw_preprocessor") {
Wyatt Hepler21192402020-01-15 15:40:51 -080026 public_configs = [ ":default_config" ]
Alexei Frolovc10c8122019-11-01 16:31:19 -070027 public = [
Wyatt Heplereb3304c2020-09-01 11:36:10 -070028 "public/pw_preprocessor/arguments.h",
Alexei Frolovc10c8122019-11-01 16:31:19 -070029 "public/pw_preprocessor/boolean.h",
30 "public/pw_preprocessor/compiler.h",
31 "public/pw_preprocessor/concat.h",
Alexei Frolovc10c8122019-11-01 16:31:19 -070032 "public/pw_preprocessor/util.h",
33 ]
Wyatt Hepler880cd682020-08-18 16:15:48 -070034 sources = [ "public/pw_preprocessor/internal/arg_count_impl.h" ]
Alexei Frolovc10c8122019-11-01 16:31:19 -070035}
36
Alexei Frolovbaaa2d62019-11-12 16:20:51 -080037pw_doc_group("docs") {
Rob Mohra0ba54f2020-02-27 11:43:49 -080038 sources = [ "docs.rst" ]
Alexei Frolovbaaa2d62019-11-12 16:20:51 -080039}
40
Alexei Frolov925fb8f2019-11-05 16:32:30 -080041# All pw_preprocessor test binaries.
Alexei Frolova454c682019-11-19 10:55:07 -080042pw_test_group("tests") {
43 tests = [
Wyatt Heplereb3304c2020-09-01 11:36:10 -070044 ":arguments_test",
Alexei Frolovc10c8122019-11-01 16:31:19 -070045 ":boolean_test",
Wyatt Hepler38b6d442021-04-09 15:32:34 -070046 ":compiler_test",
Alexei Frolovc10c8122019-11-01 16:31:19 -070047 ":concat_test",
Alexei Frolovc10c8122019-11-01 16:31:19 -070048 ":util_test",
49 ]
50}
51
Wyatt Heplereb3304c2020-09-01 11:36:10 -070052pw_test("arguments_test") {
53 deps = [ ":pw_preprocessor" ]
54 sources = [ "arguments_test.cc" ]
55}
56
Wyatt Heplerc5e511e2020-06-12 16:56:22 -070057pw_test("boolean_test") {
58 deps = [ ":pw_preprocessor" ]
59 sources = [ "boolean_test.cc" ]
Alexei Frolovc10c8122019-11-01 16:31:19 -070060}
61
Wyatt Hepler38b6d442021-04-09 15:32:34 -070062pw_test("compiler_test") {
63 deps = [ ":pw_preprocessor" ]
64 sources = [ "compiler_test.cc" ]
65}
66
Wyatt Heplerc5e511e2020-06-12 16:56:22 -070067pw_test("concat_test") {
68 deps = [ ":pw_preprocessor" ]
69 sources = [ "concat_test.cc" ]
Alexei Frolovc10c8122019-11-01 16:31:19 -070070}
Wyatt Heplerc5e511e2020-06-12 16:56:22 -070071
Wyatt Heplerc5e511e2020-06-12 16:56:22 -070072pw_test("util_test") {
73 deps = [ ":pw_preprocessor" ]
74 sources = [ "util_test.cc" ]
Alexei Frolovc10c8122019-11-01 16:31:19 -070075}