소스 검색

Add unordered_dense and deprecate robin-hood-hasing (#1413)

* Add unordered_dense and deprecate robin-hood-hasing

* Update xmake.lua

* Update xmake.lua

Co-authored-by: ruki <[email protected]>
Arthapz 3 년 전
부모
커밋
7d5768b0e6
2개의 변경된 파일28개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      packages/r/robin-hood-hashing/xmake.lua
  2. 24 0
      packages/u/unordered_dense/xmake.lua

+ 4 - 0
packages/r/robin-hood-hashing/xmake.lua

@@ -10,6 +10,10 @@ package("robin-hood-hashing")
     add_versions("3.11.3", "dcf2b7fa9ef9dd0c67102d94c28e8df3effbe1845e0ed1f31f4772ca5e857fc4")
     add_versions("3.11.5", "7aa183252527ded7f46186c1e2f4efe7d6139a3b7c0869c1b6051bd7260587ed")
 
+    on_load(function (package)
+        wprint("Package deprecated, author reason:\nUnfortunately I do not have time to continue development for this hashmap. I have a worthy successor though, please head over to: ankerl::unordered_dense::{map, set}${clear}")
+    end)
+
     add_deps("cmake")
     on_install(function (package)
         import("package.tools.cmake").install(package, {"-DRH_STANDALONE_PROJECT=OFF"})

+ 24 - 0
packages/u/unordered_dense/xmake.lua

@@ -0,0 +1,24 @@
+package("unordered_dense")
+    set_kind("library", {headeronly = true})
+    set_homepage("https://github.com/martinus/unordered_dense")
+    set_description("A fast & densely stored hashmap and hashset based on robin-hood backward shift deletion.")
+    set_license("MIT")
+
+    add_urls("https://github.com/martinus/unordered_dense/archive/refs/tags/$(version).tar.gz",
+             "https://github.com/martinus/unordered_dense.git")
+    add_versions("v1.1.0", "b47d8590afdc32b306272a6bcb15d5464462f3cd3d44653648924a1e10d1e78c")
+
+    add_deps("cmake")
+    on_install(function (package)
+        import("package.tools.cmake").install(package)
+        os.cp("include", package:installdir())
+    end)
+
+    on_test(function (package)
+        assert(package:check_cxxsnippets({test = [[
+            void test() {
+                ankerl::unordered_dense::map<int, int> map;
+                map[123] = 333;
+            }
+        ]]}, {configs = {languages = "c++17"}, includes = "ankerl/unordered_dense.h"}))
+    end)