xmake.lua 1.1 KB

12345678910111213141516171819202122232425
  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.3.0", "e072c4a9d6990872b0ecb45480a5487db82e0dc3d27c3c3eb9fc0930c0d796ae")
  9. on_install(function (package)
  10. os.cp("args.hxx", package:installdir("include"))
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. void test(int argc, char** argv) {
  15. args::ArgumentParser parser("This is a test program.", "This goes after the options.");
  16. args::HelpFlag help(parser, "help", "Display this help menu", {'h', "help"});
  17. args::CompletionFlag completion(parser, {"complete"});
  18. parser.ParseCLI(argc, argv);
  19. }
  20. ]]}, {configs = {languages = "c++11"}, includes = "args.hxx"}))
  21. end)