Merge pull request #839 from Mikhael-Danilov/master

Expand {...} macros in pre|post build commands for codelite
This commit is contained in:
Tom van Dijck 2017-06-23 14:23:10 -07:00 committed by GitHub
commit 4fa6dafdf1
2 changed files with 8 additions and 5 deletions

View File

@ -301,9 +301,10 @@
function m.preBuild(cfg)
if #cfg.prebuildcommands > 0 then
_p(3, '<PreBuild>')
for _, commands in ipairs(cfg.prebuildcommands) do
local commands = os.translateCommandsAndPaths(cfg.prebuildcommands, cfg.project.basedir, cfg.project.location)
for _, command in ipairs(commands) do
_x(4, '<Command Enabled="yes">%s</Command>',
p.esc(commands))
p.esc(command))
end
_p(3, '</PreBuild>')
end
@ -312,9 +313,10 @@
function m.postBuild(cfg)
if #cfg.postbuildcommands > 0 then
_p(3, '<PostBuild>')
for _, commands in ipairs(cfg.postbuildcommands) do
local commands = os.translateCommandsAndPaths(cfg.postbuildcommands, cfg.project.basedir, cfg.project.location)
for _, command in ipairs(commands) do
_x(4, '<Command Enabled="yes">%s</Command>',
p.esc(commands))
p.esc(command))
end
_p(3, '</PostBuild>')
end

View File

@ -18,10 +18,11 @@
function suite.setup()
p.action.set("codelite")
p.indent(" ")
wks, prj = test.createWorkspace()
wks = test.createWorkspace()
end
local function prepare()
prj = test.getproject(wks,1)
cfg = test.getconfig(prj, "Debug")
end