blob: e73f66ebeee55f09f1c432ebf0a69a85210c4fb0 [file] [log] [blame]
Austin Engcc2516a2023-10-17 20:57:54 +00001# Copyright 2023 The Dawn & Tint Authors
Ben Clayton65625552023-09-11 18:33:43 +00002#
Austin Engcc2516a2023-10-17 20:57:54 +00003# Redistribution and use in source and binary forms, with or without
4# modification, are permitted provided that the following conditions are met:
Ben Clayton65625552023-09-11 18:33:43 +00005#
Austin Engcc2516a2023-10-17 20:57:54 +00006# 1. Redistributions of source code must retain the above copyright notice, this
7# list of conditions and the following disclaimer.
Ben Clayton65625552023-09-11 18:33:43 +00008#
Austin Engcc2516a2023-10-17 20:57:54 +00009# 2. Redistributions in binary form must reproduce the above copyright notice,
10# this list of conditions and the following disclaimer in the documentation
11# and/or other materials provided with the distribution.
12#
13# 3. Neither the name of the copyright holder nor the names of its
14# contributors may be used to endorse or promote products derived from
15# this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Ben Clayton65625552023-09-11 18:33:43 +000027
28################################################################################
29# File generated by 'tools/src/cmd/gen' using the template:
30# tools/src/cmd/gen/build/BUILD.bazel.tmpl
31#
32# To regenerate run: './tools/run gen'
33#
34# Do not modify this file directly
35################################################################################
36
37load("//src/tint:flags.bzl", "COPTS")
38load("@bazel_skylib//lib:selects.bzl", "selects")
39cc_library(
40 name = "text",
41 srcs = [
Ben Claytonc97af902023-11-23 08:08:53 +000042 "base64.cc",
Ben Clayton65625552023-09-11 18:33:43 +000043 "string.cc",
44 "string_stream.cc",
Ben Clayton89549b12024-02-26 20:24:06 +000045 "styled_text.cc",
46 "styled_text_printer.cc",
47 "styled_text_printer_ansi.cc",
48 "styled_text_theme.cc",
Ben Clayton65625552023-09-11 18:33:43 +000049 "unicode.cc",
Ben Clayton89549b12024-02-26 20:24:06 +000050 ] + select({
51 ":_not_tint_build_is_linux__and__not_tint_build_is_mac__and__not_tint_build_is_win_": [
52 "styled_text_printer_other.cc",
53 ],
54 "//conditions:default": [],
55 }) + select({
56 ":tint_build_is_linux_or_tint_build_is_mac": [
57 "styled_text_printer_posix.cc",
58 ],
59 "//conditions:default": [],
60 }) + select({
61 ":tint_build_is_win": [
62 "styled_text_printer_windows.cc",
63 ],
64 "//conditions:default": [],
65 }),
Ben Clayton65625552023-09-11 18:33:43 +000066 hdrs = [
Ben Claytonf0973d52023-11-23 08:08:53 +000067 "base64.h",
Ben Clayton65625552023-09-11 18:33:43 +000068 "string.h",
69 "string_stream.h",
Ben Clayton89549b12024-02-26 20:24:06 +000070 "styled_text.h",
71 "styled_text_printer.h",
72 "styled_text_theme.h",
73 "text_style.h",
Ben Clayton65625552023-09-11 18:33:43 +000074 "unicode.h",
75 ],
76 deps = [
77 "//src/tint/utils/containers",
78 "//src/tint/utils/ice",
79 "//src/tint/utils/macros",
80 "//src/tint/utils/math",
81 "//src/tint/utils/memory",
82 "//src/tint/utils/rtti",
Ben Clayton6b4c1cb2024-02-29 19:58:42 +000083 "//src/tint/utils/system",
Ben Clayton65625552023-09-11 18:33:43 +000084 "//src/tint/utils/traits",
85 ],
86 copts = COPTS,
87 visibility = ["//visibility:public"],
88)
89cc_library(
90 name = "test",
91 alwayslink = True,
92 srcs = [
Ben Claytonf0973d52023-11-23 08:08:53 +000093 "base64_test.cc",
Ben Clayton65625552023-09-11 18:33:43 +000094 "string_stream_test.cc",
95 "string_test.cc",
Ben Clayton89549b12024-02-26 20:24:06 +000096 "styled_text_printer_test.cc",
97 "text_style_test.cc",
Ben Clayton65625552023-09-11 18:33:43 +000098 "unicode_test.cc",
99 ],
100 deps = [
101 "//src/tint/utils/containers",
102 "//src/tint/utils/ice",
103 "//src/tint/utils/macros",
104 "//src/tint/utils/math",
105 "//src/tint/utils/memory",
106 "//src/tint/utils/rtti",
107 "//src/tint/utils/text",
108 "//src/tint/utils/traits",
109 "@gtest",
110 ],
111 copts = COPTS,
112 visibility = ["//visibility:public"],
113)
114
Ben Clayton89549b12024-02-26 20:24:06 +0000115alias(
116 name = "tint_build_is_linux",
117 actual = "//src/tint:tint_build_is_linux_true",
118)
119
120alias(
121 name = "_not_tint_build_is_linux_",
122 actual = "//src/tint:tint_build_is_linux_false",
123)
124
125alias(
126 name = "tint_build_is_mac",
127 actual = "//src/tint:tint_build_is_mac_true",
128)
129
130alias(
131 name = "_not_tint_build_is_mac_",
132 actual = "//src/tint:tint_build_is_mac_false",
133)
134
135alias(
136 name = "tint_build_is_win",
137 actual = "//src/tint:tint_build_is_win_true",
138)
139
140alias(
141 name = "_not_tint_build_is_win_",
142 actual = "//src/tint:tint_build_is_win_false",
143)
144
145selects.config_setting_group(
146 name = "tint_build_is_linux_or_tint_build_is_mac",
147 match_any = [
148 "tint_build_is_linux",
149 "tint_build_is_mac",
150 ],
151)
152
153selects.config_setting_group(
154 name = "_not_tint_build_is_linux__and__not_tint_build_is_mac__and__not_tint_build_is_win_",
155 match_all = [
156 ":_not_tint_build_is_linux_",
157 ":_not_tint_build_is_mac_",
158 ":_not_tint_build_is_win_",
159 ],
160)
161