add universal_stacktrace (#2415)
* add universal_stacktrace * fix cstring * fix windows * remove c++11pull/2358/head
parent
2174c55ba3
commit
f48ab4b6ac
1 changed files with 26 additions and 0 deletions
@ -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…
Reference in new issue