aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorОлег Мороз <oleg.moroz@mcc.vniiem.ru>2021-09-12 10:11:01 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2021-11-02 18:50:44 +0200
commit387e84656845cfcc3c966f6cf754de65d601eccd (patch)
treeb641bd7117bfa6148b48c0744b20ad04c1b82577 /mesonbuild/backend
parent038b31e72bc02f0a9bdc6d8613992a5c344e8650 (diff)
downloadmeson-387e84656845cfcc3c966f6cf754de65d601eccd.zip
meson-387e84656845cfcc3c966f6cf754de65d601eccd.tar.gz
meson-387e84656845cfcc3c966f6cf754de65d601eccd.tar.bz2
Fixes .vcxproj for vs2017 vs2019
fixes #6314 in case of backend is vs2017 or vs2019 place LanguageStandard tag with stdcpp version and LanguageStandard_C tag with stdc version in .vcxproj file
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/vs2010backend.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index 94e7bdd..afc2713 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -1119,6 +1119,15 @@ class Vs2010Backend(backends.Backend):
else:
ET.SubElement(clconf, 'FavorSizeOrSpeed').text = 'Speed'
# Note: SuppressStartupBanner is /NOLOGO and is 'true' by default
+ if self.name in ('vs2017', 'vs2019'):
+ if 'cpp' in file_args:
+ optargs = [x for x in file_args['cpp'] if x.startswith('/std:c++')]
+ if optargs:
+ ET.SubElement(clconf, 'LanguageStandard').text = optargs[0].replace("/std:c++","stdcpp")
+ if 'c' in file_args:
+ optargs = [x for x in file_args['c'] if x.startswith('/std:c')]
+ if optargs:
+ ET.SubElement(clconf, 'LanguageStandard_C').text = optargs[0].replace("/std:c","stdc")
pch_sources = {}
if self.environment.coredata.options.get(OptionKey('b_pch')):
for lang in ['c', 'cpp']: