1
1
load ("@rules_gazebo//gazebo:headers.bzl" , "gz_export_header" )
2
- load ("@rules_license//rules:license.bzl" , "license" )
3
2
4
3
package (
5
4
default_applicable_licenses = ["//:license" ],
@@ -9,17 +8,27 @@ package(
9
8
],
10
9
)
11
10
12
- public_headers_no_gen = glob ([
13
- "include/gz/common/*.hh" ,
14
- "include/gz/common/**/*.hh" ,
15
- ])
11
+ public_headers_no_gen = glob (
12
+ include = [
13
+ "include/gz/common/**/*.hh" ,
14
+ ],
15
+ exclude = ["include/gz/common/geospatial/Dem.hh" ],
16
+ )
16
17
17
18
sources = glob (
18
- ["src/*.cc" ],
19
- exclude = ["src/*_TEST.cc" ],
19
+ include = ["src/*.cc" ],
20
+ exclude = [
21
+ "src/*_TEST.cc" ,
22
+ # \todo(iche033) include Dem.cc once gdal dep is available.
23
+ "src/Dem.cc"
24
+ ],
20
25
)
21
26
22
- test_sources = glob (["src/*_TEST.cc" ])
27
+ test_sources = glob (
28
+ include = ["src/*_TEST.cc" ],
29
+ # \todo(iche033) include this test once gdal dep is available.
30
+ exclude = ["src/Dem_TEST.cc" ]
31
+ )
23
32
24
33
gz_export_header (
25
34
name = "Export" ,
@@ -32,35 +41,44 @@ public_headers = public_headers_no_gen + [
32
41
"include/gz/common/geospatial/Export.hh" ,
33
42
]
34
43
35
- # cc_library(
36
- # name = "geospatial",
37
- # srcs = sources,
38
- # hdrs = public_headers,
39
- # copts = [
40
- # "-Wno-unused-value",
41
- # "-fexceptions",
42
- # ],
43
- # includes = ["include"],
44
- # visibility = ["//visibility:public"],
45
- # deps = [
46
- # "//:gz-common",
47
- # "//graphics:graphics",
48
- # "@gz-utils//:ImplPtr",
49
- # "@gdal",
50
- # ],
51
- # )
52
- #
53
- # [cc_test(
54
- # name = src.replace("/", "_").replace(".cc", "").replace("src_", ""),
55
- # srcs = [src],
56
- # data = ["//test:data"],
57
- # env = {
58
- # "GZ_BAZEL": "1",
59
- # },
60
- # deps = [
61
- # ":geospatial",
62
- # "//testing:testing",
63
- # "@googletest//:gtest",
64
- # "@googletest//:gtest_main",
65
- # ],
66
- # ) for src in test_sources]
44
+ cc_library (
45
+ name = "geospatial" ,
46
+ srcs = sources ,
47
+ hdrs = public_headers ,
48
+ copts = [
49
+ "-Wno-unused-value" ,
50
+ "-fexceptions" ,
51
+ ],
52
+ includes = ["include" ],
53
+ visibility = ["//visibility:public" ],
54
+ deps = [
55
+ "//:gz-common" ,
56
+ "//graphics:graphics" ,
57
+ "@gz-utils//:ImplPtr" ,
58
+ # \todo(iche033) gdal is not in BCR yet
59
+ # "@gdal",
60
+ ],
61
+ # \todo(iche033) remove this macro once gdal dep is available.
62
+ defines = [
63
+ "BAZEL_DISABLE_DEM_LOADER=1"
64
+ ]
65
+ )
66
+
67
+ [cc_test (
68
+ name = src .replace ("/" , "_" ).replace (".cc" , "" ).replace ("src_" , "" ),
69
+ srcs = [src ],
70
+ data = ["//test:data" ],
71
+ env = {
72
+ "GZ_BAZEL" : "1" ,
73
+ },
74
+ deps = [
75
+ ":geospatial" ,
76
+ "//testing:testing" ,
77
+ "@googletest//:gtest" ,
78
+ "@googletest//:gtest_main" ,
79
+ ],
80
+ # \todo(iche033) remove this macro once gdal dep is available.
81
+ defines = [
82
+ "BAZEL_DISABLE_DEM_LOADER=1"
83
+ ]
84
+ ) for src in test_sources ]
0 commit comments