xmake.lua 1.2 KB

123456789101112131415161718192021222324252627
  1. package("taywee_args")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://taywee.github.io/args/")
  4. set_description("A simple header-only C++ argument parser library.")
  5. set_license("MIT")
  6. add_urls("https://github.com/Taywee/args/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/Taywee/args.git")
  8. add_versions("6.4.7", "ae53d120609ecf44ff079b6992b4b54d6c25e9d647d06f46d9f68fe1476c0454")
  9. add_versions("6.3.0", "e072c4a9d6990872b0ecb45480a5487db82e0dc3d27c3c3eb9fc0930c0d796ae")
  10. add_versions("6.4.6", "41ed136bf9b216bf5f18b1de2a8d22a870381657e8427d6621918520b6e2239c")
  11. on_install(function (package)
  12. os.cp("args.hxx", package:installdir("include"))
  13. end)
  14. on_test(function (package)
  15. assert(package:check_cxxsnippets({test = [[
  16. void test(int argc, char** argv) {
  17. args::ArgumentParser parser("This is a test program.", "This goes after the options.");
  18. args::HelpFlag help(parser, "help", "Display this help menu", {'h', "help"});
  19. args::CompletionFlag completion(parser, {"complete"});
  20. parser.ParseCLI(argc, argv);
  21. }
  22. ]]}, {configs = {languages = "c++11"}, includes = "args.hxx"}))
  23. end)