Add explicit exception model flag for Visual C++

This commit is contained in:
Matthias Hoelzl 2017-11-21 19:06:43 +01:00
parent 640856f4d4
commit c6cfbad47a
1 changed files with 2 additions and 0 deletions

View File

@ -326,6 +326,8 @@ if selected_platform in platform_list:
env.Append(CCFLAGS=['/W2'] + disable_nonessential_warnings) env.Append(CCFLAGS=['/W2'] + disable_nonessential_warnings)
else: # 'no' else: # 'no'
env.Append(CCFLAGS=['/w']) env.Append(CCFLAGS=['/w'])
# Set exception handling model to avoid warnings caused by Windows system headers.
env.Append(CCFLAGS=['/EHsc'])
else: # Rest of the world else: # Rest of the world
if (env["warnings"] == 'extra'): if (env["warnings"] == 'extra'):
env.Append(CCFLAGS=['-Wall', '-Wextra']) env.Append(CCFLAGS=['-Wall', '-Wextra'])