Merge pull request #718 from Blizzard/add-notset-characterset
Adding support for NotSet characterset in VS2010+ (#79)
This commit is contained in:
commit
6907f6785c
@ -145,6 +145,7 @@
|
||||
kind = "string",
|
||||
allowed = {
|
||||
"Default",
|
||||
"ASCII",
|
||||
"MBCS",
|
||||
"Unicode",
|
||||
}
|
||||
|
@ -1168,7 +1168,13 @@
|
||||
|
||||
function m.characterSet(cfg)
|
||||
if not vstudio.isMakefile(cfg) then
|
||||
m.element("CharacterSet", nil, iif(cfg.characterset == p.MBCS, "MultiByte", "Unicode"))
|
||||
local charactersets = {
|
||||
ASCII = "NotSet",
|
||||
MBCS = "MultiByte",
|
||||
Unicode = "Unicode",
|
||||
Default = "Unicode"
|
||||
}
|
||||
m.element("CharacterSet", nil, charactersets[cfg.characterset])
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -138,6 +138,7 @@
|
||||
Default = { '/D"_UNICODE"', '/D"UNICODE"' },
|
||||
MBCS = '/D"_MBCS"',
|
||||
Unicode = { '/D"_UNICODE"', '/D"UNICODE"' },
|
||||
ASCII = { },
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -46,3 +46,12 @@
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.onASCII()
|
||||
characterset "ASCII"
|
||||
prepare()
|
||||
test.capture [[
|
||||
<CharacterSet>NotSet</CharacterSet>
|
||||
]]
|
||||
end
|
||||
|
||||
|
@ -414,6 +414,12 @@
|
||||
test.contains('/D"_MBCS"', msc.getdefines(cfg.defines, cfg))
|
||||
end
|
||||
|
||||
function suite.cflags_onCharSetASCII()
|
||||
characterset "ASCII"
|
||||
prepare()
|
||||
test.excludes({'/D"_MBCS"', '/D"_UNICODE"'}, msc.getdefines(cfg.defines, cfg))
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Check handling of system search paths.
|
||||
|
Loading…
Reference in New Issue
Block a user