Merge pull request #979 from tdesveauxPKFX/fix-noexceptions-vs2010

Define _HAS_EXCEPTIONS=0 from vs2010 for exceptionhandling off
This commit is contained in:
Samuel Surtees 2017-12-21 20:07:16 +10:00 committed by GitHub
commit ef9b341d6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 16 deletions

View File

@ -571,20 +571,6 @@
exceptionhandling "Off"
prepare()
test.capture [[
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<ExceptionHandling>false</ExceptionHandling>
]]
end
function suite.exceptions_onNoExceptionsVS2013()
exceptionhandling "Off"
p.action.set("vs2013")
prepare()
test.capture [[
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>

View File

@ -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)