1 # Copyright 2020 The Pigweed Authors
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
7 # https://www.apache.org/licenses/LICENSE-2.0
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
15 import("//build_overrides/pigweed.gni")
17 import("$dir_pw_build/target_types.gni")
18 import("$dir_pw_docgen/docs.gni")
19 import("$dir_pw_unit_test/test.gni")
21 config("public_config") {
22 include_dirs = [ "public" ]
26 config("overrides_config") {
27 include_dirs = [ "public_overrides" ]
31 # This source set provides the <span> header, which is accessed only through
33 pw_source_set("polyfill") {
34 remove_public_deps = [ "*" ]
35 public_configs = [ ":overrides_config" ]
36 public_deps = [ ":pw_span" ]
37 public = [ "public_overrides/span" ]
38 visibility = [ "$dir_pw_polyfill:*" ]
41 # This source set provides the internal span.h header included by <span>. This
42 # source set is only used by pw_polyfill, so its visibility is restricted.
43 pw_source_set("pw_span") {
44 remove_public_deps = [ "*" ]
45 public_configs = [ ":public_config" ]
46 public_deps = [ "$dir_pw_polyfill" ]
47 sources = [ "public/pw_span/internal/span.h" ]
51 pw_test_group("tests") {
57 remove_configs = [ "$dir_pw_build:extra_strict_warnings" ]
58 sources = [ "span_test.cc" ]
61 pw_doc_group("docs") {
62 sources = [ "docs.rst" ]