代码拉取完成,页面将自动刷新
set_group("tutorial")
set_default(false)
if not is_plat("macosx") then
add_ldflags("-lrt")
end
function all_examples()
local res = {}
for _, x in ipairs(os.files("*.cc")) do
local item = {}
local s = path.filename(x)
if ((s == "upstream_unittest.cc" and not has_config("upstream")) or
((s == "tutorial-02-redis_cli.cc" or s == "tutorial-03-wget_to_redis.cc" or s == "tutorial-18-redis_subscriber.cc") and not has_config("redis")) or
(s == "tutorial-12-mysql_cli.cc" and not has_config("mysql")) or
(s == "tutorial-14-consul_cli.cc" and not has_config("consul")) or
(s == "tutorial-13-kafka_cli.cc")) then
else
table.insert(item, s:sub(1, #s - 3)) -- target
table.insert(item, path.relative(x, ".")) -- source
table.insert(res, item)
end
end
return res
end
for _, example in ipairs(all_examples()) do
target(example[1])
set_kind("binary")
add_files(example[2])
add_deps("workflow")
end
target("tutorial-13-kafka_cli")
if has_config("kafka") then
set_kind("binary")
add_files("tutorial-13-kafka_cli.cc")
add_packages("zlib", "snappy", "zstd", "lz4")
add_deps("wfkafka")
else
set_kind("phony")
end
includes("tutorial-10-user_defined_protocol", "tutorial-16-graceful_restart")
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。