From 911257b606f596556141a83617f2d49426f87c27 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 11 Oct 2022 11:18:08 +0200 Subject: [PATCH] Always enable exception support when using mscv (for now), to avoid warnings. --- SConstruct | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/SConstruct b/SConstruct index 31ff2f71d..b23421579 100644 --- a/SConstruct +++ b/SConstruct @@ -468,15 +468,26 @@ if selected_platform in platform_list: env_base.Prepend(CXXFLAGS=["-fno-exceptions"]) env.Prepend(CXXFLAGS=["-fno-exceptions"]) else: - env_base.Prepend(CXXFLAGS=["/EHa-"]) - env_base.Prepend(CXXFLAGS=["/EHs-"]) - env_base.Prepend(CXXFLAGS=["/EHc-"]) + #env_base.Prepend(CXXFLAGS=["/EHa-"]) + #env_base.Prepend(CXXFLAGS=["/EHs-"]) + #env_base.Prepend(CXXFLAGS=["/EHc-"]) + #not needed #env_base.Prepend(CXXFLAGS=["/EHr-"]) - env.Prepend(CXXFLAGS=["/EHa-"]) - env.Prepend(CXXFLAGS=["/EHs-"]) - env.Prepend(CXXFLAGS=["/EHc-"]) + #env.Prepend(CXXFLAGS=["/EHa-"]) + #env.Prepend(CXXFLAGS=["/EHs-"]) + #env.Prepend(CXXFLAGS=["/EHc-"]) + #not needed #env.Prepend(CXXFLAGS=["/EHr-"]) + + # Apparently disabling exeptions when you also need to have stl containers + # (Some of the 3rd party code needs them) + # is not as simple with msvc as I originally thought. + # So for now they are always enabled. + # TODO: Write drop-in replacement for them. (They should use error macros, etc) + # (I bet it will come handy having them in more ways later.) + env_base.Prepend(CXXFLAGS=["/EHsc"]) + env.Prepend(CXXFLAGS=["/EHsc"]) else: if env.msvc: env_base.Prepend(CXXFLAGS=["/EHsc"])