xmake.lua 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package("fast_io")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/cppfastio/fast_io")
  4. set_description("Significantly faster input/output for C++20")
  5. set_license("MIT")
  6. add_urls("https://github.com/cppfastio/fast_io.git")
  7. add_urls("https://bitbucket.org/ejsvifq_mabmip/fast_io.git")
  8. add_urls("https://gitee.com/qabeowjbtkwb/fast_io.git")
  9. add_versions("2023.1.28", "b99b32ab429eb6256fd8de1e17fe38e4c54eb49c")
  10. add_versions("2024.3.31", "a13c3ed1cd6da64b381322f3466f3b4fc9a80ff2")
  11. add_versions("2025.06.13", "8ba32f95ad3904d4b86704225e5d8527fc2202b2")
  12. on_load("mingw", function (package)
  13. package:add("defines", "_UCRT=0")
  14. end)
  15. on_install("windows", "linux", "macosx", "msys", "mingw", function (package)
  16. os.cp("include", package:installdir())
  17. end)
  18. on_test(function (package)
  19. if package:version() == "2023.1.28" then
  20. assert(package:check_cxxsnippets({test = [[
  21. void test() {
  22. print("Hello, fast_io world!\n");
  23. }
  24. ]]}, {configs = {languages = "c++20"}, includes = {"fast_io.h"}}))
  25. else
  26. assert(package:check_cxxsnippets({test = [[
  27. void test() {
  28. fast_io::io::print("Hello, fast_io world!\n");
  29. }
  30. ]]}, {configs = {languages = "c++20"}, includes = {"fast_io.h"}}))
  31. end
  32. end)