Skip to content

Commit

Permalink
Update unordered dense to v4.4.0 (+ add module support) (#3141)
Browse files Browse the repository at this point in the history
* update unordered_dense to v4.4.0

* add module support for unordered_dense

* change module support config name
  • Loading branch information
Arthapz authored Jan 22, 2024
1 parent 72c7d23 commit ca551c2
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions packages/u/unordered_dense/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,33 @@ package("unordered_dense")
add_versions("v2.0.2", "d4be48c164fa2f49deb55354b33c335688da3bd4b2299b3a46b8092602f67556")
add_versions("v3.0.0", "e73452d7c1e274b4a15b553c0904f1de4bcfa61b00514acd1eaad7deac805ef0")
add_versions("v4.0.4", "b34a8c942963e3a647f1bbc192a6391cd56d7ae615b2ddc1601c1779b5792206")
add_versions("v4.4.0", "3976399793e8cb4db1409ce15610fbd9e5e406ced4745f262d393a9311efbd88")

add_configs("modules", {description = "Build with C++20 modules support.", default = false, type = "boolean"})

on_load(function (package)
if not package:config("modules") then
package:add("deps", "cmake")
end
end)

add_deps("cmake")
on_install(function (package)
import("package.tools.cmake").install(package)
os.cp("include", package:installdir())
if not package:config("modules") then
import("package.tools.cmake").install(package)
os.cp("include", package:installdir())
else
os.cp("src/ankerl.unordered_dense.cpp", "src/ankerl.unordered_dense.cppm")
io.writefile("xmake.lua", [[
target("unordered_dense")
set_kind("static")
set_languages("c++20")
add_headerfiles("include/(**.h)")
add_includedirs("include")
add_files("src/**.cppm", {public = true})
]])
local configs = {}
import("package.tools.xmake").install(package, configs)
end
end)

on_test(function (package)
Expand Down

0 comments on commit ca551c2

Please sign in to comment.