Add fastcppcsvparser (#377)

* Add fastcppcsvparser

* Replace noexcept with _NOEXCEPT on Apple platforms

* Remove line in fastcppcsvparser

* Use void test() in fastcppcsvparser

* Use current date as version in fastcppcsvparser

* Use commit date as version

* Fix wrong configs syntax in on_test
pull/380/head
PucklaMotzer09 4 years ago committed by GitHub
parent 2adb989537
commit 38f26a3041
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      packages/f/fastcppcsvparser/xmake.lua

@ -0,0 +1,25 @@
package("fastcppcsvparser")
set_homepage("https://github.com/ben-strasser/fast-cpp-csv-parser")
set_description("This is a small, easy-to-use and fast header-only library for reading comma separated value (CSV) files (by ben-strasser)")
add_urls("https://github.com/ben-strasser/fast-cpp-csv-parser.git")
add_versions("2021.01.03", "75600d0b77448e6c410893830df0aec1dbacf8e3")
on_install(function (package)
if package:is_plat("macosx", "iphoneos") then
io.replace("csv.h", "noexcept", "_NOEXCEPT")
end
os.cp("csv.h", package:installdir("include"))
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
void test() {
io::CSVReader<3> in("example.csv");
in.read_header(io::ignore_extra_column, "vendor", "size", "speed");
std::string vendor; int size; double speed;
while(in.read_row(vendor, size, speed));
}
]]}, {includes = "csv.h", configs = {languages = "cxx11"}}))
end)
Loading…
Cancel
Save