Skip to content

Commit

Permalink
Bazel: Add pthread target.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxq committed Jan 14, 2020
1 parent 1d5de57 commit d5e2d32
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
4 changes: 1 addition & 3 deletions cyber/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ cc_binary(
"mainboard/module_controller.cc",
"mainboard/module_controller.h",
],
copts = [
"-pthread",
],
linkstatic = False,
deps = [
":cyber_core",
"//cyber/proto:dag_conf_cc_proto",
"//third_party:pthread",
],
)

Expand Down
2 changes: 1 addition & 1 deletion cyber/tools/cyber_monitor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ cc_binary(
"screen.cc",
],
linkopts = [
"-pthread",
"-lncurses",
],
deps = [
Expand All @@ -23,6 +22,7 @@ cc_binary(
":screen",
"//cyber:init",
"//cyber/service_discovery:topology_manager",
"//third_party:pthread",
],
)

Expand Down
4 changes: 1 addition & 3 deletions cyber/tools/cyber_recorder/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ package(default_visibility = ["//visibility:public"])
cc_binary(
name = "cyber_recorder",
srcs = ["main.cc"],
linkopts = [
"-pthread",
],
deps = [
":info",
":player",
Expand All @@ -17,6 +14,7 @@ cc_binary(
"//cyber:init",
"//cyber/common:file",
"//cyber/common:time_conversion",
"//third_party:pthread",
],
)

Expand Down
2 changes: 1 addition & 1 deletion modules/perception/inference/paddlepaddle/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ cc_library(
"-lsnappy",
"-lz",
"-ldl",
"-lpthread",
],
deps = [
"//cyber/common:log",
"//external:gflags",
"//modules/perception/inference:inference_lib",
"//third_party:pthread",
"//third_party:rt",
"@boost",
"@com_google_protobuf//:protobuf",
Expand Down
2 changes: 1 addition & 1 deletion modules/tools/visualizer/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ cc_binary(
],
linkopts = [
"-lconsole_bridge",
"-lpthread",
"-lGL",
"-lQt5Core",
"-lQt5Widgets",
Expand All @@ -19,6 +18,7 @@ cc_binary(
],
deps = [
":visualizer_lib",
"//third_party:pthread",
"@fastrtps",
],
)
Expand Down
5 changes: 5 additions & 0 deletions third_party/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ cc_library(
name = "rt",
linkopts = ["-lrt"],
)

cc_library(
name = "pthread",
linkopts = ["-pthread"],
)

0 comments on commit d5e2d32

Please sign in to comment.