improve grpc tests (#2043)

* improve grpc tests

* add corefoundation for abseil
pull/2049/head
ruki 2 years ago committed by GitHub
parent f72c7ded6d
commit 39865e8ad5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      packages/a/abseil/xmake.lua
  2. 4
      packages/g/grpc/xmake.lua

@ -37,6 +37,10 @@ package("abseil")
"absl_strerror", "absl_examine_stack", "absl_low_level_hash", "absl_random_seed_gen_exception", "absl_civil_time",
"absl_crc_cord_state", "absl_crc32c", "absl_crc_cpu_detect", "absl_crc_internal")
if is_plat("macosx") then
add_frameworks("CoreFoundation")
end
on_load(function (package)
if package:is_plat("windows") and package:config("shared") then
package:add("defines", "ABSL_CONSUME_DLL")

@ -52,8 +52,12 @@ package("grpc")
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <iostream>
void test() {
grpc::CompletionQueue q;
std::string server_address("192.168.28.109:9010");
auto channel = grpc::CreateChannel(server_address, grpc::InsecureChannelCredentials());
std::cout << &channel << std::endl;
}
]]}, {configs = {languages = "c++17"}, includes = "grpcpp/grpcpp.h"}))
end)

Loading…
Cancel
Save