From c6cfbad47a6b8abf14196d50e01bb1b15e2016e3 Mon Sep 17 00:00:00 2001 From: Matthias Hoelzl Date: Tue, 21 Nov 2017 19:06:43 +0100 Subject: [PATCH] Add explicit exception model flag for Visual C++ --- SConstruct | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SConstruct b/SConstruct index 856994ef154..61edb1233b7 100644 --- a/SConstruct +++ b/SConstruct @@ -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'])