Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / pigweed / repo / pw_span / BUILD.gn
1 # 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
15 import("//build_overrides/pigweed.gni")
16
17 import("$dir_pw_build/target_types.gni")
18 import("$dir_pw_docgen/docs.gni")
19 import("$dir_pw_unit_test/test.gni")
20
21 config("public_config") {
22   include_dirs = [ "public" ]
23   visibility = [ ":*" ]
24 }
25
26 config("overrides_config") {
27   include_dirs = [ "public_overrides" ]
28   visibility = [ ":*" ]
29 }
30
31 # This source set provides the <span> header, which is accessed only through
32 # pw_polyfill.
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:*" ]
39 }
40
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" ]
48   visibility = [ ":*" ]
49 }
50
51 pw_test_group("tests") {
52   tests = [ ":test" ]
53 }
54
55 pw_test("test") {
56   deps = [ ":pw_span" ]
57   remove_configs = [ "$dir_pw_build:extra_strict_warnings" ]
58   sources = [ "span_test.cc" ]
59 }
60
61 pw_doc_group("docs") {
62   sources = [ "docs.rst" ]
63 }