From 94fff01ece05949fbc0cced5fff83f959b3f5ada Mon Sep 17 00:00:00 2001 From: Jérôme Leclercq Date: Sun, 12 Dec 2021 00:19:38 +0100 Subject: project/vstudio: Add support for /W4 warning level --- xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua index 19a1b20bd..b48d423a0 100644 --- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua +++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua @@ -288,6 +288,8 @@ function _make_source_options(vcxprojfile, flags, condition) vcxprojfile:print("Level2", condition) elseif flagstr:find("[%-/]W3") then vcxprojfile:print("Level3", condition) + elseif flagstr:find("[%-/]W4") then + vcxprojfile:print("Level4", condition) elseif flagstr:find("[%-/]Wall") then vcxprojfile:print("EnableAllWarnings", condition) else @@ -357,7 +359,7 @@ function _make_source_options(vcxprojfile, flags, condition) -- make AdditionalOptions local additional_flags = {} - local excludes = {"Od", "Os", "O0", "O1", "O2", "Ot", "Ox", "W0", "W1", "W2", "W3", "WX", "Wall", "Zi", "ZI", "Z7", "MT", "MTd", "MD", "MDd", "TP", "Fd", "fp", "I", "D", "Gm-", "Gm", "MP"} + local excludes = {"Od", "Os", "O0", "O1", "O2", "Ot", "Ox", "W0", "W1", "W2", "W3", "W4", "WX", "Wall", "Zi", "ZI", "Z7", "MT", "MTd", "MD", "MDd", "TP", "Fd", "fp", "I", "D", "Gm-", "Gm", "MP"} for _, flag in ipairs(flags) do local excluded = false for _, exclude in ipairs(excludes) do -- cgit v1.3.1