add zmqpb v0.3 (#2743)

* add zmqpb v0.3
- changes interface, so additional test was added
- also removes fmt dependency

* Update xmake.lua

---------

Co-authored-by: ruki <waruqi@gmail.com>
pull/2769/head
SFGrenade 1 year ago committed by GitHub
parent ffc2a1a671
commit bb232edc7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 29
      packages/z/zmqpb/xmake.lua

@ -7,21 +7,36 @@ package("zmqpb")
"https://github.com/SFGrenade/ZmqPb.git")
add_versions("0.1", "4a34ec92faa381306356e84e2a2000093d8f76cfa037db1f4cd0adb0205faebb")
add_versions("0.2", "5dfa4d4cebb10cb7ae03943e18e8d48c8ff215e80371f24c5ade212be7f20721")
add_versions("0.3", "343c57c9f72facca47082422a259ec8c531f5c6e332a3828835080c4a96b9064")
add_deps("cppzmq")
add_deps("fmt")
add_deps("protobuf-cpp")
on_load("windows", "macosx", "linux", function (package)
if not package:gitref() and package:version():lt("0.3") then
package:add("deps", "fmt")
end
end)
on_install("windows", "macosx", "linux", function (package)
local configs = {}
import("package.tools.xmake").install(package, configs)
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
ZmqPb::ReqRep network( "tcp://127.0.0.1", 13337, false );
network.run();
}
]]}, {configs = {languages = "c++14"}, includes = "zmqPb/reqRep.hpp"}))
if package:gitref() or package:version():ge("0.3") then
assert(package:check_cxxsnippets({test = [[
void test() {
ZmqPb::ReqRep network( "tcp://127.0.0.1:13337", false );
network.run();
}
]]}, {configs = {languages = "c++14"}, includes = "zmqPb/reqRep.hpp"}))
else
assert(package:check_cxxsnippets({test = [[
void test() {
ZmqPb::ReqRep network( "tcp://127.0.0.1", 13337, false );
network.run();
}
]]}, {configs = {languages = "c++14"}, includes = "zmqPb/reqRep.hpp"}))
end
end)

Loading…
Cancel
Save