update abseil (#427)

* update abseil

* fix abseil
pull/429/head
Hoildkv 4 years ago committed by GitHub
parent 4735fc8849
commit dac60341b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      packages/a/abseil/xmake.lua

@ -6,11 +6,15 @@ package("abseil")
add_urls("https://github.com/abseil/abseil-cpp/archive/$(version).tar.gz", add_urls("https://github.com/abseil/abseil-cpp/archive/$(version).tar.gz",
"https://github.com/abseil/abseil-cpp.git") "https://github.com/abseil/abseil-cpp.git")
add_versions("20200225.1", "0db0d26f43ba6806a8a3338da3e646bb581f0ca5359b3a201d8fb8e4752fd5f8") add_versions("20200225.1", "0db0d26f43ba6806a8a3338da3e646bb581f0ca5359b3a201d8fb8e4752fd5f8")
add_versions("20210324.1", "441db7c09a0565376ecacf0085b2d4c2bbedde6115d7773551bc116212c2a8d6")
add_deps("cmake") add_deps("cmake")
on_install("macosx", "linux", "windows", function (package) on_install("macosx", "linux", "windows", function (package)
import("package.tools.cmake").install(package) local configs = {"-DCMAKE_CXX_STANDARD=17"}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
import("package.tools.cmake").install(package, configs)
end) end)
on_test(function (package) on_test(function (package)
@ -18,11 +22,10 @@ package("abseil")
#include <iostream> #include <iostream>
#include <string> #include <string>
#include <vector> #include <vector>
#include "absl/strings/str_join.h"
void test () { void test () {
std::vector<std::string> v = {"foo","bar","baz"}; std::vector<std::string> v = {"foo","bar","baz"};
std::string s = absl::StrJoin(v, "-"); std::string s = absl::StrJoin(v, "-");
std::cout << "Joined string: " << s << "\\n"; std::cout << "Joined string: " << s << "\\n";
} }
]]}, {configs = {languages = "c++11"}})) ]]}, {configs = {languages = "c++17"}, includes = "absl/strings/str_join.h"}))
end) end)

Loading…
Cancel
Save