Skip to content

Commit

Permalink
[workspace] Use hdrs consistency checking for pybind11 (RobotLocomoti…
Browse files Browse the repository at this point in the history
  • Loading branch information
jwnimmer-tri authored and RussTedrake committed Jul 3, 2023
1 parent fcc0ad0 commit 42aec4e
Showing 1 changed file with 42 additions and 29 deletions.
71 changes: 42 additions & 29 deletions tools/workspace/pybind11/package.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,56 @@ load(
"install",
"install_files",
)
load(
"@drake//tools/workspace:check_lists_consistency.bzl",
"check_lists_consistency",
)
load("@drake//tools/lint:python_lint.bzl", "python_lint")

licenses(["notice"]) # BSD-3-Clause

package(default_visibility = ["//visibility:public"])

_HDRS = [
"include/pybind11/attr.h",
"include/pybind11/buffer_info.h",
"include/pybind11/cast.h",
"include/pybind11/chrono.h",
"include/pybind11/common.h",
"include/pybind11/complex.h",
"include/pybind11/detail/class.h",
"include/pybind11/detail/common.h",
"include/pybind11/detail/descr.h",
"include/pybind11/detail/init.h",
"include/pybind11/detail/internals.h",
"include/pybind11/detail/type_caster_base.h",
"include/pybind11/detail/typeid.h",
"include/pybind11/eigen.h",
"include/pybind11/embed.h",
"include/pybind11/eval.h",
"include/pybind11/functional.h",
"include/pybind11/gil.h",
"include/pybind11/iostream.h",
"include/pybind11/numpy.h",
"include/pybind11/operators.h",
"include/pybind11/options.h",
"include/pybind11/pybind11.h",
"include/pybind11/pytypes.h",
"include/pybind11/stl.h",
"include/pybind11/stl/filesystem.h",
"include/pybind11/stl_bind.h",
]

check_lists_consistency(
files = _HDRS,
glob_include = [
"include/**",
],
)

cc_library(
name = "pybind11",
hdrs = [
"include/pybind11/attr.h",
"include/pybind11/buffer_info.h",
"include/pybind11/cast.h",
"include/pybind11/chrono.h",
"include/pybind11/common.h",
"include/pybind11/complex.h",
"include/pybind11/detail/class.h",
"include/pybind11/detail/common.h",
"include/pybind11/detail/descr.h",
"include/pybind11/detail/init.h",
"include/pybind11/detail/internals.h",
"include/pybind11/detail/type_caster_base.h",
"include/pybind11/detail/typeid.h",
"include/pybind11/eigen.h",
"include/pybind11/embed.h",
"include/pybind11/eval.h",
"include/pybind11/functional.h",
"include/pybind11/gil.h",
"include/pybind11/iostream.h",
"include/pybind11/numpy.h",
"include/pybind11/operators.h",
"include/pybind11/options.h",
"include/pybind11/pybind11.h",
"include/pybind11/pytypes.h",
"include/pybind11/stl.h",
"include/pybind11/stl/filesystem.h",
"include/pybind11/stl_bind.h",
],
hdrs = _HDRS,
includes = ["include"],
deps = [
"@eigen",
Expand Down

0 comments on commit 42aec4e

Please sign in to comment.