|
@@ -7,6 +7,7 @@ package("inja")
|
|
"https://github.com/pantor/inja.git")
|
|
"https://github.com/pantor/inja.git")
|
|
|
|
|
|
add_versions("v2.1.0", "038ecde8f6dbad5d3cedb6ceb0853fd0e488d5dc57593a869633ecb30b0dfa6e")
|
|
add_versions("v2.1.0", "038ecde8f6dbad5d3cedb6ceb0853fd0e488d5dc57593a869633ecb30b0dfa6e")
|
|
|
|
+ add_versions("v3.4.0", "7155f944553ca6064b26e88e6cae8b71f8be764832c9c7c6d5998e0d5fd60c55")
|
|
|
|
|
|
add_deps("nlohmann_json")
|
|
add_deps("nlohmann_json")
|
|
|
|
|
|
@@ -15,6 +16,10 @@ package("inja")
|
|
end)
|
|
end)
|
|
|
|
|
|
on_test(function (package)
|
|
on_test(function (package)
|
|
|
|
+ local cxx_std = "c++17"
|
|
|
|
+ if package:version() and package:version():lt("3.4.0") then
|
|
|
|
+ cxx_std = "c++11"
|
|
|
|
+ end
|
|
assert(package:check_cxxsnippets({test = [[
|
|
assert(package:check_cxxsnippets({test = [[
|
|
using namespace inja;
|
|
using namespace inja;
|
|
using json = nlohmann::json;
|
|
using json = nlohmann::json;
|
|
@@ -24,5 +29,5 @@ package("inja")
|
|
data["name"] = "world";
|
|
data["name"] = "world";
|
|
env.render("Hello {{ name }}!", data);
|
|
env.render("Hello {{ name }}!", data);
|
|
}
|
|
}
|
|
- ]]}, {configs = {languages = "c++11"}, includes = {"inja/inja.hpp"}}))
|
|
|
|
|
|
+ ]]}, {configs = {languages = cxx_std}, includes = {"inja/inja.hpp"}}))
|
|
end)
|
|
end)
|