boost_reflect: add package (#3325)

* boost_reflect: add package

* Update xmake.lua

* test gcc 13 build status, will revert later

* revert b1ef334

---------

Co-authored-by: c8ef <c8ef@outlook.com>
pull/3675/head
star9029 10 months ago committed by GitHub
parent be42a3a3cc
commit 6fdd0e1eb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 25
      packages/b/boost_reflect/xmake.lua

@ -0,0 +1,25 @@
package("boost_reflect")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/boost-ext/reflect")
set_description("C++20 static reflection library")
add_urls("https://github.com/boost-ext/reflect/archive/refs/tags/$(version).tar.gz",
"https://github.com/boost-ext/reflect.git")
add_versions("v1.1.1", "49b20cbc0e5d9f94bcdc96056f8c5d91ee2e45d8642e02cb37e511079671ad48")
on_install("linux", function (package)
os.cp("reflect", package:installdir("include"))
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include <reflect>
enum E { A, B };
struct foo { int a; E b; };
void test() {
constexpr auto f = foo{.a = 42, .b = B};
static_assert(2 == reflect::size(f));
}
]]}, {configs = {languages = "c++20"}}))
end)
Loading…
Cancel
Save