More cleanup; preparing the virtual path stuff
This commit is contained in:
parent
7a89211a38
commit
eccd1720ba
@ -137,7 +137,7 @@
|
||||
|
||||
-- work-in-progress: build the configurations
|
||||
print("Building configurations...")
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
|
||||
ok, err = premake.checkprojects()
|
||||
if (not ok) then error("Error: " .. err, 0) end
|
||||
|
@ -12,7 +12,9 @@
|
||||
premake.bake = { }
|
||||
local bake = premake.bake
|
||||
|
||||
-- do not copy these fields into the configurations
|
||||
|
||||
-- do not copy these fields into the configurations
|
||||
|
||||
local nocopy =
|
||||
{
|
||||
blocks = true,
|
||||
@ -21,8 +23,9 @@
|
||||
__configs = true,
|
||||
}
|
||||
|
||||
-- leave these paths as absolute, rather than converting to project relative
|
||||
local nofixup =
|
||||
-- leave these paths as absolute, rather than converting to project relative
|
||||
|
||||
local keeprelative =
|
||||
{
|
||||
basedir = true,
|
||||
location = true,
|
||||
@ -65,7 +68,6 @@
|
||||
end
|
||||
|
||||
for _, pattern in ipairs(keyword:explode(" or ")) do
|
||||
-- local pattern = "^" .. word .. "$"
|
||||
for termkey, term in pairs(terms) do
|
||||
if term:match(pattern) == term then
|
||||
return termkey
|
||||
@ -78,8 +80,10 @@
|
||||
|
||||
--
|
||||
-- Checks a set of configuration block keywords against a list of terms.
|
||||
-- I've already forgotten the purpose of the required terms (d'oh!) but
|
||||
-- I'll see if I can figure it out on a future refactoring.
|
||||
-- The required flag is used by the file configurations: only blocks
|
||||
-- with a term that explictly matches the filename get applied; more
|
||||
-- general blocks are skipped over (since they were already applied at
|
||||
-- the config level).
|
||||
--
|
||||
|
||||
function premake.iskeywordsmatch(keywords, terms)
|
||||
@ -114,7 +118,7 @@
|
||||
local function adjustpaths(location, obj)
|
||||
for name, value in pairs(obj) do
|
||||
local field = premake.fields[name]
|
||||
if field and value and not nofixup[name] then
|
||||
if field and value and not keeprelative[name] then
|
||||
if field.kind == "path" then
|
||||
obj[name] = path.getrelative(location, value)
|
||||
elseif field.kind == "dirlist" or field.kind == "filelist" then
|
||||
@ -275,84 +279,6 @@
|
||||
|
||||
return result
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Post-process a project configuration, applying path fix-ups and other adjustments
|
||||
-- to the "raw" setting data pulled from the project script.
|
||||
--
|
||||
-- @param prj
|
||||
-- The project object which contains the configuration.
|
||||
-- @param cfg
|
||||
-- The configuration object to be fixed up.
|
||||
--
|
||||
|
||||
local function postprocess(prj, cfg)
|
||||
cfg.project = prj
|
||||
cfg.shortname = premake.getconfigname(cfg.name, cfg.platform, true)
|
||||
cfg.longname = premake.getconfigname(cfg.name, cfg.platform)
|
||||
|
||||
-- set the project location, if not already set
|
||||
cfg.location = cfg.location or cfg.basedir
|
||||
|
||||
-- figure out the target system
|
||||
local platform = premake.platforms[cfg.platform]
|
||||
if platform.iscrosscompiler then
|
||||
cfg.system = cfg.platform
|
||||
else
|
||||
cfg.system = os.get()
|
||||
end
|
||||
|
||||
-- adjust the kind as required by the target system
|
||||
if cfg.kind == "SharedLib" and platform.nosharedlibs then
|
||||
cfg.kind = "StaticLib"
|
||||
end
|
||||
|
||||
-- remove excluded files from the file list
|
||||
local files = { }
|
||||
for _, fname in ipairs(cfg.files) do
|
||||
local excluded = false
|
||||
for _, exclude in ipairs(cfg.excludes) do
|
||||
excluded = (fname == exclude)
|
||||
if (excluded) then break end
|
||||
end
|
||||
|
||||
if (not excluded) then
|
||||
table.insert(files, fname)
|
||||
end
|
||||
end
|
||||
cfg.files = files
|
||||
|
||||
-- fixup the data
|
||||
for name, field in pairs(premake.fields) do
|
||||
-- re-key flag fields for faster lookups
|
||||
if field.isflags then
|
||||
local values = cfg[name]
|
||||
for _, flag in ipairs(values) do values[flag] = true end
|
||||
end
|
||||
end
|
||||
|
||||
-- build configuration objects for all files
|
||||
-- TODO: can I build this as a tree instead, and avoid the extra
|
||||
-- step of building it later?
|
||||
cfg.__fileconfigs = { }
|
||||
for _, fname in ipairs(cfg.files) do
|
||||
cfg.terms.required = fname:lower()
|
||||
local fcfg = {}
|
||||
for _, blk in ipairs(cfg.project.blocks) do
|
||||
if (premake.iskeywordsmatch(blk.keywords, cfg.terms)) then
|
||||
mergeobject(fcfg, blk)
|
||||
end
|
||||
end
|
||||
|
||||
-- add indexed by name and integer
|
||||
-- TODO: when everything is converted to trees I won't need
|
||||
-- to index by name any longer
|
||||
fcfg.name = fname
|
||||
cfg.__fileconfigs[fname] = fcfg
|
||||
table.insert(cfg.__fileconfigs, fcfg)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
@ -546,6 +472,8 @@
|
||||
|
||||
return false;
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Copies the field from dstCfg to srcCfg.
|
||||
--
|
||||
@ -556,7 +484,7 @@
|
||||
if type(srcCfg[strSrcField]) == "table" then
|
||||
--handle paths.
|
||||
if (srcField.kind == "dirlist" or srcField.kind == "filelist") and
|
||||
(not nofixup[strSrcField]) then
|
||||
(not keeprelative[strSrcField]) then
|
||||
for i,p in ipairs(srcCfg[strSrcField]) do
|
||||
table.insert(dstCfg[strDstField],
|
||||
path.rebase(p, srcCfg.project.location, dstCfg.project.location))
|
||||
@ -578,7 +506,7 @@
|
||||
end
|
||||
end
|
||||
else
|
||||
if(srcField.kind == "path" and (not nofixup[strSrcField])) then
|
||||
if(srcField.kind == "path" and (not keeprelative[strSrcField])) then
|
||||
dstCfg[strDstField] = path.rebase(srcCfg[strSrcField],
|
||||
prj.location, dstCfg.project.location);
|
||||
else
|
||||
@ -587,6 +515,7 @@
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- This function will take the list of project entries and apply their usage project data
|
||||
-- to the given configuration. It will copy compiling information for the projects that are
|
||||
@ -628,13 +557,10 @@
|
||||
|
||||
|
||||
--
|
||||
-- Takes the configuration information stored in solution->project->block
|
||||
-- hierarchy and flattens it all down into one object per configuration.
|
||||
-- These objects are cached with the project, and can be retrieved by
|
||||
-- calling the getconfig() or the eachconfig() iterator function.
|
||||
-- Main function, controls the process of flattening the configurations.
|
||||
--
|
||||
|
||||
function premake.buildconfigs()
|
||||
function premake.bake.buildconfigs()
|
||||
|
||||
-- convert project path fields to be relative to project location
|
||||
for sln in premake.solution.each() do
|
||||
@ -655,7 +581,7 @@
|
||||
for _, prj in ipairs(sln.projects) do
|
||||
prj.__configs = collapse(prj, basis)
|
||||
for _, cfg in pairs(prj.__configs) do
|
||||
postprocess(prj, cfg)
|
||||
bake.postprocess(prj, cfg)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -695,3 +621,81 @@
|
||||
buildtargets(cfg)
|
||||
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Post-process a project configuration, applying path fix-ups and other adjustments
|
||||
-- to the "raw" setting data pulled from the project script.
|
||||
--
|
||||
-- @param prj
|
||||
-- The project object which contains the configuration.
|
||||
-- @param cfg
|
||||
-- The configuration object to be fixed up.
|
||||
--
|
||||
|
||||
function premake.bake.postprocess(prj, cfg)
|
||||
cfg.project = prj
|
||||
cfg.shortname = premake.getconfigname(cfg.name, cfg.platform, true)
|
||||
cfg.longname = premake.getconfigname(cfg.name, cfg.platform)
|
||||
|
||||
-- set the project location, if not already set
|
||||
cfg.location = cfg.location or cfg.basedir
|
||||
|
||||
-- figure out the target system
|
||||
local platform = premake.platforms[cfg.platform]
|
||||
if platform.iscrosscompiler then
|
||||
cfg.system = cfg.platform
|
||||
else
|
||||
cfg.system = os.get()
|
||||
end
|
||||
|
||||
-- adjust the kind as required by the target system
|
||||
if cfg.kind == "SharedLib" and platform.nosharedlibs then
|
||||
cfg.kind = "StaticLib"
|
||||
end
|
||||
|
||||
-- remove excluded files from the file list
|
||||
local files = { }
|
||||
for _, fname in ipairs(cfg.files) do
|
||||
local excluded = false
|
||||
for _, exclude in ipairs(cfg.excludes) do
|
||||
excluded = (fname == exclude)
|
||||
if (excluded) then break end
|
||||
end
|
||||
|
||||
if (not excluded) then
|
||||
table.insert(files, fname)
|
||||
end
|
||||
end
|
||||
cfg.files = files
|
||||
|
||||
-- fixup the data
|
||||
for name, field in pairs(premake.fields) do
|
||||
-- re-key flag fields for faster lookups
|
||||
if field.isflags then
|
||||
local values = cfg[name]
|
||||
for _, flag in ipairs(values) do values[flag] = true end
|
||||
end
|
||||
end
|
||||
|
||||
-- build configuration objects for all files
|
||||
-- TODO: can I build this as a tree instead, and avoid the extra
|
||||
-- step of building it later?
|
||||
cfg.__fileconfigs = { }
|
||||
for _, fname in ipairs(cfg.files) do
|
||||
cfg.terms.required = fname:lower()
|
||||
local fcfg = {}
|
||||
for _, blk in ipairs(cfg.project.blocks) do
|
||||
if (premake.iskeywordsmatch(blk.keywords, cfg.terms)) then
|
||||
mergeobject(fcfg, blk)
|
||||
end
|
||||
end
|
||||
|
||||
-- add indexed by name and integer
|
||||
-- TODO: when everything is converted to trees I won't need
|
||||
-- to index by name any longer
|
||||
fcfg.name = fname
|
||||
cfg.__fileconfigs[fname] = fcfg
|
||||
table.insert(cfg.__fileconfigs, fcfg)
|
||||
end
|
||||
end
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
codeblocks.files(prj)
|
||||
end
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
local function prepare()
|
||||
io.indent = " "
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
codelite.files(prj)
|
||||
end
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
local get_buffer = function(projectName)
|
||||
io.capture()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
local cfg = premake.getconfig(projectName, 'Debug', 'Native')
|
||||
premake.gmake_cpp_config(cfg, premake.gcc)
|
||||
local buffer = io.endcapture()
|
||||
|
@ -19,7 +19,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
cfg = premake.getconfig(prj, "Debug")
|
||||
end
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
premake.action.call("clean")
|
||||
end
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
cs2002.Files(prj)
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
cs2005.files(prj)
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
cs2005.projectelement(prj)
|
||||
end
|
||||
|
@ -22,7 +22,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
cs2005.projectsettings(prj)
|
||||
end
|
||||
|
@ -21,7 +21,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
cfg = premake.getconfig(prj, "Debug")
|
||||
cs2005.propertygroup(cfg)
|
||||
|
@ -27,7 +27,7 @@
|
||||
local function prepare(language)
|
||||
prj1.language = language
|
||||
prj2.language = language
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj1 = premake.solution.getproject(sln, 1)
|
||||
prj2 = premake.solution.getproject(sln, 2)
|
||||
sln2005.projectdependencies(prj2)
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
sln2005.header()
|
||||
end
|
||||
|
||||
|
@ -1,24 +1,24 @@
|
||||
--
|
||||
-- tests/actions/vstudio/sln2005/layout.lua
|
||||
-- tests/actions/vstudio/sln2005/layout.lua
|
||||
-- Validate the overall layout of VS 2005-2010 solutions.
|
||||
-- Copyright (c) 2009-2011 Jason Perkins and the Premake project
|
||||
--
|
||||
|
||||
T.vstudio_sln2005_layout = { }
|
||||
local suite = T.vstudio_sln2005_layout
|
||||
local sln2005 = premake.vstudio.sln2005
|
||||
|
||||
T.vstudio_sln2005_layout = { }
|
||||
local suite = T.vstudio_sln2005_layout
|
||||
local sln2005 = premake.vstudio.sln2005
|
||||
|
||||
|
||||
local sln
|
||||
|
||||
function suite.setup()
|
||||
_ACTION = "vs2005"
|
||||
sln = test.createsolution()
|
||||
uuid "AE61726D-187C-E440-BD07-2556188A6565"
|
||||
_ACTION = "vs2005"
|
||||
sln = test.createsolution()
|
||||
uuid "AE61726D-187C-E440-BD07-2556188A6565"
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
sln2005.generate(sln)
|
||||
end
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
local function prepare(language)
|
||||
prj.language = language
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
sln2005.platforms(sln)
|
||||
end
|
||||
@ -80,22 +80,22 @@
|
||||
--
|
||||
-- Mixed language tests
|
||||
--
|
||||
|
||||
function suite.On2005_MixedLanguages()
|
||||
_ACTION = "vs2005"
|
||||
|
||||
function suite.On2005_MixedLanguages()
|
||||
_ACTION = "vs2005"
|
||||
test.createproject(sln)
|
||||
prepare("C#")
|
||||
test.capture [[
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
]]
|
||||
end
|
||||
test.capture [[
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|Mixed Platforms = Release|Mixed Platforms
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
function suite.On2010_MixedLanguages()
|
||||
@ -114,22 +114,22 @@
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Test multiple platforms
|
||||
--
|
||||
|
||||
function suite.On2005_MixedPlatforms()
|
||||
_ACTION = "vs2005"
|
||||
platforms { "x32", "x64" }
|
||||
prepare("C++")
|
||||
test.capture [[
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
]]
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Test multiple platforms
|
||||
--
|
||||
|
||||
function suite.On2005_MixedPlatforms()
|
||||
_ACTION = "vs2005"
|
||||
platforms { "x32", "x64" }
|
||||
prepare("C++")
|
||||
test.capture [[
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
]]
|
||||
end
|
||||
|
||||
|
@ -1,38 +1,38 @@
|
||||
--
|
||||
-- tests/actions/vstudio/sln2005/projectplatforms.lua
|
||||
-- Validate generation of Visual Studio 2005+ ProjectConfigurationPlatforms block.
|
||||
-- Copyright (c) 2009-2011 Jason Perkins and the Premake project
|
||||
--
|
||||
|
||||
T.vstudio_sln2005_projectplatforms = { }
|
||||
local suite = T.vstudio_sln2005_projectplatforms
|
||||
local sln2005 = premake.vstudio.sln2005
|
||||
|
||||
|
||||
--
|
||||
-- Setup
|
||||
--
|
||||
|
||||
local sln, prj
|
||||
|
||||
function suite.setup()
|
||||
sln, prj = test.createsolution()
|
||||
uuid "C9135098-6047-8142-B10E-D27E7F73FCB3"
|
||||
end
|
||||
|
||||
local function prepare(language)
|
||||
prj.language = language
|
||||
premake.buildconfigs()
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
sln2005.project_platforms(sln)
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- tests/actions/vstudio/sln2005/projectplatforms.lua
|
||||
-- Validate generation of Visual Studio 2005+ ProjectConfigurationPlatforms block.
|
||||
-- Copyright (c) 2009-2011 Jason Perkins and the Premake project
|
||||
--
|
||||
|
||||
T.vstudio_sln2005_projectplatforms = { }
|
||||
local suite = T.vstudio_sln2005_projectplatforms
|
||||
local sln2005 = premake.vstudio.sln2005
|
||||
|
||||
|
||||
--
|
||||
-- Setup
|
||||
--
|
||||
|
||||
local sln, prj
|
||||
|
||||
function suite.setup()
|
||||
sln, prj = test.createsolution()
|
||||
uuid "C9135098-6047-8142-B10E-D27E7F73FCB3"
|
||||
end
|
||||
|
||||
local function prepare(language)
|
||||
prj.language = language
|
||||
premake.bake.buildconfigs()
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
sln2005.project_platforms(sln)
|
||||
end
|
||||
|
||||
|
||||
function suite.ProjectPlatforms_OnMixedLanguages()
|
||||
_ACTION = "vs2005"
|
||||
test.createproject(sln)
|
||||
uuid "AE61726D-187C-E440-BD07-2556188A6565"
|
||||
prepare("C#")
|
||||
test.createproject(sln)
|
||||
uuid "AE61726D-187C-E440-BD07-2556188A6565"
|
||||
prepare("C#")
|
||||
test.capture [[
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
@ -63,9 +63,9 @@
|
||||
function suite.ProjectPlatforms_OnMultiplePlatformsAndMixedModes()
|
||||
_ACTION = "vs2005"
|
||||
platforms { "x32", "x64" }
|
||||
test.createproject(sln)
|
||||
uuid "AE61726D-187C-E440-BD07-2556188A6565"
|
||||
prepare("C#")
|
||||
test.createproject(sln)
|
||||
uuid "AE61726D-187C-E440-BD07-2556188A6565"
|
||||
prepare("C#")
|
||||
test.capture [[
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{C9135098-6047-8142-B10E-D27E7F73FCB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
|
@ -22,7 +22,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
sln2005.project(prj)
|
||||
end
|
||||
|
@ -32,7 +32,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
|
||||
local cfg = premake.getconfig(sln.projects[2])
|
||||
@ -678,7 +678,7 @@
|
||||
language 'C++'
|
||||
kind 'StaticLib'
|
||||
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
sln1.vstudio_configs = premake.vstudio.buildconfigs(sln1)
|
||||
prj1= premake.getconfig(sln1.projects[1])
|
||||
vc200x.generate(prj1)
|
||||
@ -695,7 +695,7 @@
|
||||
language 'C++'
|
||||
kind 'StaticLib'
|
||||
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
sln1.vstudio_configs = premake.vstudio.buildconfigs(sln1)
|
||||
prj1= premake.getconfig(sln1.projects[1])
|
||||
vc200x.generate(prj1)
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
end
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
end
|
||||
|
||||
local function get_buffer()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
premake.vs2010_vcxproj_filters(prj)
|
||||
buffer = io.endcapture()
|
||||
|
@ -24,7 +24,7 @@ end
|
||||
|
||||
local function get_buffer()
|
||||
io.capture()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
premake.vs2010_vcxproj(prj)
|
||||
@ -301,7 +301,7 @@ end
|
||||
|
||||
local function get_managed_buffer(sln,prj)
|
||||
io.capture()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
premake.vs2010_vcxproj(prj)
|
||||
|
@ -16,7 +16,7 @@
|
||||
end
|
||||
|
||||
local function get_buffer()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
premake.vs2010_vcxproj(prj)
|
||||
|
@ -14,7 +14,7 @@
|
||||
end
|
||||
|
||||
local function get_buffer()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
premake.vs2010_vcxproj(prj)
|
||||
|
@ -47,7 +47,7 @@
|
||||
end
|
||||
|
||||
local function get_buffer()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
premake.vs2010_vcxproj(prj)
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
vc200x.debugdir(prj)
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
vc200x.Files(prj)
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
vc200x.header('VisualStudioProject')
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
vc2010.debugdir(prj)
|
||||
|
@ -20,7 +20,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
|
||||
vc2010.files(prj)
|
||||
|
@ -23,7 +23,7 @@
|
||||
end
|
||||
|
||||
local function get_buffer()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
premake.xcode4.workspace_generate(sln)
|
||||
local buffer = io.endcapture()
|
||||
return buffer
|
||||
|
@ -29,7 +29,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
xcode.preparesolution(sln)
|
||||
tr = xcode.buildprjtree(premake.solution.getproject(sln, 1))
|
||||
end
|
||||
|
@ -23,7 +23,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
xcode.preparesolution(sln)
|
||||
local prj = premake.solution.getproject(sln, 1)
|
||||
tr = xcode.buildprjtree(prj)
|
||||
|
@ -21,7 +21,7 @@
|
||||
solution "MySolution"
|
||||
configurations "Debug"
|
||||
project "MyProject"
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
end
|
||||
|
||||
function T.action.teardown()
|
||||
|
@ -47,7 +47,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj = premake.getconfig(prj)
|
||||
cfg = premake.getconfig(prj, "Debug")
|
||||
end
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
local cfg
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
cfg = premake.solution.getproject(sln, 1)
|
||||
end
|
||||
|
||||
|
@ -88,7 +88,7 @@
|
||||
|
||||
function config_bug.bugUpdated_prjBLinksContainsA()
|
||||
config_bug_updated()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
local conf = premake.getconfig(prjB,"DebugDLL","Native")
|
||||
test.isnotnil(conf.links.A)
|
||||
end
|
||||
@ -96,21 +96,21 @@
|
||||
|
||||
function config_bug.kindSetOnProjectConfigBlock_projKindEqualsSharedLib()
|
||||
local proj = kind_set_on_project_config_block()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
local conf = premake.getconfig(proj,"DebugDLL","Native")
|
||||
test.isequal("SharedLib",conf.kind)
|
||||
end
|
||||
|
||||
function config_bug.defineSetOnProjectConfigBlock_projDefineSetIsNotNil()
|
||||
local proj = kind_set_on_project_config_block()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
local conf = premake.getconfig(proj,"DebugDLL","Native")
|
||||
test.isnotnil(conf.defines.defineSet)
|
||||
end
|
||||
|
||||
function config_bug.defineSetInBlockInsideProject ()
|
||||
sharedLibKindSetOnProject_and_linkSetOnSharedLibProjB()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
local conf = premake.getconfig(prjB,"DebugDLL","Native")
|
||||
test.isnotnil(conf.defines.defineSet)
|
||||
end
|
||||
@ -118,7 +118,7 @@
|
||||
|
||||
function config_bug.whenKindSetOnProject_PrjBLinksContainsA()
|
||||
sharedLibKindSetOnProject_and_linkSetOnSharedLibProjB()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
local conf = premake.getconfig(prjB,"DebugDLL","Native")
|
||||
test.isnotnil(conf.links.A)
|
||||
end
|
||||
@ -130,7 +130,7 @@
|
||||
function config_bug.whenKindSetOnConfiguration_prjBLinksContainsA_StaticLib()
|
||||
-- sharedLibKindSetOnConfiguration_and_linkSetOnSharedLibProjB()
|
||||
kindSetOnConfiguration_and_linkSetOnSharedLibProjB("StaticLib")
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
local config = premake.getconfig(prjB,"DebugDLL","Native")
|
||||
test.isnotnil(config.links.A)
|
||||
end
|
||||
@ -138,7 +138,7 @@
|
||||
function config_bug.whenKindSetOnConfiguration_prjBLinksContainsA()
|
||||
-- sharedLibKindSetOnConfiguration_and_linkSetOnSharedLibProjB()
|
||||
kindSetOnConfiguration_and_linkSetOnSharedLibProjB("SharedLib")
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
local config = premake.getconfig(prjB,"DebugDLL","Native")
|
||||
test.isnotnil(config.links.A)
|
||||
end
|
||||
|
@ -19,7 +19,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
prj = premake.solution.getproject(sln, 1)
|
||||
end
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
end
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
end
|
||||
|
||||
local function prepare()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
end
|
||||
|
||||
|
||||
|
@ -17,41 +17,41 @@
|
||||
|
||||
|
||||
function T.platforms.filter_OnNoSolutionPlatforms()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
r = premake.filterplatforms(sln, testmap)
|
||||
test.isequal("", table.concat(r, ":"))
|
||||
end
|
||||
|
||||
function T.platforms.filter_OnNoSolutionPlatformsAndDefault()
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
r = premake.filterplatforms(sln, testmap, "x32")
|
||||
test.isequal("x32", table.concat(r, ":"))
|
||||
end
|
||||
|
||||
function T.platforms.filter_OnIntersection()
|
||||
platforms { "x32", "x64", "Xbox360" }
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
r = premake.filterplatforms(sln, testmap, "x32")
|
||||
test.isequal("x32:x64", table.concat(r, ":"))
|
||||
end
|
||||
|
||||
function T.platforms.filter_OnNoIntersection()
|
||||
platforms { "Universal", "Xbox360" }
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
r = premake.filterplatforms(sln, testmap)
|
||||
test.isequal("", table.concat(r, ":"))
|
||||
end
|
||||
|
||||
function T.platforms.filter_OnNoIntersectionAndDefault()
|
||||
platforms { "Universal", "Xbox360" }
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
r = premake.filterplatforms(sln, testmap, "x32")
|
||||
test.isequal("x32", table.concat(r, ":"))
|
||||
end
|
||||
|
||||
function T.platforms.filter_OnDuplicateKeys()
|
||||
platforms { "Native", "x32" }
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
r = premake.filterplatforms(sln, testmap, "x32")
|
||||
test.isequal("Native", table.concat(r, ":"))
|
||||
end
|
||||
|
@ -29,7 +29,7 @@
|
||||
function T.project.findproject_IsCaseSensitive()
|
||||
local sln = test.createsolution()
|
||||
local prj = test.createproject(sln)
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
test.isnil(premake.findproject("myproject"))
|
||||
end
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
kind "ConsoleApp"
|
||||
uuid "AE61726D-187C-E440-BD07-2556188A6565"
|
||||
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
end
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
kind "ConsoleApp"
|
||||
uuid "AE61726D-187C-E440-BD07-2556188A6565"
|
||||
|
||||
premake.buildconfigs()
|
||||
premake.bake.buildconfigs()
|
||||
end
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user