Sort buildinputs
and buildoutputs
on xcode4 (#1631)
* Sort `buildinputs` and `buildoutputs` on xcode4 * Fix `buildinputs` and `buildoutputs` for Xcode4
This commit is contained in:
parent
ebbbb72ab7
commit
38458a3624
@ -1315,6 +1315,42 @@
|
||||
end
|
||||
|
||||
|
||||
function suite.PBXShellScriptBuildPhase_OnBuildInputsAnddOutputsOrder()
|
||||
files { "file.a" }
|
||||
filter { "files:file.a" }
|
||||
buildcommands { "buildcmd" }
|
||||
buildinputs { "file.3", "file.1", "file.2" }
|
||||
buildoutputs { "file.5", "file.6", "file.4" }
|
||||
prepare()
|
||||
xcode.PBXShellScriptBuildPhase(tr)
|
||||
test.capture [[
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
0D594A1D2F24F74F6BDA205D /* Build "file.a" */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"file.a",
|
||||
"file.3",
|
||||
"file.1",
|
||||
"file.2",
|
||||
);
|
||||
name = "Build \"file.a\"";
|
||||
outputPaths = (
|
||||
"file.5",
|
||||
"file.6",
|
||||
"file.4",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "set -e\nif [ \"${CONFIGURATION}\" = \"Debug\" ]; then\n\tbuildcmd\nfi\nif [ \"${CONFIGURATION}\" = \"Release\" ]; then\n\tbuildcmd\nfi";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
-- PBXSourcesBuildPhase tests
|
||||
---------------------------------------------------------------------------
|
||||
|
@ -1110,10 +1110,14 @@
|
||||
end
|
||||
table.insert(commands, 'fi')
|
||||
for _, v in ipairs(filecfg.buildinputs) do
|
||||
inputs[v] = true
|
||||
if not table.indexof(inputs, v) then
|
||||
table.insert(inputs, v)
|
||||
end
|
||||
end
|
||||
for _, v in ipairs(filecfg.buildoutputs) do
|
||||
outputs[v] = true
|
||||
if not table.indexof(outputs, v) then
|
||||
table.insert(outputs, v)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -1129,13 +1133,13 @@
|
||||
_p(level+1,');')
|
||||
_p(level+1,'inputPaths = (');
|
||||
_p(level+2,'"%s",', xcode.escapeSetting(node.relpath))
|
||||
for v, _ in pairs(inputs) do
|
||||
for _, v in ipairs(inputs) do
|
||||
_p(level+2,'"%s",', xcode.escapeSetting(project.getrelative(tr.project, v)))
|
||||
end
|
||||
_p(level+1,');')
|
||||
_p(level+1,'name = %s;', xcode.stringifySetting('Build "' .. node.name .. '"'))
|
||||
_p(level+1,'outputPaths = (')
|
||||
for v, _ in pairs(outputs) do
|
||||
for _, v in ipairs(outputs) do
|
||||
_p(level+2,'"%s",', xcode.escapeSetting(project.getrelative (tr.project, v)))
|
||||
end
|
||||
_p(level+1,');')
|
||||
|
Loading…
Reference in New Issue
Block a user