diff options
44 files changed, 230 insertions, 226 deletions
diff --git a/src/_premake_main.lua b/src/_premake_main.lua index fc10008..59d1519 100644 --- a/src/_premake_main.lua +++ b/src/_premake_main.lua @@ -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 diff --git a/src/base/bake.lua b/src/base/bake.lua index a11c843..aa47985 100644 --- a/src/base/bake.lua +++ b/src/base/bake.lua @@ -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 diff --git a/tests/actions/codeblocks/codeblocks_files.lua b/tests/actions/codeblocks/codeblocks_files.lua index b1bda82..34945f3 100755 --- a/tests/actions/codeblocks/codeblocks_files.lua +++ b/tests/actions/codeblocks/codeblocks_files.lua @@ -20,7 +20,7 @@ end local function prepare() - premake.buildconfigs() + premake.bake.buildconfigs() prj = premake.solution.getproject(sln, 1) codeblocks.files(prj) end diff --git a/tests/actions/codelite/codelite_files.lua b/tests/actions/codelite/codelite_files.lua index f1cdd22..35cbed0 100755 --- a/tests/actions/codelite/codelite_files.lua +++ b/tests/actions/codelite/codelite_files.lua @@ -21,7 +21,7 @@ local function prepare() io.indent = " " - premake.buildconfigs() + premake.bake.buildconfigs() prj = premake.solution.getproject(sln, 1) codelite.files(prj) end diff --git a/tests/actions/make/test_make_linking.lua b/tests/actions/make/test_make_linking.lua index 30c610e..21f454e 100644 --- a/tests/actions/make/test_make_linking.lua +++ b/tests/actions/make/test_make_linking.lua @@ -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() diff --git a/tests/actions/make/test_make_pch.lua b/tests/actions/make/test_make_pch.lua index 40ec47c..8d772d4 100644 --- a/tests/actions/make/test_make_pch.lua +++ b/tests/actions/make/test_make_pch.lua @@ -19,7 +19,7 @@ end local function prepare() - premake.buildconfigs() + premake.bake.buildconfigs() cfg = premake.getconfig(prj, "Debug") end diff --git a/tests/actions/test_clean.lua b/tests/actions/test_clean.lua index b601a7e..bcea777 100644 --- a/tests/actions/test_clean.lua +++ b/tests/actions/test_clean.lua @@ -44,7 +44,7 @@ end local function prepare() - premake.buildconfigs() + premake.bake.buildconfigs() premake.action.call("clean") end diff --git a/tests/actions/vstudio/cs2002/files.lua b/tests/actions/vstudio/cs2002/files.lua index 290cf18..0d97b0a 100755 --- a/tests/actions/vstudio/cs2002/files.lua +++ b/tests/actions/vstudio/cs2002/files.lua @@ -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) diff --git a/tests/actions/vstudio/cs2005/files.lua b/tests/actions/vstudio/cs2005/files.lua index 0ecc1e1..05d5c79 100755 --- a/tests/actions/vstudio/cs2005/files.lua +++ b/tests/actions/vstudio/cs2005/files.lua @@ -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) diff --git a/tests/actions/vstudio/cs2005/projectelement.lua b/tests/actions/vstudio/cs2005/projectelement.lua index a06c1c4..fda6061 100755 --- a/tests/actions/vstudio/cs2005/projectelement.lua +++ b/tests/actions/vstudio/cs2005/projectelement.lua @@ -20,7 +20,7 @@ end local function prepare() - premake.buildconfigs() + premake.bake.buildconfigs() prj = premake.solution.getproject(sln, 1) cs2005.projectelement(prj) end diff --git a/tests/actions/vstudio/cs2005/projectsettings.lua b/tests/actions/vstudio/cs2005/projectsettings.lua index 6c5ad58..2e2e242 100755 --- a/tests/actions/vstudio/cs2005/projectsettings.lua +++ b/tests/actions/vstudio/cs2005/projectsettings.lua @@ -22,7 +22,7 @@ end
local function prepare()
- premake.buildconfigs()
+ premake.bake.buildconfigs()
prj = premake.solution.getproject(sln, 1)
cs2005.projectsettings(prj)
end
diff --git a/tests/actions/vstudio/cs2005/propertygroup.lua b/tests/actions/vstudio/cs2005/propertygroup.lua index 07eba93..f9f5bd8 100755 --- a/tests/actions/vstudio/cs2005/propertygroup.lua +++ b/tests/actions/vstudio/cs2005/propertygroup.lua @@ -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)
diff --git a/tests/actions/vstudio/sln2005/dependencies.lua b/tests/actions/vstudio/sln2005/dependencies.lua index f481c2c..91948d4 100755 --- a/tests/actions/vstudio/sln2005/dependencies.lua +++ b/tests/actions/vstudio/sln2005/dependencies.lua @@ -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)
diff --git a/tests/actions/vstudio/sln2005/header.lua b/tests/actions/vstudio/sln2005/header.lua index b017327..727bb4a 100755 --- a/tests/actions/vstudio/sln2005/header.lua +++ b/tests/actions/vstudio/sln2005/header.lua @@ -20,7 +20,7 @@ end local function prepare() - premake.buildconfigs() + premake.bake.buildconfigs() sln2005.header() end diff --git a/tests/actions/vstudio/sln2005/layout.lua b/tests/actions/vstudio/sln2005/layout.lua index 3b5a620..f0a7d29 100755 --- a/tests/actions/vstudio/sln2005/layout.lua +++ b/tests/actions/vstudio/sln2005/layout.lua @@ -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 diff --git a/tests/actions/vstudio/sln2005/platforms.lua b/tests/actions/vstudio/sln2005/platforms.lua index 82aa9d1..5cecf14 100755 --- a/tests/actions/vstudio/sln2005/platforms.lua +++ b/tests/actions/vstudio/sln2005/platforms.lua @@ -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
+
diff --git a/tests/actions/vstudio/sln2005/projectplatforms.lua b/tests/actions/vstudio/sln2005/projectplatforms.lua index cd40432..7fefe8a 100755 --- a/tests/actions/vstudio/sln2005/projectplatforms.lua +++ b/tests/actions/vstudio/sln2005/projectplatforms.lua @@ -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 diff --git a/tests/actions/vstudio/sln2005/projects.lua b/tests/actions/vstudio/sln2005/projects.lua index 5aacafb..da409c9 100755 --- a/tests/actions/vstudio/sln2005/projects.lua +++ b/tests/actions/vstudio/sln2005/projects.lua @@ -22,7 +22,7 @@ end local function prepare() - premake.buildconfigs() + premake.bake.buildconfigs() prj = premake.solution.getproject(sln, 1) sln2005.project(prj) end diff --git a/tests/actions/vstudio/test_vs200x_vcproj.lua b/tests/actions/vstudio/test_vs200x_vcproj.lua index 2850b5f..1e0f1e6 100644 --- a/tests/actions/vstudio/test_vs200x_vcproj.lua +++ b/tests/actions/vstudio/test_vs200x_vcproj.lua @@ -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) diff --git a/tests/actions/vstudio/test_vs200x_vcproj_linker.lua b/tests/actions/vstudio/test_vs200x_vcproj_linker.lua index aefa9e9..e8327f7 100755 --- a/tests/actions/vstudio/test_vs200x_vcproj_linker.lua +++ b/tests/actions/vstudio/test_vs200x_vcproj_linker.lua @@ -20,7 +20,7 @@ end local function prepare() - premake.buildconfigs() + premake.bake.buildconfigs() end diff --git a/tests/actions/vstudio/test_vs2010_filters.lua b/tests/actions/vstudio/test_vs2010_filters.lua index 7f4f92c..9c672bb 100644 --- a/tests/actions/vstudio/test_vs2010_filters.lua +++ b/tests/actions/vstudio/test_vs2010_filters.lua @@ -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()
diff --git a/tests/actions/vstudio/test_vs2010_flags.lua b/tests/actions/vstudio/test_vs2010_flags.lua index 5af82e5..c09776c 100644 --- a/tests/actions/vstudio/test_vs2010_flags.lua +++ b/tests/actions/vstudio/test_vs2010_flags.lua @@ -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)
diff --git a/tests/actions/vstudio/test_vs2010_links.lua b/tests/actions/vstudio/test_vs2010_links.lua index 3aeb4aa..efdab54 100644 --- a/tests/actions/vstudio/test_vs2010_links.lua +++ b/tests/actions/vstudio/test_vs2010_links.lua @@ -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)
diff --git a/tests/actions/vstudio/test_vs2010_project_kinds.lua b/tests/actions/vstudio/test_vs2010_project_kinds.lua index e87d12a..6117c06 100644 --- a/tests/actions/vstudio/test_vs2010_project_kinds.lua +++ b/tests/actions/vstudio/test_vs2010_project_kinds.lua @@ -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)
diff --git a/tests/actions/vstudio/test_vs2010_vcxproj.lua b/tests/actions/vstudio/test_vs2010_vcxproj.lua index de48f3b..cd4586c 100644 --- a/tests/actions/vstudio/test_vs2010_vcxproj.lua +++ b/tests/actions/vstudio/test_vs2010_vcxproj.lua @@ -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) diff --git a/tests/actions/vstudio/vc200x/debugdir.lua b/tests/actions/vstudio/vc200x/debugdir.lua index a35e115..df5c0b9 100644 --- a/tests/actions/vstudio/vc200x/debugdir.lua +++ b/tests/actions/vstudio/vc200x/debugdir.lua @@ -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) diff --git a/tests/actions/vstudio/vc200x/files.lua b/tests/actions/vstudio/vc200x/files.lua index abff947..facb17d 100644 --- a/tests/actions/vstudio/vc200x/files.lua +++ b/tests/actions/vstudio/vc200x/files.lua @@ -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) diff --git a/tests/actions/vstudio/vc200x/header.lua b/tests/actions/vstudio/vc200x/header.lua index 3e6cbd8..18670ec 100644 --- a/tests/actions/vstudio/vc200x/header.lua +++ b/tests/actions/vstudio/vc200x/header.lua @@ -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') diff --git a/tests/actions/vstudio/vc2010/debugdir.lua b/tests/actions/vstudio/vc2010/debugdir.lua index ae9dfe2..a7b2818 100755 --- a/tests/actions/vstudio/vc2010/debugdir.lua +++ b/tests/actions/vstudio/vc2010/debugdir.lua @@ -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)
diff --git a/tests/actions/vstudio/vc2010/files.lua b/tests/actions/vstudio/vc2010/files.lua index 685f338..bdd8ad1 100755 --- a/tests/actions/vstudio/vc2010/files.lua +++ b/tests/actions/vstudio/vc2010/files.lua @@ -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) diff --git a/tests/actions/xcode/test_xcode4_workspace.lua b/tests/actions/xcode/test_xcode4_workspace.lua index 177f95f..acf3e22 100644 --- a/tests/actions/xcode/test_xcode4_workspace.lua +++ b/tests/actions/xcode/test_xcode4_workspace.lua @@ -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 diff --git a/tests/actions/xcode/test_xcode_dependencies.lua b/tests/actions/xcode/test_xcode_dependencies.lua index e4f0926..e748b2b 100644 --- a/tests/actions/xcode/test_xcode_dependencies.lua +++ b/tests/actions/xcode/test_xcode_dependencies.lua @@ -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 diff --git a/tests/actions/xcode/test_xcode_project.lua b/tests/actions/xcode/test_xcode_project.lua index 9a08ff1..8437ee0 100644 --- a/tests/actions/xcode/test_xcode_project.lua +++ b/tests/actions/xcode/test_xcode_project.lua @@ -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) diff --git a/tests/base/test_action.lua b/tests/base/test_action.lua index b0421df..9250ca0 100644 --- a/tests/base/test_action.lua +++ b/tests/base/test_action.lua @@ -21,7 +21,7 @@ solution "MySolution" configurations "Debug" project "MyProject" - premake.buildconfigs() + premake.bake.buildconfigs() end function T.action.teardown() diff --git a/tests/base/test_baking.lua b/tests/base/test_baking.lua index d270cf4..c446e16 100644 --- a/tests/base/test_baking.lua +++ b/tests/base/test_baking.lua @@ -47,7 +47,7 @@ end local function prepare() - premake.buildconfigs() + premake.bake.buildconfigs() prj = premake.getconfig(prj) cfg = premake.getconfig(prj, "Debug") end diff --git a/tests/base/test_config.lua b/tests/base/test_config.lua index 52cea3e..345d25a 100644 --- a/tests/base/test_config.lua +++ b/tests/base/test_config.lua @@ -18,7 +18,7 @@ local cfg local function prepare() - premake.buildconfigs() + premake.bake.buildconfigs() cfg = premake.solution.getproject(sln, 1) end diff --git a/tests/base/test_config_bug.lua b/tests/base/test_config_bug.lua index 5ef79e1..3ddbe14 100644 --- a/tests/base/test_config_bug.lua +++ b/tests/base/test_config_bug.lua @@ -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
diff --git a/tests/base/test_location.lua b/tests/base/test_location.lua index b688ae9..6bf5c27 100644 --- a/tests/base/test_location.lua +++ b/tests/base/test_location.lua @@ -19,7 +19,7 @@ end local function prepare() - premake.buildconfigs() + premake.bake.buildconfigs() prj = premake.solution.getproject(sln, 1) end diff --git a/tests/test_gmake_cpp.lua b/tests/test_gmake_cpp.lua index bd317f3..5730ca9 100644 --- a/tests/test_gmake_cpp.lua +++ b/tests/test_gmake_cpp.lua @@ -25,7 +25,7 @@ end local function prepare() - premake.buildconfigs() + premake.bake.buildconfigs() end diff --git a/tests/test_gmake_cs.lua b/tests/test_gmake_cs.lua index 68e9b7e..a0e90cb 100644 --- a/tests/test_gmake_cs.lua +++ b/tests/test_gmake_cs.lua @@ -25,7 +25,7 @@ end local function prepare() - premake.buildconfigs() + premake.bake.buildconfigs() end diff --git a/tests/test_platforms.lua b/tests/test_platforms.lua index bb78eb0..ad1bbff 100644 --- a/tests/test_platforms.lua +++ b/tests/test_platforms.lua @@ -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 diff --git a/tests/test_project.lua b/tests/test_project.lua index fea449d..fffecef 100644 --- a/tests/test_project.lua +++ b/tests/test_project.lua @@ -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 diff --git a/tests/test_vs2002_sln.lua b/tests/test_vs2002_sln.lua index a89f8a8..78370cd 100644 --- a/tests/test_vs2002_sln.lua +++ b/tests/test_vs2002_sln.lua @@ -25,7 +25,7 @@ kind "ConsoleApp" uuid "AE61726D-187C-E440-BD07-2556188A6565" - premake.buildconfigs() + premake.bake.buildconfigs() end diff --git a/tests/test_vs2003_sln.lua b/tests/test_vs2003_sln.lua index 5b7c06f..059245f 100644 --- a/tests/test_vs2003_sln.lua +++ b/tests/test_vs2003_sln.lua @@ -25,7 +25,7 @@ kind "ConsoleApp" uuid "AE61726D-187C-E440-BD07-2556188A6565" - premake.buildconfigs() + premake.bake.buildconfigs() end |