From 37ea03445cb35ed3f3966f3433211451175eead1 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 25 Jan 2024 23:01:17 +0800 Subject: use build warnings policy --- xmake/modules/core/tools/windres.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xmake/modules/core/tools/windres.lua') diff --git a/xmake/modules/core/tools/windres.lua b/xmake/modules/core/tools/windres.lua index a7940ce67..74f8da7c0 100644 --- a/xmake/modules/core/tools/windres.lua +++ b/xmake/modules/core/tools/windres.lua @@ -21,6 +21,7 @@ -- imports import("core.base.option") import("core.base.global") +import("core.project.policy") import("core.project.project") -- init it @@ -72,7 +73,7 @@ function compile(self, sourcefile, objectfile, dependinfo, flags) finally { function (ok, warnings) - if warnings and #warnings > 0 and (option.get("diagnosis") or option.get("warning") or global.get("build_warning")) then + if warnings and #warnings > 0 and policy.build_warnings() then cprint("${color.warning}%s", table.concat(table.slice(warnings:split('\n'), 1, 8), '\n')) end end -- cgit v1.3.1