xmake.lua 909 B

123456789101112131415161718192021222324
  1. package("fatal")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/facebook/fatal")
  4. set_description("Fatal is a library for fast prototyping software in modern C++.")
  5. set_license("BSD")
  6. add_urls("https://github.com/facebook/fatal/releases/download/v$(version).00/fatal-v$(version).00.zip",
  7. "https://github.com/facebook/fatal.git")
  8. add_versions("2024.06.24", "9b134c46eec2a1fc38cfbfef13de11f7b252ded6d789d2460956d43b89719a8b")
  9. on_install(function (package)
  10. os.cp("fatal", package:installdir("include"))
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. #include "fatal/type/array.h"
  15. void test() {
  16. using arr_t = fatal::c_array<int, 3>;
  17. arr_t arr{{'b', 'a', 'r'}};
  18. }
  19. ]]}, {configs = {languages = "c++17"}}))
  20. end)