From 0fabb13eeb8c66220e1df46f3944815dfa29046d Mon Sep 17 00:00:00 2001 From: star9029 Date: Sat, 19 Aug 2023 22:05:14 +0800 Subject: [PATCH] variant-lite: add package (#2470) --- packages/v/variant-lite/xmake.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 packages/v/variant-lite/xmake.lua diff --git a/packages/v/variant-lite/xmake.lua b/packages/v/variant-lite/xmake.lua new file mode 100644 index 000000000..db23608ca --- /dev/null +++ b/packages/v/variant-lite/xmake.lua @@ -0,0 +1,21 @@ +package("variant-lite") + set_kind("library", {headeronly = true}) + set_homepage("https://github.com/martinmoene/variant-lite") + set_description("variant lite - A C++17-like variant, a type-safe union for C++98, C++11 and later in a single-file header-only library") + set_license("BSL-1.0") + + add_urls("https://github.com/martinmoene/variant-lite.git") + add_versions("2022.12.03", "5015e841cf143487f2d7e2f619b618d455658fab") + + on_install(function (package) + os.cp("include", package:installdir()) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + #include + void test() { + nonstd::variant var; + } + ]]})) + end)