Skip to content

Commit

Permalink
add sparse-map package (#3596)
Browse files Browse the repository at this point in the history
* add sparse-map package

* disable windows arm
  • Loading branch information
c8ef authored Mar 24, 2024
1 parent e24df35 commit 20c2906
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions packages/s/sparse-map/xmake.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package("sparse-map")

set_kind("library", {headeronly = true})
set_homepage("https://github.com/Tessil/sparse-map")
set_description("C++ implementation of a memory efficient hash map and hash set")
set_license("MIT")

add_urls("https://github.com/Tessil/sparse-map/archive/refs/tags/$(version).tar.gz",
"https://github.com/Tessil/sparse-map.git")

add_versions("v0.6.2", "7020c21e8752e59d72e37456cd80000e18671c803890a3e55ae36b295eba99f6")

on_install("windows|x86", "windows|x64", "linux", "macosx", "bsd", "mingw", "msys", "android", "iphoneos", "cross", function (package)
os.cp("include/*", package:installdir("include"))
end)

on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include "tsl/sparse_map.h"
void test() {
tsl::sparse_map<int, int> map = {{1, 1}, {2, 1}, {3, 1}};
for(auto it = map.begin(); it != map.end(); ++it) {
it.value() = 2;
}
}
]]}, {configs = {languages = "cxx11"}}))
end)

0 comments on commit 20c2906

Please sign in to comment.