|
@@ -7,6 +7,7 @@ package("glaze")
|
|
add_urls("https://github.com/stephenberry/glaze/archive/refs/tags/$(version).tar.gz",
|
|
add_urls("https://github.com/stephenberry/glaze/archive/refs/tags/$(version).tar.gz",
|
|
"https://github.com/stephenberry/glaze.git")
|
|
"https://github.com/stephenberry/glaze.git")
|
|
|
|
|
|
|
|
+ add_versions("v3.3.2", "e492d3f662c3c096ce7abac86780af6c84f74c4f19b29223ad92fccc054aafad")
|
|
add_versions("v3.1.7", "388483bb3dfa1fe25c1dfec24f0afd1651e0303833cfa1b7f51020a2569e992a")
|
|
add_versions("v3.1.7", "388483bb3dfa1fe25c1dfec24f0afd1651e0303833cfa1b7f51020a2569e992a")
|
|
add_versions("v2.9.5", "67fda0fb0cc701451c261bb1e0c94d63bafaaba13390527521e02a034eff085e")
|
|
add_versions("v2.9.5", "67fda0fb0cc701451c261bb1e0c94d63bafaaba13390527521e02a034eff085e")
|
|
add_versions("v2.7.0", "8e3ee2ba725137cd4f61bc9ceb74e2225dc22b970da1c5a43d2a6833115adbfc")
|
|
add_versions("v2.7.0", "8e3ee2ba725137cd4f61bc9ceb74e2225dc22b970da1c5a43d2a6833115adbfc")
|
|
@@ -21,15 +22,16 @@ package("glaze")
|
|
add_deps("cmake")
|
|
add_deps("cmake")
|
|
|
|
|
|
if on_check then
|
|
if on_check then
|
|
- on_check("windows", function (package)
|
|
|
|
- if package:is_plat("windows") then
|
|
|
|
- local vs = package:toolchain("msvc"):config("vs")
|
|
|
|
- assert(vs and tonumber(vs) >= 2022, "package(glaze): need vs >= 2022")
|
|
|
|
- end
|
|
|
|
|
|
+ on_check(function (package)
|
|
|
|
+ assert(package:check_cxxsnippets({test = [[
|
|
|
|
+ constexpr void f() {
|
|
|
|
+ static constexpr int g = 1;
|
|
|
|
+ }
|
|
|
|
+ ]]}, {configs = {languages = "c++2b"}}), "package(glaze) Require at least C++23.")
|
|
end)
|
|
end)
|
|
end
|
|
end
|
|
|
|
|
|
- on_install("windows", "linux", "bsd", "mingw", "wasm", function (package)
|
|
|
|
|
|
+ on_install("windows", "linux", "macosx", "bsd", "mingw", "wasm", function (package)
|
|
local version = package:version()
|
|
local version = package:version()
|
|
if version and version:ge("2.9.5") then
|
|
if version and version:ge("2.9.5") then
|
|
if package:has_tool("cxx", "cl", "clang_cl") then
|
|
if package:has_tool("cxx", "cl", "clang_cl") then
|
|
@@ -38,6 +40,7 @@ package("glaze")
|
|
|
|
|
|
import("package.tools.cmake").install(package, {
|
|
import("package.tools.cmake").install(package, {
|
|
"-Dglaze_DEVELOPER_MODE=OFF",
|
|
"-Dglaze_DEVELOPER_MODE=OFF",
|
|
|
|
+ "-DCMAKE_CXX_STANDARD=23",
|
|
"-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")
|
|
"-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")
|
|
})
|
|
})
|
|
else
|
|
else
|
|
@@ -62,5 +65,5 @@ package("glaze")
|
|
obj_t obj{};
|
|
obj_t obj{};
|
|
glz::write_json(obj, buffer);
|
|
glz::write_json(obj, buffer);
|
|
}
|
|
}
|
|
- ]]}, {configs = {languages = "c++20"}}))
|
|
|
|
|
|
+ ]]}, {configs = {languages = "c++2b"}}))
|
|
end)
|
|
end)
|