Add per-file defines for VC 200x

This commit is contained in:
Jason Perkins 2014-02-05 17:04:37 -05:00
parent 984b14c621
commit f44ac84545
2 changed files with 27 additions and 0 deletions

View File

@ -870,6 +870,7 @@
_p("%s", compilerAttribs)
end
p.pop('/>')
p.pop('</FileConfiguration>')
end
end
@ -909,6 +910,7 @@
m.customBuildTool(filecfg)
m.objectFile(filecfg)
m.optimization(filecfg)
m.preprocessorDefinitions(filecfg)
m.usePrecompiledHeader(filecfg)
m.VCCLCompilerTool_fileConfig_additionalOptions(filecfg)
m.forcedIncludeFiles(filecfg)

View File

@ -530,3 +530,28 @@
Optimization="0"
]]
end
--
-- Check handling of per-file defines.
--
function suite.defines()
files { "hello.cpp" }
configuration "hello.cpp"
defines { "HELLO" }
prepare()
test.capture [[
<Files>
<File
RelativePath="hello.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="HELLO"
]]
end