blob: 97060a54f2391f31988329c3e8aaa3177dddb5f5 [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",
Wyatt Hepler1c9ce1b2020-01-31 17:34:38 -080039 "public/initializer_list",
Wyatt Hepler0412a7d2020-01-28 16:27:32 -080040 "public/iterator",
41 "public/limits",
42 "public/new",
43 "public/string_view",
44 "public/type_traits",
45 "public/utility",
46 ]
47 sources = [
48 "public/internal/algorithm.h",
49 "public/internal/array.h",
50 "public/internal/cinttypes.h",
51 "public/internal/cmath.h",
52 "public/internal/cstdarg.h",
53 "public/internal/cstddef.h",
54 "public/internal/cstdint.h",
55 "public/internal/cstdio.h",
56 "public/internal/cstring.h",
Wyatt Hepler1c9ce1b2020-01-31 17:34:38 -080057 "public/internal/initializer_list.h",
Wyatt Hepler0412a7d2020-01-28 16:27:32 -080058 "public/internal/iterator.h",
59 "public/internal/limits.h",
60 "public/internal/new.h",
61 "public/internal/string_view.h",
62 "public/internal/type_traits.h",
63 "public/internal/utility.h",
64 ]
65}
66
67pw_test_group("tests") {
68 tests = [
69 ":minimal_cpp_stdlib_test",
70 ":standard_library_test",
71 ]
72}
73
74pw_test("minimal_cpp_stdlib_test") {
75 configs = [ ":no_cpp_includes" ]
Rob Mohra0ba54f2020-02-27 11:43:49 -080076 deps = [ ":pw_minimal_cpp_stdlib" ]
77 sources = [ "test.cc" ]
Wyatt Hepler0412a7d2020-01-28 16:27:32 -080078}
79
80pw_test("standard_library_test") {
Rob Mohra0ba54f2020-02-27 11:43:49 -080081 sources = [ "test.cc" ]
Wyatt Hepler0412a7d2020-01-28 16:27:32 -080082}
83
84pw_doc_group("docs") {
Rob Mohra0ba54f2020-02-27 11:43:49 -080085 sources = [ "docs.rst" ]
Wyatt Hepler0412a7d2020-01-28 16:27:32 -080086}