add universal_stacktrace (#2415)

* add universal_stacktrace

* fix cstring

* fix windows

* remove c++11
pull/2358/head
ruki 1 year ago committed by GitHub
parent 2174c55ba3
commit f48ab4b6ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 26
      packages/u/universal_stacktrace/xmake.lua

@ -0,0 +1,26 @@
package("universal_stacktrace")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/MisterTea/UniversalStacktrace")
set_description("C++ Stacktrace for windows linux and os/x")
set_license("Apache-2.0")
add_urls("https://github.com/MisterTea/UniversalStacktrace.git", {submodules = false})
add_versions("2022.11.06", "28f5230d75e677ce8e4e140b2f3e0b8550195c85")
if is_plat("windows") then
add_syslinks("dbghelp")
end
on_install("linux", "macosx", "windows", function (package)
io.replace("ust/ust.hpp", "#include <vector>", "#include <vector>\n#include <cstring>", {plain = true})
io.replace("ust/ust.hpp", "#include <DbgHelp.h>\n#include <windows.h>", "#include <windows.h>\n#include <DbgHelp.h>", {plain = true})
os.cp("ust", package:installdir("include"))
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
ust::generate();
}
]]}, {includes = {"ust/ust.hpp"}}))
end)
Loading…
Cancel
Save