summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/windres.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-01-25 23:01:17 +0800
committerruki <[email protected]>2024-01-25 23:01:17 +0800
commit37ea03445cb35ed3f3966f3433211451175eead1 (patch)
treee93a8fe542959be3aa5f7d4088d0f97b99c892bd /xmake/modules/core/tools/windres.lua
parentef5cf74c8e31fbda01b75187e6c934331ad46009 (diff)
use build warnings policy
Diffstat (limited to 'xmake/modules/core/tools/windres.lua')
-rw-r--r--xmake/modules/core/tools/windres.lua3
1 files changed, 2 insertions, 1 deletions
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