forked from eclipse-iceoryx/iceoryx2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
201 lines (182 loc) · 5.06 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
# Copyright (c) 2024 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache Software License 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0, or the MIT license
# which is available at https://opensource.org/licenses/MIT.
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
package(default_visibility = ["//visibility:public"])
load("@bazel_skylib//lib:selects.bzl", "selects")
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
exports_files([
"LICENSE-APACHE",
"LICENSE-MIT",
])
#
# Config & Platform support
#
config_setting(
name = "linux",
constraint_values = ["@platforms//os:linux"],
)
config_setting(
name = "win-gcc",
constraint_values = ["@platforms//os:windows"],
flag_values = {"@bazel_tools//tools/cpp:compiler": "mingw-gcc"},
)
config_setting(
name = "win-msvc",
constraint_values = ["@platforms//os:windows"],
flag_values = {"@bazel_tools//tools/cpp:compiler": "msvc-cl"},
)
#
# Rust Feature Flags
#
string_flag(
name = "feature_dev_permissions",
build_setting_default = "auto",
visibility = ["//visibility:public"],
)
config_setting(
name = "dev_permissions_auto",
flag_values = {
"//:feature_dev_permissions": "auto",
},
)
config_setting(
name = "dev_permissions_enabled",
flag_values = {
"//:feature_dev_permissions": "on",
},
)
# NOTE: while this seems superfluous, it is the pattern for cases where *_auto is on by default;
# therefore this target is introduced to keep all feature flags consistent
selects.config_setting_group(
name = "cfg_feature_dev_permissions",
match_any = [
"//:dev_permissions_enabled",
],
)
string_flag(
name = "feature_logger_log",
build_setting_default = "auto",
visibility = ["//visibility:public"],
)
config_setting(
name = "logger_log_auto",
flag_values = {
"//:feature_logger_log": "auto",
},
)
config_setting(
name = "logger_log_enabled",
flag_values = {
"//:feature_logger_log": "on",
},
)
# NOTE: while this seems superfluous, it is the pattern for cases where *_auto is on by default;
# therefore this target is introduced to keep all feature flags consistent
selects.config_setting_group(
name = "cfg_feature_logger_log",
match_any = [
":logger_log_enabled",
],
)
string_flag(
name = "feature_logger_tracing",
build_setting_default = "auto",
visibility = ["//visibility:public"],
)
config_setting(
name = "logger_tracing_auto",
flag_values = {
"//:feature_logger_tracing": "auto",
},
)
config_setting(
name = "logger_tracing_enabled",
flag_values = {
"//:feature_logger_tracing": "on",
},
)
# NOTE: while this seems superfluous, it is the pattern for cases where *_auto is on by default;
# therefore this target is introduced to keep all feature flags consistent
selects.config_setting_group(
name = "cfg_feature_logger_tracing",
match_any = [
":logger_tracing_enabled",
],
)
#
# Alias
#
alias(
name = "iceoryx2",
actual = "//iceoryx2:iceoryx2",
visibility = ["//visibility:public"],
)
alias(
name = "iceoryx2-c-shared",
actual = "//iceoryx2-ffi/c:iceoryx2-c-shared",
visibility = ["//visibility:public"],
)
alias(
name = "iceoryx2-c-static",
actual = "//iceoryx2-ffi/c:iceoryx2-c-static",
visibility = ["//visibility:public"],
)
alias(
name = "iceoryx2-cxx-shared",
actual = "//iceoryx2-ffi/cxx:iceoryx2-cxx-shared",
visibility = ["//visibility:public"],
)
alias(
name = "iceoryx2-cxx-static",
actual = "//iceoryx2-ffi/cxx:iceoryx2-cxx-static",
visibility = ["//visibility:public"],
)
#
# all_srcs
#
filegroup(
name = "all_srcs",
srcs = glob([
"config/**",
"examples/**",
"*.bazel",
"*.lock",
"*.toml",
"*.txt",
"*.md",
"LICENSE-*",
]) + [
"//benchmarks/event:all_srcs",
"//benchmarks/publish-subscribe:all_srcs",
"//iceoryx2:all_srcs",
"//iceoryx2-bb/container:all_srcs",
"//iceoryx2-bb/derive-macros:all_srcs",
"//iceoryx2-bb/elementary:all_srcs",
"//iceoryx2-bb/lock-free:all_srcs",
"//iceoryx2-bb/log:all_srcs",
"//iceoryx2-bb/memory:all_srcs",
"//iceoryx2-bb/posix:all_srcs",
"//iceoryx2-bb/system-types:all_srcs",
"//iceoryx2-bb/testing:all_srcs",
"//iceoryx2-bb/threadsafe:all_srcs",
"//iceoryx2-bb/trait-tests:all_srcs",
"//iceoryx2-cal:all_srcs",
"//iceoryx2-cli:all_srcs",
"//iceoryx2-ffi/ffi:all_srcs",
"//iceoryx2-ffi/c:all_srcs",
"//iceoryx2-ffi/cxx:all_srcs",
"//iceoryx2-ffi/ffi-macros:all_srcs",
"//iceoryx2-pal/concurrency-sync:all_srcs",
"//iceoryx2-pal/configuration:all_srcs",
"//iceoryx2-pal/posix:all_srcs",
],
visibility = ["//visibility:public"],
)