[SCons] Setting 'msvc_version' implies 'toolchain=msvc'

This commit is contained in:
Ray Speth 2014-09-29 19:13:18 +00:00
parent 5c26f7b003
commit c0dc7bb922

View file

@ -131,16 +131,22 @@ if os.name == 'nt':
('target_arch',
"""Target architecture. The default is the same
architecture as the installed version of Python.""",
target_arch),
EnumVariable(
'toolchain',
"""The preferred compiler toolchain.""",
defaultToolchain, ('msvc', 'mingw', 'intel'))])
target_arch)])
opts.AddVariables(*windows_compiler_options)
pickCompilerEnv = Environment()
opts.Update(pickCompilerEnv)
if pickCompilerEnv['msvc_version']:
defaultToolchain = 'msvc'
windows_compiler_options.append(EnumVariable(
'toolchain',
"""The preferred compiler toolchain.""",
defaultToolchain, ('msvc', 'mingw', 'intel')))
opts.AddVariables(windows_compiler_options[-1])
opts.Update(pickCompilerEnv)
if pickCompilerEnv['toolchain'] == 'msvc':
toolchain = ['default']
if pickCompilerEnv['msvc_version']: