Implement unsignedchar for vstudio
This commit is contained in:
parent
d556b6510f
commit
159281ea5a
@ -1238,3 +1238,32 @@
|
||||
</ClCompile>
|
||||
]]
|
||||
end
|
||||
|
||||
--
|
||||
-- Check UnsignedChar.
|
||||
--
|
||||
|
||||
function suite.unsignedChar_On()
|
||||
unsignedchar "On"
|
||||
prepare()
|
||||
test.capture [[
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalOptions>/J %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.unsignedChar_Off()
|
||||
unsignedchar "Off"
|
||||
prepare()
|
||||
test.capture [[
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
</ClCompile>
|
||||
]]
|
||||
end
|
||||
|
@ -1355,6 +1355,12 @@
|
||||
table.insert(opts, "/std:c++latest")
|
||||
end
|
||||
end
|
||||
|
||||
if cfg.toolset and cfg.toolset:startswith("msc") then
|
||||
local value = iif(cfg.unsignedchar, "On", "Off")
|
||||
table.insert(opts, p.tools.msc.shared.unsignedchar[value])
|
||||
end
|
||||
|
||||
if #opts > 0 then
|
||||
opts = table.concat(opts, " ")
|
||||
m.element("AdditionalOptions", condition, '%s %%(AdditionalOptions)', opts)
|
||||
|
Loading…
Reference in New Issue
Block a user