yalantinglibs/BUILD.bazel

102 lines
2.2 KiB
Python
Raw Normal View History

2023-04-11 09:57:50 +08:00
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
2024-03-01 17:21:54 +08:00
load("//bazel:defs.bzl", "YA_BIN_COPT", "YA_LT_COPT")
2023-06-27 09:47:03 +08:00
package(default_visibility = ["//visibility:public"])
2023-04-11 09:57:50 +08:00
cc_library(
2023-07-04 14:09:35 +08:00
name = "ylt",
2024-03-01 17:21:54 +08:00
srcs = glob([
"include/ylt/**/*.hpp",
"include/ylt/**/*.h",
"include/ylt/**/*.ipp",
"src/include/*.h",
2023-04-11 09:57:50 +08:00
]),
2024-03-01 17:21:54 +08:00
copts = YA_LT_COPT,
includes = [
"include",
"include/ylt",
"include/ylt/thirdparty",
"include/ylt/standalone",
2024-03-01 17:21:54 +08:00
"src/include",
],
2023-07-04 14:09:35 +08:00
linkopts = ["-lpthread"],
2023-04-11 09:57:50 +08:00
visibility = ["//visibility:public"],
)
2024-03-01 17:21:54 +08:00
# List one example for ylt tests.
cc_test(
name = "easylog_test",
srcs = [
"src/easylog/tests/main.cpp",
"src/easylog/tests/test_easylog.cpp",
],
copts = YA_BIN_COPT,
includes = [
"include",
"include/ylt/thirdparty",
"include/ylt/standalone",
2024-03-01 17:21:54 +08:00
"src/include",
],
deps = [":ylt"],
)
cc_binary(
name = "easylog_benchmark",
srcs = [
"src/easylog/benchmark/main.cpp",
],
copts = YA_BIN_COPT,
includes = [
"include",
"include/ylt/thirdparty",
"include/ylt/standalone",
2024-03-01 17:21:54 +08:00
"src/include",
],
deps = [":ylt"],
)
cc_binary(
name = "coro_http_example",
srcs = ["src/coro_http/examples/example.cpp"],
copts = YA_BIN_COPT,
includes = [
"include",
"include/ylt",
"include/ylt/thirdparty",
"include/ylt/standalone",
2024-03-01 17:21:54 +08:00
"src/include",
],
linkopts = ["-lpthread"],
deps = [":ylt"],
)
cc_binary(
name = "coro_http_load_blancer",
srcs = ["src/coro_http/examples/load_blancer.cpp"],
2024-03-01 17:21:54 +08:00
copts = YA_BIN_COPT,
includes = [
"include",
"include/ylt",
"include/ylt/thirdparty",
"include/ylt/standalone",
2024-03-01 17:21:54 +08:00
"src/include",
],
linkopts = ["-lpthread"],
deps = [":ylt"],
)
cc_binary(
name = "coro_http_chat_room",
srcs = ["src/coro_http/examples/chat_room.cpp"],
copts = YA_BIN_COPT,
includes = [
"include",
"include/ylt",
"include/ylt/thirdparty",
"include/ylt/standalone",
2024-03-01 17:21:54 +08:00
"src/include",
],
linkopts = ["-lpthread"],
deps = [":ylt"],
)