summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorDan Pidcock <dpidcock@easyscreen.com>2014-10-15 11:52:31 (GMT)
committerDan Pidcock <dpidcock@easyscreen.com>2014-10-15 11:52:31 (GMT)
commite702acbc201264b28825b600f41c2c351149680a (patch)
treea2739e236f27bd295974d615a22c8c065946565b /src/engine
parentce5bf1790e1d0e7f254bbaca57ce3dcaa5795efd (diff)
downloadSCons-e702acbc201264b28825b600f41c2c351149680a.zip
SCons-e702acbc201264b28825b600f41c2c351149680a.tar.gz
SCons-e702acbc201264b28825b600f41c2c351149680a.tar.bz2
Support toolset in VS project files so that displayed version of visual studio matches the one that will be used
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/Tool/msvs.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py
index 06ce486..2b2ea13 100644
--- a/src/engine/SCons/Tool/msvs.py
+++ b/src/engine/SCons/Tool/msvs.py
@@ -892,6 +892,7 @@ V10DSPPropertyGroupCondition = """\
\t<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'" Label="Configuration">
\t\t<ConfigurationType>Makefile</ConfigurationType>
\t\t<UseOfMfc>false</UseOfMfc>
+\t\t<PlatformToolset>%(toolset)s</PlatformToolset>
\t</PropertyGroup>
"""
@@ -972,6 +973,11 @@ class _GenerateV10DSP(_DSPGenerator):
self.file.write('\t<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\n')
+ toolset = ''
+ if 'MSVC_VERSION' in self.env:
+ version_num, suite = msvs_parse_version(self.env['MSVC_VERSION'])
+ print version_num
+ toolset = 'v%d' % (version_num * 10)
for kind in confkeys:
variant = self.configs[kind].variant
platform = self.configs[kind].platform