Merge pull request #13146 from hoelzl/pr-add-ehsc-flag-for-vc

Add explicit exception model flag for Visual C++
This commit is contained in:
Rémi Verschelde 2017-11-22 00:01:03 +01:00 committed by GitHub
commit f8fd9a4a62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -326,6 +326,8 @@ if selected_platform in platform_list:
env.Append(CCFLAGS=['/W2'] + disable_nonessential_warnings)
else: # 'no'
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
if (env["warnings"] == 'extra'):
env.Append(CCFLAGS=['-Wall', '-Wextra'])