Skip to content

Commit

Permalink
Enable parse_headers and layering check for all sub-packages (#160)
Browse files Browse the repository at this point in the history
Signed-off-by: Shameek Ganguly <[email protected]>
  • Loading branch information
shameekganguly authored Nov 15, 2024
1 parent 9450d4f commit 7daf8e7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ build --strip=never
build --strict_system_includes
build --fission=dbg
build --features=per_object_debug_info

# Enable header processing, required for layering checks with parse_header.
build --process_headers_in_dependencies
8 changes: 7 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ load("@rules_license//rules:license.bzl", "license")
package(
default_applicable_licenses = [":license"],
default_visibility = ["__subpackages__"],
features = ["layering_check"],
features = [
"layering_check",
"parse_headers",
],
)

license(
Expand Down Expand Up @@ -83,6 +86,9 @@ cc_library(
],
includes = ["include"],
visibility = ["//visibility:public"],
deps = [
":Environment",
],
)

cc_library(
Expand Down
9 changes: 9 additions & 0 deletions cli/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
package(
default_applicable_licenses = ["//:license"],
default_visibility = ["__subpackages__"],
features = [
"layering_check",
"parse_headers",
],
)

cc_library(
name = "cli11",
hdrs = glob([
"include/vendored-cli/gz/utils/cli/*.hpp",
]),
features = [
# Disable header parsing for CLI11.
"-parse_headers",
],
includes = ["include/vendored-cli"],
)

Expand All @@ -19,6 +27,7 @@ cc_library(
includes = ["include"],
visibility = ["//visibility:public"],
deps = [
":cli11",
"//:Export",
],
)
Expand Down
4 changes: 4 additions & 0 deletions log/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ load("@rules_gazebo//gazebo:headers.bzl", "gz_export_header")
package(
default_applicable_licenses = ["//:license"],
default_visibility = ["__subpackages__"],
features = [
"layering_check",
"parse_headers",
],
)

gz_export_header(
Expand Down

0 comments on commit 7daf8e7

Please sign in to comment.