added support for buildinputs in vs200x generators
This commit is contained in:
parent
4e7dc976ba
commit
39725134b7
@ -1034,6 +1034,11 @@
|
||||
|
||||
local outputs = project.getrelative(filecfg.project, filecfg.buildoutputs)
|
||||
p.x('Outputs="%s"', table.concat(outputs, ' '))
|
||||
|
||||
if filecfg.buildinputs and #filecfg.buildinputs > 0 then
|
||||
local inputs = project.getrelative(filecfg.project, filecfg.buildinputs)
|
||||
p.x('AdditionalDependencies="%s"', table.concat(inputs, ';'))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -375,6 +375,35 @@
|
||||
]]
|
||||
end
|
||||
|
||||
function suite.customBuildTool_onBuildRuleWithAdditionalInputs()
|
||||
files { "hello.x" }
|
||||
filter "files:**.x"
|
||||
buildmessage "Compiling $(InputFile)"
|
||||
buildcommands {
|
||||
'cxc -c "$(InputFile)" -o "$(IntDir)/$(InputName).xo"',
|
||||
'c2o -c "$(IntDir)/$(InputName).xo" -o "$(IntDir)/$(InputName).obj"'
|
||||
}
|
||||
buildoutputs { "$(IntDir)/$(InputName).obj" }
|
||||
buildinputs { "common.x.inc" }
|
||||
prepare()
|
||||
test.capture [[
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="hello.x"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
CommandLine="cxc -c "$(InputFile)" -o "$(IntDir)/$(InputName).xo"
c2o -c "$(IntDir)/$(InputName).xo" -o "$(IntDir)/$(InputName).obj""
|
||||
Outputs="$(IntDir)/$(InputName).obj"
|
||||
AdditionalDependencies="common.x.inc"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- If two files at different folder levels have the same name, a different
|
||||
|
Loading…
Reference in New Issue
Block a user