forked from ApolloAuto/apollo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtensorrt.BUILD
48 lines (43 loc) · 1.12 KB
/
tensorrt.BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Eigen is a C++ template library for linear algebra: vectors,
# matrices, and related algorithms.
#
# This is Eigen 3.2.10
# This BUILD file is derived from
# https://github.com/RobotLocomotion/drake/blob/master/tools/eigen.BUILD
licenses([
# Note: Eigen is an MPL2 library that includes GPL v3 and LGPL v2.1+ code.
# We've taken special care to not reference any restricted code.
"notice", # Portions BSD
])
cc_library(
name = "tensorrt",
includes = [
".",
"/usr/include/tensorrt",
],
linkopts = select(
{
":x86_mode": [
"-L/usr/lib/x86_64-linux-gnu/",
],
":arm_mode": [
"-L/usr/lib/aarch64-linux-gnu/",
],
},
no_match_error = "Please Build with an ARM or Linux x86_64 platform",
) + [
"-lnvcaffe_parser",
"-lnvinfer",
"-lnvinfer_plugin",
"-lnvparsers",
],
visibility = ["//visibility:public"],
)
config_setting(
name = "x86_mode",
values = {"cpu": "k8"},
)
config_setting(
name = "arm_mode",
values = {"cpu": "arm"},
)