blob: d9ac40f30699474031595ab0cec4cea020269025 [file] [log] [blame]
Wyatt Hepler0412a7d2020-01-28 16:27:32 -08001# Copyright 2020 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
15import("$dir_pw_docgen/docs.gni")
16import("$dir_pw_unit_test/test.gni")
17
18config("include_dirs") {
19 include_dirs = [ "public" ]
20}
21
22config("no_cpp_includes") {
23 cflags = [ "-nostdinc++" ]
24}
25
26source_set("pw_minimal_cpp_stdlib") {
27 public_configs = [ ":include_dirs" ]
28 configs = [ ":no_cpp_includes" ]
29 public = [
30 "public/algorithm",
31 "public/array",
32 "public/cinttypes",
33 "public/cmath",
34 "public/cstdarg",
35 "public/cstddef",
36 "public/cstdint",
37 "public/cstdio",
38 "public/cstring",
39 "public/iterator",
40 "public/limits",
41 "public/new",
42 "public/string_view",
43 "public/type_traits",
44 "public/utility",
45 ]
46 sources = [
47 "public/internal/algorithm.h",
48 "public/internal/array.h",
49 "public/internal/cinttypes.h",
50 "public/internal/cmath.h",
51 "public/internal/cstdarg.h",
52 "public/internal/cstddef.h",
53 "public/internal/cstdint.h",
54 "public/internal/cstdio.h",
55 "public/internal/cstring.h",
56 "public/internal/iterator.h",
57 "public/internal/limits.h",
58 "public/internal/new.h",
59 "public/internal/string_view.h",
60 "public/internal/type_traits.h",
61 "public/internal/utility.h",
62 ]
63}
64
65pw_test_group("tests") {
66 tests = [
67 ":minimal_cpp_stdlib_test",
68 ":standard_library_test",
69 ]
70}
71
72pw_test("minimal_cpp_stdlib_test") {
73 configs = [ ":no_cpp_includes" ]
74 deps = [
75 ":pw_minimal_cpp_stdlib",
76 ]
77 sources = [
78 "test.cc",
79 ]
80}
81
82pw_test("standard_library_test") {
83 sources = [
84 "test.cc",
85 ]
86}
87
88pw_doc_group("docs") {
89 sources = [
90 "docs.rst",
91 ]
92}