blob: dff5a11dd0c34c75adae54bd2741331aa85200bd [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 -070015# gn-format disable
16import("//build_overrides/pigweed.gni")
17
Alexei Frolovedd2f142020-06-09 19:11:27 -070018import("$dir_pw_build/target_types.gni")
Alexei Frolovbaaa2d62019-11-12 16:20:51 -080019import("$dir_pw_docgen/docs.gni")
Alexei Frolov925fb8f2019-11-05 16:32:30 -080020import("$dir_pw_unit_test/test.gni")
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 = [
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 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 = [
Alexei Frolovc10c8122019-11-01 16:31:19 -070044 ":boolean_test",
45 ":concat_test",
46 ":macro_arg_count_test",
47 ":util_test",
48 ]
49}
50
Wyatt Heplerc5e511e2020-06-12 16:56:22 -070051pw_test("boolean_test") {
52 deps = [ ":pw_preprocessor" ]
53 sources = [ "boolean_test.cc" ]
Alexei Frolovc10c8122019-11-01 16:31:19 -070054}
55
Wyatt Heplerc5e511e2020-06-12 16:56:22 -070056pw_test("concat_test") {
57 deps = [ ":pw_preprocessor" ]
58 sources = [ "concat_test.cc" ]
Alexei Frolovc10c8122019-11-01 16:31:19 -070059}
Wyatt Heplerc5e511e2020-06-12 16:56:22 -070060
61pw_test("macro_arg_count_test") {
62 deps = [ ":pw_preprocessor" ]
63 sources = [ "macro_arg_count_test.cc" ]
Alexei Frolovc10c8122019-11-01 16:31:19 -070064}
Wyatt Heplerc5e511e2020-06-12 16:56:22 -070065
66pw_test("util_test") {
67 deps = [ ":pw_preprocessor" ]
68 sources = [ "util_test.cc" ]
Alexei Frolovc10c8122019-11-01 16:31:19 -070069}