Skip to content

Commit

Permalink
Improve for Bazel deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kenneth-jia committed Apr 11, 2022
1 parent 3c6197c commit 08603f5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion BUILD → BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cc_library(

includes = ["include"],

linkopts = ["-lpthread", "-lrdkafka"],
linkopts = ["-lpthread"],

visibility = ["//visibility:public"],
)
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions examples/BUILD → examples/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ cc_binary(

srcs = ["kafka_sync_producer.cc"],

linkopts = ["-lrdkafka"],

deps = ["//:modern-cpp-kafka-api"],
)

Expand All @@ -11,6 +13,8 @@ cc_binary(

srcs = ["kafka_async_producer_copy_payload.cc"],

linkopts = ["-lrdkafka"],

deps = ["//:modern-cpp-kafka-api"],
)

Expand All @@ -19,6 +23,8 @@ cc_binary(

srcs = ["kafka_async_producer_not_copy_payload.cc"],

linkopts = ["-lrdkafka"],

deps = ["//:modern-cpp-kafka-api"],
)

Expand All @@ -27,6 +33,8 @@ cc_binary(

srcs = ["kafka_auto_commit_consumer.cc"],

linkopts = ["-lrdkafka"],

deps = ["//:modern-cpp-kafka-api"],
)

Expand All @@ -35,6 +43,8 @@ cc_binary(

srcs = ["kafka_manual_commit_consumer.cc"],

linkopts = ["-lrdkafka"],

deps = ["//:modern-cpp-kafka-api"],
)

6 changes: 6 additions & 0 deletions tests/BUILD → tests/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ cc_test(
"@gtest//:gtest_main",
"@rapidjson//:rapidjson"],

linkopts = ["-lrdkafka"],

timeout = "short",

tags = ["unit"],
Expand All @@ -23,6 +25,8 @@ cc_test(
"@gtest//:gtest",
"@gtest//:gtest_main"],

linkopts = ["-lrdkafka"],

timeout = "long",
shard_count = 8,

Expand All @@ -38,6 +42,8 @@ cc_test(
"@gtest//:gtest",
"@gtest//:gtest_main"],

linkopts = ["-lrdkafka"],

timeout = "long",
shard_count = 1,

Expand Down
6 changes: 3 additions & 3 deletions tools/BUILD → tools/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cc_binary(

srcs = ["KafkaTopics.cc"],

linkopts = ["-lboost_program_options"],
linkopts = ["-lboost_program_options", "-lrdkafka"],

deps = ["//:modern-cpp-kafka-api"],
)
Expand All @@ -13,7 +13,7 @@ cc_binary(

srcs = ["KafkaConsoleConsumer.cc"],

linkopts = ["-lboost_program_options"],
linkopts = ["-lboost_program_options", "-lrdkafka"],

deps = ["//:modern-cpp-kafka-api"],
)
Expand All @@ -23,7 +23,7 @@ cc_binary(

srcs = ["KafkaConsoleProducer.cc"],

linkopts = ["-lboost_program_options"],
linkopts = ["-lboost_program_options", "-lrdkafka"],

deps = ["//:modern-cpp-kafka-api"],
)
Expand Down

0 comments on commit 08603f5

Please sign in to comment.