From 61dd08543d9c4212733a2e5bc305abafd6e54ab7 Mon Sep 17 00:00:00 2001 From: Charles Brunet Date: Fri, 5 Jan 2024 15:51:51 -0500 Subject: [PATCH] Fix warning_level=everything in vs backends Fixes #12688 --- mesonbuild/backend/vs2010backend.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index 80ecc0506309..4396b3c5665d 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -1345,7 +1345,8 @@ def add_non_makefile_vcxproj_elements( ET.SubElement(clconf, 'FunctionLevelLinking').text = 'true' # Warning level warning_level = T.cast('str', target.get_option(OptionKey('warning_level'))) - ET.SubElement(clconf, 'WarningLevel').text = 'Level' + str(1 + int(warning_level)) + warning_level = 'EnableAllWarnings' if warning_level == 'everything' else 'Level' + str(1 + int(warning_level)) + ET.SubElement(clconf, 'WarningLevel').text = warning_level if target.get_option(OptionKey('werror')): ET.SubElement(clconf, 'TreatWarningAsError').text = 'true' # Optimization flags