Skip to content

Commit

Permalink
support for msvs 2015
Browse files Browse the repository at this point in the history
  • Loading branch information
KjellSchubert committed May 19, 2015
1 parent fe29960 commit 636d4b4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions brulib/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import re
import sys
import glob
import pdb
import platform
import brulib.install

Expand Down Expand Up @@ -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':
Expand Down Expand Up @@ -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:
Expand All @@ -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'
Expand Down Expand Up @@ -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:<version> ?
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
Expand Down

0 comments on commit 636d4b4

Please sign in to comment.