From 7558e114b3054c9dce685dae760913551929ad0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Fri, 30 Sep 2016 00:27:08 +0300 Subject: [PATCH] Build with VS2015 over VS2013, demote VS2013 to be used last (for old builds) --- emsdk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emsdk b/emsdk index ad84650..ff2548c 100755 --- a/emsdk +++ b/emsdk @@ -98,9 +98,9 @@ if WINDOWS: vs2015_exists = 'VS140COMNTOOLS' in os.environ or 'VSSDK140Install' in os.environ or os.path.isdir(os.path.join(os.environ['ProgramFiles'], 'Microsoft Visual Studio 14.0')) or ('ProgramFiles(x86)' in os.environ and os.path.isdir(os.path.join(os.environ['ProgramFiles(x86)'], 'Microsoft Visual Studio 14.0'))) vs2013_exists = 'VS120COMNTOOLS' in os.environ or os.path.isdir(os.path.join(os.environ['ProgramFiles'], 'Microsoft Visual Studio 12.0')) or ('ProgramFiles(x86)' in os.environ and os.path.isdir(os.path.join(os.environ['ProgramFiles(x86)'], 'Microsoft Visual Studio 12.0'))) mingw_exists = which('mingw32-make') != None and which('g++') != None - if vs2013_exists: CMAKE_GENERATOR = 'Visual Studio 12' # Favor VS2013 over VS2015, since there is no big known difference, and VS2013 CRT is more widely available (for portable installation compatibility). - elif vs2015_exists: CMAKE_GENERATOR = 'Visual Studio 14' + if vs2015_exists: CMAKE_GENERATOR = 'Visual Studio 14' elif mingw_exists: CMAKE_GENERATOR = 'MinGW Makefiles' + elif vs2013_exists: CMAKE_GENERATOR = 'Visual Studio 12' # VS2013 is no longer supported, so attempt it as a last resort if someone might want to insist using it. else: CMAKE_GENERATOR = '' # No detected generator if VERBOSE: print('CMAKE_GENERATOR: ' + CMAKE_GENERATOR) sys.argv = filter(lambda x: x not in ['--mingw', '--vs2013', '--vs2015'], sys.argv)