package An official xmake package repository https://xrepo.xmake.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
1.1 KiB

package("effolkronium-random")
set_kind("library", {headeronly = true})
set_homepage("https://github.com/effolkronium/random")
set_description("Random for modern C++ with convenient API")
set_license("MIT")
add_urls("https://github.com/effolkronium/random/archive/refs/tags/$(version).tar.gz",
"https://github.com/effolkronium/random.git")
add_versions("v1.5.0", "c05a042f8daf54913e3a836e10a213bbbeaf09a89630649bd0011fe65eff50d9")
add_versions("v1.4.1", "ec6beb67496ad2ce722d311d3fa5efb7e847dac5fd1c16b8920b51562fe20f53")
on_install(function (package)
os.cp("include/effolkronium", package:installdir("include"))
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test(int argc, char** argv) {
auto num = effolkronium::random_static::get(-1, 1);
bool overflow = (num < -1) || (num > 1);
assert(!overflow);
}
]]}, {configs = {languages = "c++17"}, includes = {"effolkronium/random.hpp", "assert.h"}}))
end)