|
|
|
@ -4,6 +4,8 @@ package("backward-cpp") |
|
|
|
|
set_description("Backward is a beautiful stack trace pretty printer for C++.") |
|
|
|
|
set_license("MIT") |
|
|
|
|
|
|
|
|
|
add_configs("bfd", {description = "Get stack trace with details about your sources by using libbfd from binutils.", default = false, type = "boolean"}) |
|
|
|
|
|
|
|
|
|
add_urls("https://github.com/bombela/backward-cpp/archive/refs/tags/$(version).zip", |
|
|
|
|
"https://github.com/bombela/backward-cpp.git") |
|
|
|
|
add_versions("v1.6", "9b07e12656ab9af8779a84e06865233b9e30fadbb063bf94dd81d318081db8c2") |
|
|
|
@ -18,7 +20,17 @@ package("backward-cpp") |
|
|
|
|
|
|
|
|
|
add_deps("cmake") |
|
|
|
|
|
|
|
|
|
on_install("linux", "mingw", "macosx", "windows", function (package) |
|
|
|
|
on_load("linux", "mingw@msys", "macos", function (package) |
|
|
|
|
if package:config("bfd") then |
|
|
|
|
package:add("deps", "binutils") |
|
|
|
|
end |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
on_install("linux", "mingw", "macosx", "windows|!arm*", function (package) |
|
|
|
|
if package:config("bfd") and package:is_plat("linux", "mingw@msys", "macos") then |
|
|
|
|
package:add("syslinks", "bfd") |
|
|
|
|
package:add("defines", "BACKWARD_HAS_BFD=1") |
|
|
|
|
end |
|
|
|
|
local configs = {"-DBACKWARD_TESTS=OFF"} |
|
|
|
|
table.insert(configs, "-DBACKWARD_SHARED=" .. (package:config("shared") and "ON" or "OFF")) |
|
|
|
|
import("package.tools.cmake").install(package, configs) |
|
|
|
@ -28,3 +40,4 @@ package("backward-cpp") |
|
|
|
|
on_test(function (package) |
|
|
|
|
assert(package:has_cxxtypes("backward::SignalHandling", {configs = {languages = "c++11"}, includes = "backward/backward.hpp"})) |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|