xmake.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132
  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. on_install("windows", "linux", "macosx", "msys", "mingw", function (package)
  12. os.cp("include", package:installdir())
  13. end)
  14. on_test(function (package)
  15. if package:version() == "2023.1.28" then
  16. assert(package:check_cxxsnippets({test = [[
  17. void test() {
  18. print("Hello, fast_io world!\n");
  19. }
  20. ]]}, {configs = {languages = "c++20"}, includes = {"fast_io.h"}}))
  21. else
  22. assert(package:check_cxxsnippets({test = [[
  23. void test() {
  24. fast_io::io::print("Hello, fast_io world!\n");
  25. }
  26. ]]}, {configs = {languages = "c++20"}, includes = {"fast_io.h"}}))
  27. end
  28. end)