소스 검색

Merge pull request #110 from tiltedphoques/hopscotch

Add hopscotch-map
ruki 4 년 전
부모
커밋
dad54961e6
1개의 변경된 파일28개의 추가작업 그리고 0개의 파일을 삭제
  1. 28 0
      packages/h/hopscotch-map/xmake.lua

+ 28 - 0
packages/h/hopscotch-map/xmake.lua

@@ -0,0 +1,28 @@
+package("hopscotch-map")
+
+    set_homepage("https://github.com/Tessil/hopscotch-map")
+    set_description("A C++ implementation of a fast hash map and hash set using hopscotch hashing")
+
+    set_urls("https://github.com/Tessil/hopscotch-map/archive/$(version).zip",
+             "https://github.com/Tessil/hopscotch-map.git")
+
+    add_versions("v2.3.0", "56ce4ff67215656065ee1a08948533baf9447c4440196ea5133c024856006938")
+
+    on_install(function (package)
+        os.cp("include/tsl", package:installdir("include"))
+    end)
+
+    on_test(function (package)
+        assert(package:check_cxxsnippets({test = [[
+            void test()
+            {
+                tsl::hopscotch_map<int, int> map;
+                map[1] = 3;
+                map[2] = 4;
+
+                tsl::hopscotch_set<int> set;
+                set.insert({1, 9, 0});
+                set.insert({2, -1, 9});
+            }
+        ]]}, {configs = {languages = "c++11"}, includes = { "tsl/hopscotch_map.h", "tsl/hopscotch_set.h"} }))
+    end)