commit
45b9e20a43
@ -5,6 +5,10 @@
|
|||||||
See https://github.com/premake/premake-core/wiki/What's-New-in-5.0
|
See https://github.com/premake/premake-core/wiki/What's-New-in-5.0
|
||||||
for the complete list of changes from the Premake 4.x series.
|
for the complete list of changes from the Premake 4.x series.
|
||||||
|
|
||||||
|
Since 5.0-alpha2:
|
||||||
|
|
||||||
|
* New API: buildlog()
|
||||||
|
|
||||||
Since 5.0-alpha1:
|
Since 5.0-alpha1:
|
||||||
|
|
||||||
* Many new debugger APIs
|
* Many new debugger APIs
|
||||||
|
@ -89,6 +89,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
api.register {
|
||||||
|
name = "buildlog",
|
||||||
|
scope = { "config" },
|
||||||
|
kind = "path",
|
||||||
|
tokens = true,
|
||||||
|
pathVars = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
api.register {
|
api.register {
|
||||||
name = "buildmessage",
|
name = "buildmessage",
|
||||||
scope = { "config", "rule" },
|
scope = { "config", "rule" },
|
||||||
|
@ -256,6 +256,7 @@
|
|||||||
m.imageXex,
|
m.imageXex,
|
||||||
m.deploy,
|
m.deploy,
|
||||||
m.ruleVars,
|
m.ruleVars,
|
||||||
|
m.buildLog,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -941,6 +942,16 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function m.buildLog(cfg)
|
||||||
|
if cfg.buildlog and #cfg.buildlog > 0 then
|
||||||
|
local relpath = project.getrelative(cfg.project, cfg.buildlog)
|
||||||
|
p.push('<BuildLog>')
|
||||||
|
p.x('<Path>%s</Path>', path.translate(relpath))
|
||||||
|
p.pop('</BuildLog>')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function m.characterSet(cfg)
|
function m.characterSet(cfg)
|
||||||
if not vstudio.isMakefile(cfg) then
|
if not vstudio.isMakefile(cfg) then
|
||||||
_p(2,'<CharacterSet>%s</CharacterSet>', iif(cfg.flags.Unicode, "Unicode", "MultiByte"))
|
_p(2,'<CharacterSet>%s</CharacterSet>', iif(cfg.flags.Unicode, "Unicode", "MultiByte"))
|
||||||
|
@ -99,6 +99,7 @@ return {
|
|||||||
-- Visual Studio 2010-2013 C/C++ projects
|
-- Visual Studio 2010-2013 C/C++ projects
|
||||||
"actions/vstudio/vc2010/test_assembly_refs.lua",
|
"actions/vstudio/vc2010/test_assembly_refs.lua",
|
||||||
"actions/vstudio/vc2010/test_build_events.lua",
|
"actions/vstudio/vc2010/test_build_events.lua",
|
||||||
|
"actions/vstudio/vc2010/test_build_log.lua",
|
||||||
"actions/vstudio/vc2010/test_compile_settings.lua",
|
"actions/vstudio/vc2010/test_compile_settings.lua",
|
||||||
"actions/vstudio/vc2010/test_config_props.lua",
|
"actions/vstudio/vc2010/test_config_props.lua",
|
||||||
"actions/vstudio/vc2010/test_debug_settings.lua",
|
"actions/vstudio/vc2010/test_debug_settings.lua",
|
||||||
|
50
tests/actions/vstudio/vc2010/test_build_log.lua
Normal file
50
tests/actions/vstudio/vc2010/test_build_log.lua
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
---
|
||||||
|
-- tests/actions/vstudio/vc2010/test_build_log.lua
|
||||||
|
-- Validate build log settings in Visual Studio 2010 C/C++ projects.
|
||||||
|
-- Copyright (c) 2015 Jason Perkins and the Premake project
|
||||||
|
---
|
||||||
|
|
||||||
|
local suite = test.declare("vstudio_vs2010_build_log")
|
||||||
|
local vc2010 = premake.vstudio.vc2010
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Setup
|
||||||
|
--
|
||||||
|
|
||||||
|
local sln, prj
|
||||||
|
|
||||||
|
function suite.setup()
|
||||||
|
sln, prj = test.createsolution()
|
||||||
|
end
|
||||||
|
|
||||||
|
local function prepare(platform)
|
||||||
|
local cfg = test.getconfig(prj, "Debug", platform)
|
||||||
|
vc2010.buildLog(cfg)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Nothing should be written by default.
|
||||||
|
--
|
||||||
|
|
||||||
|
function suite.isIgnoredByDefault()
|
||||||
|
prepare()
|
||||||
|
test.isemptycapture()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Write out relative path if provided.
|
||||||
|
--
|
||||||
|
|
||||||
|
function suite.writesPathIfSet()
|
||||||
|
buildlog "logs/MyCustomLogFile.log"
|
||||||
|
prepare()
|
||||||
|
test.capture [[
|
||||||
|
<BuildLog>
|
||||||
|
<Path>logs\MyCustomLogFile.log</Path>
|
||||||
|
</BuildLog>
|
||||||
|
]]
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user