Переглянути джерело

add commata packages (#4569)

* add commata packages

* impoove the script of commata

* add license and change the way of os.cp writing

* add commit url

* Update xmake.lua

---------

Co-authored-by: benny WU <[email protected]>
Co-authored-by: ruki <[email protected]>
benny066567 1 рік тому
батько
коміт
4eff67fba4
1 змінених файлів з 22 додано та 0 видалено
  1. 22 0
      packages/c/commata/xmake.lua

+ 22 - 0
packages/c/commata/xmake.lua

@@ -0,0 +1,22 @@
+package("commata")
+    set_kind("library", {headeronly = true})
+    set_homepage("https://furfurylic.github.io/commata/CommataSpecification.xml")
+    set_description("Just another header-only C++17 CSV parser")
+    set_license("Unlicense")
+
+    add_urls("https://github.com/furfurylic/commata/archive/refs/tags/$(version)-rc.2.zip",
+             "https://github.com/furfurylic/commata.git")
+    add_versions("v1.0.0", "5f9ef542d10d5d04d296e609ae8931e09a157761c86630d71b2f397c6a205a75")
+
+    on_install(function (package)
+        os.cp("include", package:installdir())
+    end)
+
+    on_test(function (package)
+        assert(package:check_cxxsnippets({test = [[
+            using commata::stored_table;
+            void test() {
+                stored_table table;
+            }
+        ]]}, {configs = {languages = "c++17"}, includes = "commata/stored_table.hpp"}))
+    end)