diff --git a/brulib/make.py b/brulib/make.py index 67859e5..e343690 100644 --- a/brulib/make.py +++ b/brulib/make.py @@ -6,6 +6,7 @@ import re import sys import glob +import pdb import platform import brulib.install @@ -47,7 +48,7 @@ def cmd_make(config, verbose, targetPlatform="Native"): elif system == 'Linux': if targetPlatform == 'Native': cmd_make_linux(gyp_file, config, verbose) - else: + else: raise Exception('targetPlatform {} not supported on platform {}'\ .format(targetPlatform, system)) elif system == 'Darwin': @@ -83,7 +84,7 @@ def get_latest_installed_msvs_version(): # Let's do (b) for now. # See also https://code.google.com/p/gyp/source/browse/trunk/pylib/gyp/MSVSVersion.py msvs_versions = [] - regex = re.compile('^VS([0-10]+)COMNTOOLS$') + regex = re.compile('^VS([0-9]+)COMNTOOLS$') for key in os.environ: match = regex.match(key) if match != None: @@ -109,6 +110,7 @@ def get_latest_installed_msvs_year(): 90: 2008, 100: 2010, 110: 2012, + 140: 2015, } if not latest in msvs_version2year: print('not sure how to map VC{} to a VS year, defaulting to VS 2012' @@ -150,7 +152,8 @@ def cmd_make_win(gyp_filename, config): raise Exception('did not detect any installs of msbuild, these should' ' be part of .NET installations, please install msbuild or .NET') # TODO? add /toolsversion: ? - msbuild_cmdline = '{} {} /p:Configuration={} /verbosity:minimal'.format( + msbuild_cmdline = ('{} {} /p:Configuration={} /verbosity:minimal ' + + '/p:VisualStudioVersion=2015').format( # TODO: why doesn't 14.0 work for VS 2015? msbuild_exe, sln_filename, config) print("running msvs via msbuild: '{}'".format(msbuild_cmdline)) sys.stdout.flush() # otherwise msbuild log lines show up first