blob: 3cbe16388ca6fbbe7dce11aae565a318bdccb6d9 [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",
Armando Montanez187389d2020-04-06 17:00:13 -070033 "public/climits",
Wyatt Hepler0412a7d2020-01-28 16:27:32 -080034 "public/cmath",
35 "public/cstdarg",
36 "public/cstddef",
37 "public/cstdint",
38 "public/cstdio",
39 "public/cstring",
Wyatt Hepler1c9ce1b2020-01-31 17:34:38 -080040 "public/initializer_list",
Wyatt Hepler0412a7d2020-01-28 16:27:32 -080041 "public/iterator",
42 "public/limits",
43 "public/new",
44 "public/string_view",
45 "public/type_traits",
46 "public/utility",
47 ]
48 sources = [
49 "public/internal/algorithm.h",
50 "public/internal/array.h",
51 "public/internal/cinttypes.h",
Armando Montanez187389d2020-04-06 17:00:13 -070052 "public/internal/climits.h",
Wyatt Hepler0412a7d2020-01-28 16:27:32 -080053 "public/internal/cmath.h",
54 "public/internal/cstdarg.h",
55 "public/internal/cstddef.h",
56 "public/internal/cstdint.h",
57 "public/internal/cstdio.h",
58 "public/internal/cstring.h",
Wyatt Hepler1c9ce1b2020-01-31 17:34:38 -080059 "public/internal/initializer_list.h",
Wyatt Hepler0412a7d2020-01-28 16:27:32 -080060 "public/internal/iterator.h",
61 "public/internal/limits.h",
62 "public/internal/new.h",
63 "public/internal/string_view.h",
64 "public/internal/type_traits.h",
65 "public/internal/utility.h",
66 ]
67}
68
69pw_test_group("tests") {
70 tests = [
71 ":minimal_cpp_stdlib_test",
72 ":standard_library_test",
73 ]
74}
75
76pw_test("minimal_cpp_stdlib_test") {
77 configs = [ ":no_cpp_includes" ]
Rob Mohra0ba54f2020-02-27 11:43:49 -080078 deps = [ ":pw_minimal_cpp_stdlib" ]
79 sources = [ "test.cc" ]
Wyatt Hepler0412a7d2020-01-28 16:27:32 -080080}
81
82pw_test("standard_library_test") {
Rob Mohra0ba54f2020-02-27 11:43:49 -080083 sources = [ "test.cc" ]
Wyatt Hepler0412a7d2020-01-28 16:27:32 -080084}
85
86pw_doc_group("docs") {
Rob Mohra0ba54f2020-02-27 11:43:49 -080087 sources = [ "docs.rst" ]
Wyatt Hepler0412a7d2020-01-28 16:27:32 -080088}