diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-01-28 04:45:16 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-01-28 05:14:13 +0530 |
commit | 471904f0c50e9646d644efaf27c0ff4d5fce6634 (patch) | |
tree | 821d1e8ae28fc9212c4789e9235b81e7478dbe85 | |
parent | 57ec097b5fb08081e458b2b4946ee5943ba8c032 (diff) | |
download | meson-471904f0c50e9646d644efaf27c0ff4d5fce6634.zip meson-471904f0c50e9646d644efaf27c0ff4d5fce6634.tar.gz meson-471904f0c50e9646d644efaf27c0ff4d5fce6634.tar.bz2 |
vs: Add support for the 'werror' builtin option
-rw-r--r-- | mesonbuild/backend/vs2010backend.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index f0d125d..3b79a9c 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -790,11 +790,12 @@ class Vs2010Backend(backends.Backend): ET.SubElement(clconf, 'AdditionalIncludeDirectories').text = ';'.join(target_inc_dirs) target_defines.append('%(PreprocessorDefinitions)') ET.SubElement(clconf, 'PreprocessorDefinitions').text = ';'.join(target_defines) - rebuild = ET.SubElement(clconf, 'MinimalRebuild') - rebuild.text = 'true' - funclink = ET.SubElement(clconf, 'FunctionLevelLinking') - funclink.text = 'true' + ET.SubElement(clconf, 'MinimalRebuild').text = 'true' + ET.SubElement(clconf, 'FunctionLevelLinking').text = 'true' pch_node = ET.SubElement(clconf, 'PrecompiledHeader') + if self.environment.coredata.get_builtin_option('werror'): + ET.SubElement(clconf, 'TreatWarningAsError').text = 'true' + # Note: SuppressStartupBanner is /NOLOGO and is 'true' by default pch_sources = {} for lang in ['c', 'cpp']: pch = target.get_pch(lang) |