#4978 Added script to support VS2015

This commit is contained in:
Jerry (Xinyu Hou) 2016-06-20 17:51:25 +01:00
parent 13e8047967
commit 25d8c5c32a

View File

@ -254,13 +254,15 @@ class InternalCommands:
gmockDir = 'gmock-1.6.0'
win32_generators = {
1 : VisualStudioGenerator('10'),
2 : VisualStudioGenerator('10 Win64'),
3 : VisualStudioGenerator('9 2008'),
4 : VisualStudioGenerator('9 2008 Win64'),
5 : VisualStudioGenerator('8 2005'),
6 : VisualStudioGenerator('8 2005 Win64')
}
1 : VisualStudioGenerator('14'),
2 : VisualStudioGenerator('14 Win64'),
3 : VisualStudioGenerator('10'),
4 : VisualStudioGenerator('10 Win64'),
5 : VisualStudioGenerator('9 2008'),
6 : VisualStudioGenerator('9 2008 Win64'),
7 : VisualStudioGenerator('8 2005'),
8 : VisualStudioGenerator('8 2005 Win64'),
}
unix_generators = {
1 : MakefilesGenerator(),
@ -899,8 +901,8 @@ class InternalCommands:
generator = self.getGeneratorFromConfig().cmakeName
if generator.startswith('Visual Studio'):
# special case for version 10, use new /target:clean
if generator.startswith('Visual Studio 10'):
# special case for version 10 and above, use new /target:clean
if generator.startswith('Visual Studio 10') or generator.startswith('Visual Studio 14'):
for target in targets:
self.run_vcbuild(generator, target, self.sln_filepath(), '/target:clean')
@ -1750,6 +1752,8 @@ class InternalCommands:
value,type = _winreg.QueryValueEx(key, '9.0')
elif generator.startswith('Visual Studio 10'):
value,type = _winreg.QueryValueEx(key, '10.0')
elif generator.startswith('Visual Studio 14'):
value,type = _winreg.QueryValueEx(key, '14.0')
else:
raise Exception('Cannot determine vcvarsall.bat location for: ' + generator)
@ -1792,7 +1796,7 @@ class InternalCommands:
else:
config = 'Debug'
if generator.startswith('Visual Studio 10'):
if generator.startswith('Visual Studio 10') or generator.startswith('Visual Studio 14'):
cmd = ('@echo off\n'
'call "%s" %s \n'
'cd "%s"\n'