Add missing Unicode/MBCS defines to MSC command line

Note that the defines are showing up in CFLAGS rather than DEFINES. The tool adapter API needs to be modified before they can be placed in the defines list where they should be.
This commit is contained in:
Jason Perkins 2016-01-08 06:52:47 -05:00
parent 5d9c70ed74
commit 84cb655069
3 changed files with 29 additions and 0 deletions

View File

@ -1364,6 +1364,7 @@
--
-----------------------------------------------------------------------------
characterset "Default"
clr "Off"
editorintegration "Off"
exceptionhandling "Default"

View File

@ -29,6 +29,11 @@
--
msc.cflags = {
characterset = {
Default = { '/D"_UNICODE"', '/D"UNICODE"' },
MBCS = '/D"_MBCS"',
Unicode = { '/D"_UNICODE"', '/D"UNICODE"' },
},
clr = {
On = "/clr",
Unsafe = "/clr",

View File

@ -311,6 +311,28 @@
end
--
-- Check handling of character set switches
--
function suite.cflags_onCharSetDefault()
prepare()
test.contains('/D"_UNICODE"', msc.getcflags(cfg))
end
function suite.cflags_onCharSetUnicode()
characterset "Unicode"
prepare()
test.contains('/D"_UNICODE"', msc.getcflags(cfg))
end
function suite.cflags_onCharSetMBCS()
characterset "MBCS"
prepare()
test.contains('/D"_MBCS"', msc.getcflags(cfg))
end
--
-- Check handling of system search paths.
--
@ -342,3 +364,4 @@
prepare()
test.contains('/NODEFAULTLIB:lib1.lib', msc.getldflags(cfg))
end