xmake.lua 890 B

1234567891011121314151617181920212223
  1. package("tinyformat")
  2. set_homepage("https://github.com/c42f/tinyformat/")
  3. set_description("Minimal, type safe printf replacement library for C++")
  4. add_urls("https://github.com/c42f/tinyformat/archive/v$(version).tar.gz")
  5. add_versions("2.3.0", "ecba2fbbd3829002a63e141b77b9f1fc30e920962f68466b50c3244652d69391")
  6. on_install(function (package)
  7. os.mv("tinyformat.h", package:installdir("include"))
  8. end)
  9. on_test(function (package)
  10. assert(package:check_cxxsnippets({test = [[
  11. #include <iostream>
  12. #include <string>
  13. void test() {
  14. tfm::printf("%s", "printf test");
  15. tfm::format(std::cout, "%s", "format test");
  16. std::string res = tfm::format("%s", "string format");
  17. }
  18. ]]}, {configs = {languages = "c++11"}, includes = "tinyformat.h"}))
  19. end)