|
@@ -1,16 +1,23 @@
|
|
package("simdjson")
|
|
package("simdjson")
|
|
|
|
|
|
set_homepage("https://simdjson.org")
|
|
set_homepage("https://simdjson.org")
|
|
- set_license("Apache 2.0")
|
|
|
|
set_description("Ridiculously fast JSON parsing, UTF-8 validation and JSON minifying for popular 64 bit systems.")
|
|
set_description("Ridiculously fast JSON parsing, UTF-8 validation and JSON minifying for popular 64 bit systems.")
|
|
|
|
+ set_license("Apache-2.0")
|
|
|
|
|
|
- set_urls("https://github.com/simdjson/simdjson.git")
|
|
|
|
- add_versions("0.8.2", "61c8cfa07deb7625bb0e6b80dbceb42edd4bf387")
|
|
|
|
|
|
+ add_urls("https://github.com/simdjson/simdjson/archive/refs/tags/$(version).tar.gz",
|
|
|
|
+ "https://github.com/simdjson/simdjson.git")
|
|
|
|
+ add_versions("v0.9.5", "db69582fc5e4ece8c0a6a64894efeef475fe22fe466bd67195422de11b08b4d2")
|
|
|
|
|
|
add_configs("threads", { description = "Enable threads.", default = true, type = "boolean"})
|
|
add_configs("threads", { description = "Enable threads.", default = true, type = "boolean"})
|
|
add_configs("noexceptions", { description = "Disable exceptions.", default = false, type = "boolean"})
|
|
add_configs("noexceptions", { description = "Disable exceptions.", default = false, type = "boolean"})
|
|
add_configs("logging", { description = "Enable logging.", default = false, type = "boolean"})
|
|
add_configs("logging", { description = "Enable logging.", default = false, type = "boolean"})
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ on_load("windows|x64", function (package)
|
|
|
|
+ if package:config("shared") then
|
|
|
|
+ package:add("defines", "SIMDJSON_USING_WINDOWS_DYNAMIC_LIBRARY")
|
|
|
|
+ end
|
|
|
|
+ end)
|
|
|
|
+
|
|
on_install("windows|x64", "mingw|x86_64", "macosx|x86_64", "linux|x86_64", "linux|arm64", "iphoneos|arm64", function(package)
|
|
on_install("windows|x64", "mingw|x86_64", "macosx|x86_64", "linux|x86_64", "linux|arm64", "iphoneos|arm64", function(package)
|
|
local configs = {}
|
|
local configs = {}
|
|
if package:config("shared") then
|
|
if package:config("shared") then
|
|
@@ -26,8 +33,9 @@ package("simdjson")
|
|
|
|
|
|
on_test(function(package)
|
|
on_test(function(package)
|
|
assert(package:check_cxxsnippets({ test = [[
|
|
assert(package:check_cxxsnippets({ test = [[
|
|
|
|
+ void test() {
|
|
simdjson::dom::parser parser;
|
|
simdjson::dom::parser parser;
|
|
|
|
+ }
|
|
]]}, { configs = { languages = "c++17" }, includes = "simdjson.h" })
|
|
]]}, { configs = { languages = "c++17" }, includes = "simdjson.h" })
|
|
, "Could not compile a test C++ snippet.")
|
|
, "Could not compile a test C++ snippet.")
|
|
end)
|
|
end)
|
|
-
|
|
|