xmake.lua 863 B

12345678910111213141516171819202122232425
  1. package("cppfront")
  2. set_kind("binary")
  3. set_homepage("https://github.com/hsutter/cppfront")
  4. set_description("A personal experimental C++ Syntax 2 -> Syntax 1 compiler")
  5. add_urls("https://github.com/hsutter/cppfront.git")
  6. add_versions("2022.09.23", "fa65d346996ec472e16c61838fbc7a47736d7872")
  7. on_install("windows", "linux", function (package)
  8. local configs = {}
  9. io.writefile("xmake.lua", [[
  10. add_rules("mode.release", "mode.debug")
  11. target("cppfront")
  12. set_kind("binary")
  13. add_files("source/*.cpp")
  14. add_includedirs("include")
  15. set_languages("c++20")
  16. ]])
  17. import("package.tools.xmake").install(package, configs)
  18. end)
  19. on_test(function (package)
  20. os.touch("test.cpp2")
  21. os.vrun("cppfront test.cpp2")
  22. end)