summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorDaniel <dmoody256@gmail.com>2019-01-12 09:21:08 (GMT)
committerDaniel <dmoody256@gmail.com>2019-01-12 09:21:08 (GMT)
commitdbb5bb7c6905e388c41dad912830b983ea70e57d (patch)
tree563626b7522ebb04e448e4b31dd59d4b48432753 /src/engine
parent3e68e53b03e531f453edba8bc0443b5c19dde211 (diff)
downloadSCons-dbb5bb7c6905e388c41dad912830b983ea70e57d.zip
SCons-dbb5bb7c6905e388c41dad912830b983ea70e57d.tar.gz
SCons-dbb5bb7c6905e388c41dad912830b983ea70e57d.tar.bz2
added test for vs 14.1 and checking arm targets
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/Tool/MSCommon/vs.py15
-rw-r--r--src/engine/SCons/Tool/msvs.py20
2 files changed, 22 insertions, 13 deletions
diff --git a/src/engine/SCons/Tool/MSCommon/vs.py b/src/engine/SCons/Tool/MSCommon/vs.py
index f9382fb..8fd4ea0 100644
--- a/src/engine/SCons/Tool/MSCommon/vs.py
+++ b/src/engine/SCons/Tool/MSCommon/vs.py
@@ -68,9 +68,9 @@ class VisualStudio(object):
SCons.Tool.MSCommon.vc.get_installed_vcs()
dir = SCons.Tool.MSCommon.vc.find_vc_pdir(self.vc_version)
if not dir:
- debug('find_vs_dir(): no installed VC %s' % self.vc_version)
+ debug('find_vs_dir_by_vc(): no installed VC %s' % self.vc_version)
return None
- return dir
+ return os.path.abspath(os.path.join(dir, os.pardir))
def find_vs_dir_by_reg(self):
root = 'Software\\'
@@ -95,12 +95,11 @@ class VisualStudio(object):
First try to find by registry, and if that fails find via VC dir
"""
-
- if True:
- vs_dir=self.find_vs_dir_by_reg()
- return vs_dir
- else:
- return self.find_vs_dir_by_vc()
+ vs_dir=self.find_vs_dir_by_reg()
+ if not vs_dir:
+ vs_dir = self.find_vs_dir_by_vc()
+ debug('find_vs_dir(): found VS in ' + str(vs_dir ))
+ return vs_dir
def find_executable(self):
vs_dir = self.get_vs_dir()
diff --git a/src/engine/SCons/Tool/msvs.py b/src/engine/SCons/Tool/msvs.py
index 4b73a3b..60ba278 100644
--- a/src/engine/SCons/Tool/msvs.py
+++ b/src/engine/SCons/Tool/msvs.py
@@ -1096,12 +1096,17 @@ V10DSPCommandLine = """\
\t\t<NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='%(variant)s|%(platform)s'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
"""
+V15DSPHeader = """\
+<?xml version="1.0" encoding="%(encoding)s"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+"""
+
class _GenerateV10DSP(_DSPGenerator, _GenerateV10User):
"""Generates a Project file for MSVS 2010"""
- def __init__(self, dspfile, source, env):
+ def __init__(self, dspfile, header, source, env):
_DSPGenerator.__init__(self, dspfile, source, env)
- self.dspheader = V10DSPHeader
+ self.dspheader = header
self.dspconfiguration = V10DSPProjectConfiguration
self.dspglobals = V10DSPGlobals
@@ -1501,7 +1506,9 @@ class _GenerateV7DSW(_DSWGenerator):
def PrintSolution(self):
"""Writes a solution file"""
self.file.write('Microsoft Visual Studio Solution File, Format Version %s\n' % self.versionstr)
- if self.version_num >= 12.0:
+ if self.version_num > 14.0:
+ self.file.write('# Visual Studio 15\n')
+ elif self.version_num >= 12.0:
self.file.write('# Visual Studio 14\n')
elif self.version_num >= 11.0:
self.file.write('# Visual Studio 11\n')
@@ -1679,8 +1686,11 @@ def GenerateDSP(dspfile, source, env):
version_num = 6.0
if 'MSVS_VERSION' in env:
version_num, suite = msvs_parse_version(env['MSVS_VERSION'])
- if version_num >= 10.0:
- g = _GenerateV10DSP(dspfile, source, env)
+ if version_num > 14.0:
+ g = _GenerateV10DSP(dspfile, V15DSPHeader, source, env)
+ g.Build()
+ elif version_num >= 10.0:
+ g = _GenerateV10DSP(dspfile, V10DSPHeader, source, env)
g.Build()
elif version_num >= 7.0:
g = _GenerateV7DSP(dspfile, source, env)