-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathBUILD
101 lines (93 loc) · 2.01 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
load("@rules_cc//cc:defs.bzl", "cc_binary")
package(
default_visibility = ["//visibility:public"],
)
cc_binary(
name = "math_test",
srcs = [
"example/math_test/main.cpp",
],
malloc = "@com_github_jemalloc//:jemalloc",
deps = ["//:task_flow_dep"],
)
cc_binary(
name = "recmd_op",
srcs = glob([
"example/recmd_test/ops/*.cpp",
"example/recmd_test/deps/*.h",
"example/recmd_test/deps/*.cpp",
]),
linkopts = [
"-lpthread",
"-rdynamic",
"-fPIC -shared",
],
linkshared = True,
linkstatic = True,
deps = ["//:task_flow_dep"],
)
cc_binary(
name = "math_op",
srcs = [
"example/math_test/ops/math_op.cpp",
],
linkopts = [
"-lpthread",
"-rdynamic",
"-fPIC -shared",
],
linkshared = True,
linkstatic = True,
deps = ["//:task_flow_dep"],
)
cc_binary(
name = "generate_op",
srcs = [
"example/generate_test/ops/project_op.cpp",
],
linkopts = [
"-lpthread",
"-rdynamic",
"-fPIC -shared",
],
linkshared = True,
linkstatic = True,
deps = ["//:task_flow_dep"],
)
cc_binary(
name = "generate_test",
srcs = [
"example/generate_test/project_main.cpp",
],
deps = ["//:task_flow_dep"],
)
cc_binary(
name = "recmd_test",
srcs = glob([
"example/recmd_test/**/*.cpp",
"example/recmd_test/**/*.h",
]),
malloc = "@com_github_jemalloc//:jemalloc",
deps = ["//:task_flow_dep"],
)
cc_library(
name = "task_flow_dep",
srcs = glob(["src/**/*.cpp"]),
hdrs = glob(["taskflow/include/**/*.h"]),
linkopts = [
"-lpthread",
"-rdynamic",
"-fPIC",
"-ldl",
"-lstdc++fs",
],
deps = [
"@com_github_absl//absl/strings",
"@com_github_absl//absl/time",
"@com_github_fmtlib_fmt",
"@com_github_spdlog",
"@com_github_taskflow",
"@oneTBB//:tbb",
"@rapidJson//:rapidjson",
],
)