Skip to content
Permalink
Browse files

Throw configuration error on unsupported compilers (#1029)

  • Loading branch information
psychonic authored and Headline committed Nov 16, 2019
1 parent 2a9deb6 commit 1000d419fc69e97b861b03c95ceb97afec058783
Showing with 12 additions and 5 deletions.
  1. +11 −2 AMBuildScript
  2. +1 −3 core/AMBuilder
@@ -214,6 +214,16 @@ class SMConfig(object):
if cxx.like('msvc') and len(self.archs) > 1:
raise Exception('Building multiple archs with MSVC is not currently supported')

if cxx.family == 'msvc':
if cxx.version < 1900:
raise Exception('Only MSVC 2015 and later are supported, c++14 support is required.')
if cxx.family == 'gcc':
if cxx.version < 'gcc-4.9':
raise Exception('Only GCC versions 4.9 or greater are supported, c++14 support is required.')
if cxx.family == 'clang':
if cxx.version < 'clang-3.4':
raise Exception('Only clang versions 3.4 or greater are supported, c++14 support is required.')

if cxx.like('gcc'):
self.configure_gcc(cxx)
elif cxx.family == 'msvc':
@@ -508,8 +518,7 @@ class SMConfig(object):

if compiler.like('msvc'):
compiler.defines += ['COMPILER_MSVC', 'COMPILER_MSVC32']
if compiler.version >= 1900:
compiler.linkflags += ['legacy_stdio_definitions.lib']
compiler.linkflags += ['legacy_stdio_definitions.lib']
else:
compiler.defines += ['COMPILER_GCC']

@@ -84,9 +84,7 @@ for sdk_name in SM.sdks:
elif builder.target.platform == 'windows':
msvc_ver = compiler.version
vs_year = ''
if msvc_ver == 1800:
vs_year = '2013'
elif 1900 <= msvc_ver < 2000:
if 1900 <= msvc_ver < 2000:
vs_year = '2015'
else:
raise Exception('Cannot find libprotobuf for MSVC version "' + str(compiler.version) + '"')

0 comments on commit 1000d41

Please sign in to comment.
You can’t perform that action at this time.