diff options
| author | Jérôme Leclercq <[email protected]> | 2021-12-12 00:19:38 +0100 |
|---|---|---|
| committer | Jérôme Leclercq <[email protected]> | 2021-12-12 00:19:38 +0100 |
| commit | 94fff01ece05949fbc0cced5fff83f959b3f5ada (patch) | |
| tree | 117a0f3ff83978a12de4fa80694d09447859448d | |
| parent | 0a9fa4f1f43ebde6f12bce1afcb968a5f3e850a6 (diff) | |
project/vstudio: Add support for /W4 warning level
| -rw-r--r-- | xmake/plugins/project/vstudio/impl/vs201x_vcxproj.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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("<WarningLevel%s>Level2</WarningLevel>", condition) elseif flagstr:find("[%-/]W3") then vcxprojfile:print("<WarningLevel%s>Level3</WarningLevel>", condition) + elseif flagstr:find("[%-/]W4") then + vcxprojfile:print("<WarningLevel%s>Level4</WarningLevel>", condition) elseif flagstr:find("[%-/]Wall") then vcxprojfile:print("<WarningLevel%s>EnableAllWarnings</WarningLevel>", 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 |
