Merge pull request #751 from LORgames/ssurtees/compileAsFix

CompileAs element handles C++ now
This commit is contained in:
Jason Perkins 2017-04-24 14:41:53 -04:00 committed by GitHub
commit 8da25c2a56
2 changed files with 40 additions and 0 deletions

View File

@ -1217,6 +1217,8 @@
function m.compileAs(cfg)
if p.languages.isc(cfg.language) then
m.element("CompileAs", nil, "CompileAsC")
elseif p.languages.iscpp(cfg.language) then
m.element("CompileAs", nil, "CompileAsCpp")
end
end

View File

@ -37,6 +37,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
]]
end
@ -222,6 +223,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
]]
end
@ -234,6 +236,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
]]
end
@ -440,6 +443,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
]]
end
@ -453,6 +457,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>None</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
]]
end
@ -466,6 +471,7 @@
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<Optimization>Disabled</Optimization>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
]]
end
@ -902,6 +908,7 @@
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
]]
end
@ -990,3 +997,34 @@
<StringPooling>true</StringPooling>
]]
end
--
-- Check handling of the language api
--
function suite.onLanguageC()
language 'C'
prepare()
test.capture [[
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
]]
end
function suite.onLanguageCpp()
language 'C++'
prepare()
test.capture [[
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
]]
end