From 303147a04ff76db861d84395d27194f11cb4c391 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 22 Aug 2022 07:47:42 +0800 Subject: [PATCH] add frozenca-btree (#1430) * add btree * Update and rename packages/b/btree/xmake.lua to packages/f/frozenca-btree/xmake.lua * Update xmake.lua * Update xmake.lua --- packages/f/frozenca-btree/xmake.lua | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 packages/f/frozenca-btree/xmake.lua diff --git a/packages/f/frozenca-btree/xmake.lua b/packages/f/frozenca-btree/xmake.lua new file mode 100644 index 000000000..61b955d75 --- /dev/null +++ b/packages/f/frozenca-btree/xmake.lua @@ -0,0 +1,30 @@ +package("frozenca-btree") + set_kind("library", {headeronly = true}) + set_homepage("https://github.com/frozenca/BTree") + set_description("A general-purpose high-performance lightweight STL-like modern C++ B-Tree") + set_license("Apache-2.0") + + add_urls("https://github.com/frozenca/BTree.git") + add_versions("2022.08.02", "c2318e18194018f092c3e30ddd7385a50216b3a0") + + on_install("linux", "windows", function (package) + os.cp("*.h", package:installdir("include")) + end) + + on_test(function(package) + assert(package:check_cxxsnippets({ + test = [[ + #include "fc_btree.h" + #include + #include + + static void test() { + namespace fc = frozenca; + fc::BTreeSet btree; + + btree.insert(3); + btree.insert(4); + } + ]] + }, {configs = {languages = "c++20", cxflags = "-fconcepts"}})) + end)