Skip to content

Commit 00b4603

Browse files
committed
Add basic pybind11 BUILD file
1 parent 3707bc6 commit 00b4603

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

pybind11.BUILD

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# pybind11 - Seamless operability between C++11 and Python.
2+
3+
package(default_visibility = ["//visibility:public"])
4+
5+
licenses(["notice"])
6+
7+
exports_files(["LICENSE"])
8+
9+
OPTIONS = [
10+
"-fexceptions",
11+
# Useless warnings
12+
"-Xclang-only=-Wno-undefined-inline",
13+
"-Xclang-only=-Wno-pragma-once-outside-header",
14+
"-Xgcc-only=-Wno-error", # no way to just disable the pragma-once warning in gcc
15+
]
16+
17+
INCLUDES = [
18+
"include/pybind11/*.h",
19+
"include/pybind11/detail/*.h",
20+
]
21+
22+
EXCLUDES = [
23+
# Deprecated file that just emits a warning
24+
"include/pybind11/common.h",
25+
"include/pybind11/eigen.h",
26+
]
27+
28+
cc_library(
29+
name = "pybind11",
30+
hdrs = glob(
31+
INCLUDES,
32+
exclude = EXCLUDES,
33+
),
34+
copts = OPTIONS,
35+
includes = ["include"],
36+
deps = ["@local_config_python//:python_headers"],
37+
)

0 commit comments

Comments
 (0)