xmake.lua 972 B

123456789101112131415161718192021222324
  1. package("standardlib")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/gregoryc/standardlib")
  4. set_description("an actually usable and maximally efficient C standard library to make C as easy (or easier) than other languages")
  5. add_urls("https://github.com/gregoryc/standardlib.git")
  6. add_versions("2023.12.5", "4fb308a5716927e5622a0488d7aa104660c96841")
  7. on_install("linux", function (package)
  8. os.cp("standardlib.h", package:installdir("include"))
  9. end)
  10. on_test(function (package)
  11. assert(package:check_cxxsnippets({test = [[
  12. #include "standardlib.h"
  13. #include <stdio.h>
  14. void test() {
  15. const char *text = "This is a sample text";
  16. const char *suffix = "text";
  17. printf("Does the string end with \"%s\"? %s\n", suffix, ends_with(text, suffix) ? "Yes" : "No");
  18. }
  19. ]]}))
  20. end)