From b206d95cda95ba524d1efcc42492a7265b34942f Mon Sep 17 00:00:00 2001 From: star9029 Date: Sun, 27 Aug 2023 15:39:54 +0800 Subject: [PATCH] mustache: add package (#2512) --- packages/m/mustache/xmake.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 packages/m/mustache/xmake.lua diff --git a/packages/m/mustache/xmake.lua b/packages/m/mustache/xmake.lua new file mode 100644 index 000000000..3c4ee61ef --- /dev/null +++ b/packages/m/mustache/xmake.lua @@ -0,0 +1,22 @@ +package("mustache") + set_kind("library", {headeronly = true}) + set_homepage("https://github.com/kainjow/Mustache") + set_description("Mustache text templates for modern C++") + set_license("BSL-1.0") + + add_urls("https://github.com/kainjow/Mustache.git") + add_versions("2021.12.10", "04277d5552c6e46bee41a946b7d175a660ea1b3d") + + on_install(function (package) + os.cp("mustache.hpp", package:installdir("include")) + end) + + on_test(function (package) + assert(package:check_cxxsnippets({test = [[ + #include + using namespace kainjow::mustache; + void test() { + mustache tmpl{"Hello {{what}}!"}; + } + ]]}, {configs = {languages = "c++11"}})) + end)