From c3ceb52b94c891482f361ac97360e1c0ab466dc0 Mon Sep 17 00:00:00 2001 From: Thomas Desveaux Date: Tue, 19 Dec 2017 14:53:11 +0100 Subject: [PATCH 1/2] vstudio: Define _HAS_EXCEPTIONS=0 from vs2010 for exceptionhandling off --- modules/vstudio/vs2010_vcxproj.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/vstudio/vs2010_vcxproj.lua b/modules/vstudio/vs2010_vcxproj.lua index be0b2b71bb..3f2fe692a4 100644 --- a/modules/vstudio/vs2010_vcxproj.lua +++ b/modules/vstudio/vs2010_vcxproj.lua @@ -1384,7 +1384,7 @@ function m.clCompilePreprocessorDefinitions(cfg, condition) local defines = cfg.defines - if cfg.exceptionhandling == p.OFF and _ACTION >= "vs2013" then + if cfg.exceptionhandling == p.OFF then defines = table.join(defines, "_HAS_EXCEPTIONS=0") end m.preprocessorDefinitions(cfg, defines, false, condition) @@ -2261,7 +2261,7 @@ function m.resourcePreprocessorDefinitions(cfg) local defines = table.join(cfg.defines, cfg.resdefines) - if cfg.exceptionhandling == p.OFF and _ACTION >= "vs2013" then + if cfg.exceptionhandling == p.OFF then table.insert(defines, "_HAS_EXCEPTIONS=0") end m.preprocessorDefinitions(cfg, defines, true) From 75ff8934f6a7f981821474c8792ecbe2df95c6a9 Mon Sep 17 00:00:00 2001 From: Thomas Desveaux Date: Tue, 19 Dec 2017 15:50:45 +0100 Subject: [PATCH 2/2] vstudio: Fix exception handling tests --- .../vstudio/tests/vc2010/test_compile_settings.lua | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/modules/vstudio/tests/vc2010/test_compile_settings.lua b/modules/vstudio/tests/vc2010/test_compile_settings.lua index 503c9d4ab2..580b033c91 100644 --- a/modules/vstudio/tests/vc2010/test_compile_settings.lua +++ b/modules/vstudio/tests/vc2010/test_compile_settings.lua @@ -571,20 +571,6 @@ exceptionhandling "Off" prepare() test.capture [[ - - NotUsing - Level3 - Disabled - false - ]] - end - - - function suite.exceptions_onNoExceptionsVS2013() - exceptionhandling "Off" - p.action.set("vs2013") - prepare() - test.capture [[ NotUsing Level3