ricab-scope_guard: add package (#2698)

pull/2699/head
star9029 1 year ago committed by GitHub
parent 5b11e2f58b
commit 27fa2ef7f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/n/neargye-scope_guard/xmake.lua
  2. 24
      packages/r/ricab-scope_guard/xmake.lua

@ -1,4 +1,4 @@
package("scope_guard")
package("neargye-scope_guard")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/Neargye/scope_guard")
set_description("Scope Guard & Defer C++")

@ -0,0 +1,24 @@
package("ricab-scope_guard")
set_kind("library", {headeronly = true})
set_homepage("https://ricab.github.io/scope_guard/")
set_description("A modern C++ scope guard that is easy to use but hard to misuse.")
set_license("Unlicense")
add_urls("https://github.com/ricab/scope_guard/archive/refs/tags/$(version).tar.gz",
"https://github.com/ricab/scope_guard.git")
add_versions("v1.1.0", "ddaf22ccd07e59af4698e2b9f912171adb664dc88f34b317f39dde3b88de4507")
on_install(function (package)
os.cp("scope_guard.hpp", package:installdir("include"))
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <scope_guard.hpp>
void my_callback() {}
void test() {
auto guard = sg::make_scope_guard(my_callback);
}
]]}, {configs = {languages = "c++11"}}))
end)
Loading…
Cancel
Save