|
|
|
@ -21,6 +21,7 @@ package("spdlog") |
|
|
|
|
add_versions("v1.5.0", "87e87c989f15d6b9f5379385aec1001c89a42941341ebaa09ec895b98a00efb4") |
|
|
|
|
add_versions("v1.4.2", "56b90f0bd5b126cf1b623eeb19bf4369516fa68f036bbc22d9729d2da511fb5a") |
|
|
|
|
add_versions("v1.3.1", "db6986d0141546d4fba5220944cc1f251bd8afdfc434bda173b4b0b6406e3cd0") |
|
|
|
|
add_versions("v1.2.1", "ff69568eee595693f26b921c7b0fc7de1096a36cf57f51a6eda8ce022aebc7ff") |
|
|
|
|
|
|
|
|
|
add_patches("v1.11.0", path.join(os.scriptdir(), "patches", "v1.11.0", "fmt10.patch"), "61efa804845141ffa86532d9be7103d4dc8185e96de69d5efca42ebd7058e13d") |
|
|
|
|
|
|
|
|
@ -80,9 +81,15 @@ package("spdlog") |
|
|
|
|
end) |
|
|
|
|
|
|
|
|
|
on_test(function (package) |
|
|
|
|
if package:config("std_format") then |
|
|
|
|
assert(package:has_cxxfuncs("spdlog::info(\"\")", {includes = "spdlog/spdlog.h", configs = {languages = "c++20"}})) |
|
|
|
|
local version = package:version() |
|
|
|
|
local cpp_version = package:config("std_format") and "c++20" or "c++14" |
|
|
|
|
if version and version:le("1.2.1") then |
|
|
|
|
assert(package:has_cxxfuncs("spdlog::get(\"default\")->info(\"\")", {includes = "spdlog/spdlog.h", configs = {languages = cpp_version}})) |
|
|
|
|
else |
|
|
|
|
assert(package:has_cxxfuncs("spdlog::info(\"\")", {includes = "spdlog/spdlog.h", configs = {languages = "c++14"}})) |
|
|
|
|
if package:config("std_format") then |
|
|
|
|
assert(package:has_cxxfuncs("spdlog::info(\"\")", {includes = "spdlog/spdlog.h", configs = {languages = cpp_version}})) |
|
|
|
|
else |
|
|
|
|
assert(package:has_cxxfuncs("spdlog::info(\"\")", {includes = "spdlog/spdlog.h", configs = {languages = cpp_version}})) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end) |
|
|
|
|