xmake.lua 808 B

123456789101112131415161718192021
  1. package("plf_rand")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://plflib.org/rand.htm")
  4. set_description("A replacement for rand()/srand() that's ~700% faster with (typically) better statistical distribution. An adaptation of PCG with fallback to xorshift for C++98/03.")
  5. set_license("zlib")
  6. add_urls("https://github.com/mattreecebentley/plf_rand.git")
  7. add_versions("v1.05", "764684817b0208b9f18b4b3d18f4f8d8f33fa1f0")
  8. on_install(function (package)
  9. os.cp("plf_rand.h", package:installdir("include"))
  10. end)
  11. on_test(function (package)
  12. assert(package:check_cxxsnippets({test = [[
  13. #include <plf_rand.h>
  14. void test() {
  15. plf::rand();
  16. }
  17. ]]}, {configs = {languages = "c++11"}}))
  18. end)