-
Notifications
You must be signed in to change notification settings - Fork 369
/
BUILD.bazel
166 lines (152 loc) · 4.72 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
# Copyright (c) 2022 by Apex.AI Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load("//bazel:configure_file.bzl", "configure_file")
load("//bazel:configure_version.bzl", "configure_version")
#
########## posh core lib ##########
#
configure_file(
name = "iceoryx_posh_deployment_hpp",
src = "cmake/iceoryx_posh_deployment.hpp.in",
out = "include/iceoryx_posh/iceoryx_posh_deployment.hpp",
config = {
# FIXME: for values see "iceoryx_posh/cmake/IceoryxPoshDeployment.cmake" ... for now some nice defaults
"IOX_COMMUNICATION_POLICY": "ManyToManyPolicy",
"IOX_INTERNAL_MAX_NUMBER_OF_NOTIFIERS": "256",
"IOX_MAX_CHUNKS_ALLOCATED_PER_PUBLISHER_SIMULTANEOUSLY": "8",
"IOX_MAX_CHUNKS_HELD_PER_SUBSCRIBER_SIMULTANEOUSLY": "256",
"IOX_MAX_INTERFACE_NUMBER": "4",
"IOX_MAX_PUBLISHERS": "512",
"IOX_MAX_PUBLISHER_HISTORY": "16",
"IOX_MAX_SUBSCRIBERS": "1024",
"IOX_MAX_SUBSCRIBERS_PER_PUBLISHER": "256",
},
)
configure_version(
name = "iceoryx_versions_hpp",
src = "cmake/iceoryx_versions.hpp.in",
out = "include/iceoryx_versions.hpp",
version_from = "//:VERSION",
)
#
########## posh lib ##########
#
# Special file handling - part 1: Files which are part of "iceoryx_posh" (despite located in "roudi"-subdirectory)
iceory_posh_extra_roudi_files = [
"source/roudi/service_registry.cpp",
]
# Special file handling - part 2: Files which are part of "iceoryx_posh_config"
iceory_posh_config_files = [
"source/log/posh_config_logging.cpp",
"source/gateway/gateway_config.cpp",
"source/gateway/toml_gateway_config_parser.cpp",
"source/roudi/roudi_config_toml_file_provider.cpp",
]
# Special file handling - part 3: Files which are part of "iox-roudi" executable
iox_roudi_executable_files = [
"source/roudi/application/roudi_main.cpp",
]
cc_library(
name = "iceoryx_posh",
srcs = glob(
[
"source/log/**",
"source/capro/**",
"source/error_handling/**",
"source/mepoo/**",
"source/popo/**",
"source/version/**",
"source/runtime/**",
],
exclude = iceory_posh_config_files,
) +
iceory_posh_extra_roudi_files,
hdrs = glob(["include/**"]) + [
":iceoryx_posh_deployment_hpp",
":iceoryx_versions_hpp",
],
strip_include_prefix = "include",
visibility = ["//visibility:public"],
deps = ["//iceoryx_dust", "//iceoryx_hoofs",],
)
#
########## posh lib for gateway support ##########
#
cc_library(
name = "iceoryx_posh_gateway",
srcs = glob(
["source/gateway/**"],
exclude = iceory_posh_config_files,
),
strip_include_prefix = "include",
visibility = ["//visibility:public"],
deps = [":iceoryx_posh"],
)
#
########## posh roudi lib ##########
#
cc_library(
name = "iceoryx_posh_roudi",
srcs = glob(
["source/roudi/**"],
exclude = iceory_posh_extra_roudi_files + iceory_posh_config_files + iox_roudi_executable_files,
),
strip_include_prefix = "include",
visibility = ["//visibility:public"],
deps = [":iceoryx_posh"],
)
#
######### posh config lib ##########
#
cc_library(
name = "iceoryx_posh_config",
srcs = iceory_posh_config_files,
strip_include_prefix = "include",
visibility = ["//visibility:public"],
deps = [
":iceoryx_posh",
"@cpptoml",
],
)
#
######### posh roudi daemon ##########
#
cc_binary(
name = "iox-roudi",
srcs = iox_roudi_executable_files,
visibility = ["//visibility:public"],
deps = [
":iceoryx_posh_config",
":iceoryx_posh_roudi",
],
)
#
########## build iceoryx posh testing lib ##########
#
cc_library(
name = "iceoryx_posh_testing",
srcs = glob(["testing/**/*.cpp"]),
hdrs = glob(["testing/include/**"]),
strip_include_prefix = "testing/include",
visibility = ["//visibility:public"],
deps = [
":iceoryx_posh",
":iceoryx_posh_roudi",
"//iceoryx_hoofs:iceoryx_hoofs_testing",
"@googletest//:gtest",
],
)