Skip to content

Commit 2877e3a

Browse files
kgreenekfmeum
andauthored
lanelet2@1.2.2 (#3494)
Closes #3487 --------- Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
1 parent 9a5efb8 commit 2877e3a

File tree

8 files changed

+497
-0
lines changed

8 files changed

+497
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module(
2+
name = "lanelet2",
3+
version = "1.2.2",
4+
)
5+
6+
BOOST_VERSION = "1.83.0"
7+
8+
bazel_dep(name = "boost.config", version = BOOST_VERSION + ".bcr.1")
9+
bazel_dep(name = "boost.core", version = BOOST_VERSION + ".bcr.1")
10+
bazel_dep(name = "boost.filesystem", version = BOOST_VERSION + ".bcr.1")
11+
bazel_dep(name = "boost.format", version = BOOST_VERSION + ".bcr.1")
12+
bazel_dep(name = "boost.geometry", version = BOOST_VERSION + ".bcr.1")
13+
bazel_dep(name = "boost.graph", version = BOOST_VERSION + ".bcr.1")
14+
bazel_dep(name = "boost.iterator", version = BOOST_VERSION + ".bcr.1")
15+
bazel_dep(name = "boost.lexical_cast", version = BOOST_VERSION + ".bcr.1")
16+
bazel_dep(name = "boost.optional", version = BOOST_VERSION + ".bcr.1")
17+
bazel_dep(name = "boost.polygon", version = BOOST_VERSION + ".bcr.1")
18+
bazel_dep(name = "boost.program_options", version = BOOST_VERSION + ".bcr.1")
19+
bazel_dep(name = "boost.property_map", version = BOOST_VERSION + ".bcr.1")
20+
bazel_dep(name = "boost.serialization", version = BOOST_VERSION + ".bcr.1")
21+
bazel_dep(name = "boost.type_traits", version = BOOST_VERSION + ".bcr.1")
22+
bazel_dep(name = "boost.units", version = BOOST_VERSION)
23+
bazel_dep(name = "boost.variant", version = BOOST_VERSION + ".bcr.1")
24+
bazel_dep(name = "eigen", version = "3.4.0.bcr.1")
25+
bazel_dep(name = "geographiclib", version = "2.4.0.bcr.1")
26+
bazel_dep(name = "googletest", version = "1.15.2", repo_name = "com_google_googletest")
27+
bazel_dep(name = "platforms", version = "0.0.9")
28+
bazel_dep(name = "pugixml", version = "1.14.bcr.1")
29+
bazel_dep(name = "rules_cc", version = "0.1.0")
30+
bazel_dep(name = "rules_license", version = "1.0.0")
Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
"""Bazel build file for lanelet2 libraries"""
2+
3+
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
4+
load("@rules_license//rules:license.bzl", "license")
5+
6+
package(default_applicable_licenses = [":license"])
7+
8+
license(
9+
name = "license",
10+
license_kinds = ["@rules_license//licenses/spdx:BSD-3-Clause"],
11+
license_text = "LICENSE",
12+
)
13+
14+
cc_library(
15+
name = "lanelet2_core",
16+
srcs = glob(["lanelet2_core/src/**/*.cpp"]),
17+
hdrs = glob(["lanelet2_core/include/**/*.h"]),
18+
copts = select({
19+
"@platforms//os:windows": [],
20+
"//conditions:default": [
21+
"-Wno-sign-compare",
22+
"-Wno-unused-function",
23+
"-Wno-unused-local-typedefs",
24+
],
25+
}),
26+
includes = ["lanelet2_core/include"],
27+
visibility = ["//visibility:public"],
28+
deps = [
29+
"@boost.config",
30+
"@boost.core",
31+
"@boost.geometry",
32+
"@boost.iterator",
33+
"@boost.lexical_cast",
34+
"@boost.optional",
35+
"@boost.polygon",
36+
"@boost.type_traits",
37+
"@boost.units",
38+
"@boost.variant",
39+
"@eigen",
40+
],
41+
)
42+
43+
cc_library(
44+
name = "lanelet2_io",
45+
srcs = glob(["lanelet2_io/src/**/*.cpp"]),
46+
hdrs = glob(["lanelet2_io/include/**/*.h"]),
47+
includes = ["lanelet2_io/include"],
48+
visibility = ["//visibility:public"],
49+
deps = [
50+
":lanelet2_core",
51+
"@boost.filesystem",
52+
"@boost.format",
53+
"@boost.geometry",
54+
"@boost.serialization",
55+
"@pugixml",
56+
],
57+
)
58+
59+
filegroup(
60+
name = "lanelet2_maps_osm_files",
61+
srcs = glob(["lanelet2_maps/res/*.osm"]),
62+
)
63+
64+
cc_library(
65+
name = "lanelet2_matching",
66+
srcs = glob(["lanelet2_matching/src/**/*.cpp"]),
67+
hdrs = glob(["lanelet2_matching/include/**/*.h"]),
68+
includes = [
69+
"lanelet2_matching/include",
70+
# This has to be exposed as a public include because the headers include other headers using
71+
# the local path.
72+
"lanelet2_matching/include/lanelet2_matching",
73+
],
74+
visibility = ["//visibility:public"],
75+
deps = [
76+
":lanelet2_core",
77+
":lanelet2_traffic_rules",
78+
"@eigen",
79+
],
80+
)
81+
82+
cc_library(
83+
name = "lanelet2_projection",
84+
srcs = glob(["lanelet2_projection/src/**/*.cpp"]),
85+
hdrs = glob(["lanelet2_projection/include/**/*.h"]),
86+
includes = ["lanelet2_projection/include"],
87+
visibility = ["//visibility:public"],
88+
deps = [
89+
":lanelet2_core",
90+
":lanelet2_io",
91+
"@geographiclib",
92+
],
93+
)
94+
95+
cc_library(
96+
name = "lanelet2_routing",
97+
srcs = glob(["lanelet2_routing/src/**/*.cpp"]),
98+
hdrs = glob(["lanelet2_routing/include/**/*.h"]),
99+
includes = ["lanelet2_routing/include"],
100+
visibility = ["//visibility:public"],
101+
deps = [
102+
":lanelet2_core",
103+
":lanelet2_traffic_rules",
104+
"@boost.geometry",
105+
"@boost.graph",
106+
"@boost.property_map",
107+
],
108+
)
109+
110+
cc_library(
111+
name = "lanelet2_traffic_rules",
112+
srcs = glob(["lanelet2_traffic_rules/src/**/*.cpp"]),
113+
hdrs = glob(["lanelet2_traffic_rules/include/**/*.h"]),
114+
includes = ["lanelet2_traffic_rules/include"],
115+
visibility = ["//visibility:public"],
116+
deps = [":lanelet2_core"],
117+
)
118+
119+
cc_library(
120+
name = "lanelet2_validation",
121+
srcs = glob(["lanelet2_validation/src/**/*.cpp"]),
122+
hdrs = glob(["lanelet2_validation/include/**/*.h"]),
123+
includes = ["lanelet2_validation/include"],
124+
visibility = ["//visibility:public"],
125+
deps = [
126+
":lanelet2_core",
127+
":lanelet2_io",
128+
":lanelet2_projection",
129+
":lanelet2_routing",
130+
":lanelet2_traffic_rules",
131+
"@boost.program_options",
132+
],
133+
)
134+
135+
#################################################################################
136+
# Tests
137+
#################################################################################
138+
cc_test(
139+
name = "lanelet2_core_test",
140+
size = "small",
141+
srcs = glob([
142+
"lanelet2_core/test/*.cpp",
143+
"lanelet2_core/test/*.h",
144+
]),
145+
copts = select({
146+
"@platforms//os:windows": [],
147+
"//conditions:default": ["-Wno-sign-compare"],
148+
}),
149+
deps = [
150+
":lanelet2_core",
151+
"@boost.geometry",
152+
"@boost.optional",
153+
"@com_google_googletest//:gtest_main",
154+
],
155+
)
156+
157+
cc_test(
158+
name = "lanelet2_io_test",
159+
size = "small",
160+
srcs = glob([
161+
"lanelet2_io/test/*.cpp",
162+
"lanelet2_io/test/*.h",
163+
]),
164+
data = [":lanelet2_maps_osm_files"],
165+
deps = [
166+
":lanelet2_core",
167+
":lanelet2_io",
168+
"@bazel_tools//tools/cpp/runfiles",
169+
"@boost.filesystem",
170+
"@boost.serialization",
171+
"@com_google_googletest//:gtest_main",
172+
],
173+
)
174+
175+
cc_test(
176+
name = "lanelet2_matching_test",
177+
size = "small",
178+
srcs = glob(["lanelet2_matching/test/*.cpp"]),
179+
deps = [
180+
":lanelet2_io",
181+
":lanelet2_matching",
182+
":lanelet2_projection",
183+
":lanelet2_traffic_rules",
184+
"@com_google_googletest//:gtest_main",
185+
],
186+
)
187+
188+
cc_test(
189+
name = "lanelet2_projection_test",
190+
size = "small",
191+
srcs = glob(["lanelet2_projection/test/*.cpp"]),
192+
deps = [
193+
":lanelet2_projection",
194+
"@com_google_googletest//:gtest_main",
195+
],
196+
)
197+
198+
cc_test(
199+
name = "lanelet2_routing_test",
200+
size = "small",
201+
srcs = glob([
202+
"lanelet2_routing/test/*.cpp",
203+
"lanelet2_routing/test/*.h",
204+
]),
205+
# For some unknown reason, this test fails without optimization enabled.
206+
copts = ["-O3"],
207+
deps = [
208+
":lanelet2_core",
209+
":lanelet2_routing",
210+
":lanelet2_traffic_rules",
211+
"@boost.filesystem",
212+
"@boost.geometry",
213+
"@boost.optional",
214+
"@com_google_googletest//:gtest_main",
215+
],
216+
)
217+
218+
cc_test(
219+
name = "lanelet2_traffic_rules_test",
220+
size = "small",
221+
srcs = glob(["lanelet2_traffic_rules/test/*.cpp"]),
222+
deps = [
223+
":lanelet2_core",
224+
":lanelet2_traffic_rules",
225+
"@com_google_googletest//:gtest_main",
226+
],
227+
)
228+
229+
cc_test(
230+
name = "lanelet2_validation_test",
231+
size = "small",
232+
srcs = glob(["lanelet2_validation/test/*.cpp"]),
233+
data = [":lanelet2_maps_osm_files"],
234+
deps = [
235+
":lanelet2_core",
236+
":lanelet2_io",
237+
":lanelet2_projection",
238+
":lanelet2_validation",
239+
"@bazel_tools//tools/cpp/runfiles",
240+
"@com_google_googletest//:gtest_main",
241+
],
242+
)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../MODULE.bazel

0 commit comments

Comments
 (0)