From 36126d787e2a5e951d94eb007775e5c1d853c3b5 Mon Sep 17 00:00:00 2001 From: jj683 <87266000+jj683@users.noreply.github.com> Date: Thu, 16 Sep 2021 16:34:58 +0300 Subject: [PATCH] add backward-cpp (#642) * add backward-cpp * Fixes * Fixes --- packages/b/backward-cpp/xmake.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 packages/b/backward-cpp/xmake.lua diff --git a/packages/b/backward-cpp/xmake.lua b/packages/b/backward-cpp/xmake.lua new file mode 100644 index 000000000..b8cf662c7 --- /dev/null +++ b/packages/b/backward-cpp/xmake.lua @@ -0,0 +1,22 @@ +package("backward-cpp") + + set_homepage("https://github.com/bombela/backward-cpp") + set_description("Backward is a beautiful stack trace pretty printer for C++.") + set_license("MIT") + + 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") + + add_deps("cmake") + + on_install("linux", "macosx", "windows", function (package) + local configs = {"-DBACKWARD_TESTS=OFF"} + table.insert(configs, "-DBACKWARD_SHARED=" .. (package:config("shared") and "ON" or "OFF")) + import("package.tools.cmake").install(package, configs) + os.mv(package:installdir("include/*.hpp"), package:installdir("include/backward")) + end) + + on_test(function (package) + assert(package:has_cxxtypes("backward::SignalHandling", {configs = {languages = "c++11"}, includes = "backward/backward.hpp"})) + end)