[+] Additional options
[*] Refactor
This commit is contained in:
parent
ee8c26f058
commit
32a918011f
@ -7,7 +7,7 @@ local kGenericTasks = {}
|
||||
local __pRunTasks = function(processor, object, map, tasks, inc)
|
||||
end
|
||||
|
||||
local function __pushFilter(obj, key, callback, expandArray)
|
||||
local function filterForKey(obj, key, callback, expandArray)
|
||||
if (not obj) then
|
||||
return
|
||||
end
|
||||
@ -15,7 +15,7 @@ local function __pushFilter(obj, key, callback, expandArray)
|
||||
local function runCallbackFe(value, key, callback, expandArray, isArray)
|
||||
if (expandArray and isArray) then
|
||||
auForEach(value, function(val)
|
||||
__pushFilter(val, key, callback, false)
|
||||
filterForKey(val, key, callback, false)
|
||||
end)
|
||||
else
|
||||
callback(value)
|
||||
@ -101,7 +101,7 @@ end
|
||||
|
||||
local function auBlockProjectKeyDefines(processor, value)
|
||||
-- Required for dependent and current processor // global library configuration
|
||||
__pushFilter(value, "value", defines)
|
||||
filterForKey(value, "value", defines)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyIncludes(processor, value, map, tasks, inc)
|
||||
@ -110,16 +110,16 @@ end
|
||||
|
||||
local function auBlockProjectKeyFeatures(processor, value)
|
||||
-- Runs special features / plugins defined in sAbsScripts/features
|
||||
__pushFilter(value, "value", auAddFeature, true)
|
||||
filterForKey(value, "value", auAddFeature, true)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyExcludes(processor, value)
|
||||
__pushFilter(value, "value", removefiles)
|
||||
filterForKey(value, "value", removefiles)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeySources(processor, value)
|
||||
--files(value) -- NOTE: this was once path .. / .. value
|
||||
__pushFilter(value, "value", files)
|
||||
filterForKey(value, "value", files)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeySourcePaths(processor, value)
|
||||
@ -142,32 +142,32 @@ local function auBlockProjectKeyEval(processor, value, map, tasksMask)
|
||||
return
|
||||
end
|
||||
|
||||
__pushFilter(value, nil, function(value)
|
||||
filterForKey(value, nil, function(value)
|
||||
__pRunTasks(processor, value, map, tasksMask, true)
|
||||
end)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyDefines(processor, value)
|
||||
__pushFilter(value, "value", defines)
|
||||
filterForKey(value, "value", defines)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyImplDefines(processor, value)
|
||||
__pushFilter(value, "value", defines)
|
||||
filterForKey(value, "value", defines)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyStaticImplDefines(processor, value)
|
||||
if (not processor:getMeta().isStatic) then
|
||||
return
|
||||
end
|
||||
__pushFilter(value, "value", defines)
|
||||
filterForKey(value, "value", defines)
|
||||
end
|
||||
|
||||
local function auBlockKeyFeature(processor, value)
|
||||
__pushFilter(value, "value", auAddFeature, true)
|
||||
filterForKey(value, "value", auAddFeature, true)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyImplIncludes(processor, value)
|
||||
__pushFilter(value, "value", _includeDirectoryEx)
|
||||
filterForKey(value, "value", _includeDirectoryEx)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyClangIgnore(processor, value)
|
||||
@ -186,7 +186,7 @@ local function _auBlockProjectKeyLinks(value, processor)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyLinks(processor, value)
|
||||
__pushFilter(value, "value", function(val)
|
||||
filterForKey(value, "value", function(val)
|
||||
links(__translate(processor, val))
|
||||
end, true)
|
||||
end
|
||||
@ -206,7 +206,7 @@ end
|
||||
|
||||
|
||||
local function auBlockProjectKeyBuildEvent(processor, value)
|
||||
__pushFilter(value, nil, function(value)
|
||||
filterForKey(value, nil, function(value)
|
||||
local type = ""
|
||||
|
||||
if (value.lua) then
|
||||
@ -254,7 +254,7 @@ local function handleActionCommon(action, cb, ...)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyBuildAction(processor, value, map, tasks)
|
||||
__pushFilter(value, nil, function(value)
|
||||
filterForKey(value, nil, function(value)
|
||||
handleActionCommon(value, function(thenblock)
|
||||
auBlockProjectKeyEval(processor, thenblock, map, tasks)
|
||||
end)
|
||||
@ -278,25 +278,25 @@ local function handleDepends(processor, dep, soft)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyDepends(processor, value)
|
||||
__pushFilter(value, "value", function(obj)
|
||||
filterForKey(value, "value", function(obj)
|
||||
handleDepends(processor, obj, false)
|
||||
end, true)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyDllimport(processor, value)
|
||||
__pushFilter(value, "value", defines, true)
|
||||
filterForKey(value, "value", defines, true)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyDllexport(processor, value)
|
||||
__pushFilter(value, "value", defines, true)
|
||||
filterForKey(value, "value", defines, true)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyDllexport(processor, value)
|
||||
__pushFilter(value, "value", defines, true)
|
||||
filterForKey(value, "value", defines, true)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyResourceScript(processor, value, map, tasks)
|
||||
__pushFilter(value, nil, function(value)
|
||||
filterForKey(value, nil, function(value)
|
||||
auForEachKV(value, function(key, value)
|
||||
if (auIsArray(value)) then
|
||||
auAddResource(value, nil, key)
|
||||
@ -308,11 +308,11 @@ local function auBlockProjectKeyResourceScript(processor, value, map, tasks)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyProtobuf(processor, value)
|
||||
__pushFilter(value, "files", auProtobufFiles, true)
|
||||
filterForKey(value, "files", auProtobufFiles, true)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyVala(processor, value)
|
||||
__pushFilter(value, nil, function(value)
|
||||
filterForKey(value, nil, function(value)
|
||||
|
||||
local sources = {}
|
||||
local gir = Aurora.Settings.sValaGirs
|
||||
@ -353,7 +353,7 @@ local function auBlockProjectKeyVala(processor, value)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeyUnpack(processor, value)
|
||||
__pushFilter(value, "files", function(fileName)
|
||||
filterForKey(value, "files", function(fileName)
|
||||
local referencePath = path.join(Aurora.Settings.sAbsRepoScripts, fileName)
|
||||
local destinationPath = path.join(processor:getMeta().path, fileName)
|
||||
|
||||
@ -365,10 +365,10 @@ end
|
||||
|
||||
local function auBlockProjectKeyM4(processor, value)
|
||||
processor.m4_files = processor.m4_files or {}
|
||||
__pushFilter(value, nil, function(obj)
|
||||
filterForKey(value, nil, function(obj)
|
||||
for fk, fv in pairs(obj) do
|
||||
local fileTbl = info.m4_files[fk] or {}
|
||||
info.m4_files[fk] = fileTbl
|
||||
local fileTbl = processor.m4_files[fk] or {}
|
||||
processor.m4_files[fk] = fileTbl
|
||||
|
||||
for k, v in pairs(fv) do
|
||||
fileTbl[k] = v
|
||||
@ -378,31 +378,31 @@ local function auBlockProjectKeyM4(processor, value)
|
||||
end
|
||||
|
||||
local function auBlockProjectKeySoftDepends(processor, value)
|
||||
__pushFilter(value, "value", function(obj)
|
||||
filterForKey(value, "value", function(obj)
|
||||
handleDepends(processor, obj, true)
|
||||
end, true)
|
||||
end
|
||||
|
||||
local function auBlockProjectRefKeyInclSoftDepends(processor, value, taskMap, taskArray, inc, resolve)
|
||||
__pushFilter(value, "value", function(obj)
|
||||
filterForKey(value, "value", function(obj)
|
||||
resolve(processor:translateDep(obj), false)
|
||||
end, true)
|
||||
end
|
||||
|
||||
local function auBlockProjectRefKeyInclDepends(processor, value, taskMap, taskArray, inc, resolve)
|
||||
__pushFilter(value, "value", function(obj)
|
||||
filterForKey(value, "value", function(obj)
|
||||
resolve(processor:translateDep(obj), false)
|
||||
end, true)
|
||||
end
|
||||
|
||||
local function auBlockProjectRefKeyDepends(processor, value, taskMap, taskArray, inc, resolve)
|
||||
__pushFilter(value, "value", function(obj)
|
||||
filterForKey(value, "value", function(obj)
|
||||
resolve(processor:translateDep(obj), false)
|
||||
end, true)
|
||||
end
|
||||
|
||||
local function auBlockProjectRefKeySoftDepends(processor, value, taskMap, taskArray, inc, resolve)
|
||||
__pushFilter(value, "value", function(obj)
|
||||
filterForKey(value, "value", function(obj)
|
||||
resolve(processor:translateDep(obj), true)
|
||||
end, true)
|
||||
end
|
||||
@ -460,7 +460,6 @@ auProjectBlockHandlers =
|
||||
unpack = auBlockProjectKeyUnpack,
|
||||
m4 = auBlockProjectKeyM4
|
||||
}
|
||||
|
||||
auProjectBlockHandlers["soft-depends"] = auBlockProjectKeySoftDepends
|
||||
|
||||
local auProjectRefHandlers =
|
||||
@ -482,13 +481,14 @@ auProjectRefHandlers["include-soft-depends"] = auBlockProjectRefKeyInclSoftDepen
|
||||
auProjectRefHandlers["include-depends"] = auBlockProjectRefKeyInclDepends
|
||||
auProjectRefHandlers["depends"] = auBlockProjectRefKeyDepends
|
||||
|
||||
kGenericTasks = {"sourcePaths", "includes","include", "sources",
|
||||
"impDefines", "implDefines", "implementationDefines",
|
||||
"impInclude", "implInclude", "impIncludes", "implIncludes", "clangIgnore",
|
||||
"msvcIgnore", "excludes", "depends", "require",
|
||||
"eval", "lua", "events", "actions", "staticImpDefines", "features",
|
||||
"links", "soft-depends", "resourceScript", "protobuf", "vala", "unpack", "m4"
|
||||
}
|
||||
kGenericTasks = {
|
||||
"sourcePaths", "includes","include", "sources", "clangIgnore",
|
||||
"impDefines", "implDefines", "implementationDefines",
|
||||
"impInclude", "implInclude", "impIncludes", "implIncludes",
|
||||
"msvcIgnore", "excludes", "depends", "require", "m4", "vala",
|
||||
"eval", "lua", "events", "actions", "staticImpDefines", "features",
|
||||
"links", "soft-depends", "resourceScript", "protobuf", "unpack"
|
||||
}
|
||||
|
||||
local kReferenceTasks = {"eval", "includes", "include", "includes"} --, "features"}
|
||||
-- , "include-depends", "include-soft-depends"
|
||||
@ -508,7 +508,15 @@ local function postRunMain(processor)
|
||||
end
|
||||
|
||||
local function __pRunLinkTasks(processor, object, resolve)
|
||||
__pRunTasks(processor, object, auProjectRefHandlers, { "links", "depends", "soft-depends", "eval", "linkDepends", "defines", "actions"}, false, resolve)
|
||||
__pRunTasks(processor,
|
||||
object,
|
||||
auProjectRefHandlers,
|
||||
{
|
||||
"links", "depends", "soft-depends", "eval",
|
||||
"linkDepends", "defines", "actions"
|
||||
},
|
||||
false,
|
||||
resolve)
|
||||
end
|
||||
|
||||
local function __pRunIncludeTasks(processor, object, isIncludeLocalProject)
|
||||
|
@ -13,10 +13,18 @@ local function auStartSolution(sln)
|
||||
floatingpoint "strict" -- x87 sucks so lets be mean. it's a nice to have when working with js runtimes
|
||||
justmycode "Off" -- some premake warning bug
|
||||
|
||||
-- TODO (reece): consider breaking these out into settings
|
||||
staticruntime "On"
|
||||
editandcontinue "Off"
|
||||
|
||||
if (Aurora.Settings.bStaticRuntime) then
|
||||
staticruntime "On"
|
||||
else
|
||||
staticruntime "Off"
|
||||
end
|
||||
|
||||
if (Aurora.Settings.bEditAndCont) then
|
||||
editandcontinue "On"
|
||||
else
|
||||
editandcontinue "Off"
|
||||
end
|
||||
|
||||
flags
|
||||
{
|
||||
"NoPCH"
|
||||
|
@ -92,6 +92,10 @@ auSetDefault(settings, "aNamesOfConfigs", {"Debug", "Stage", "Ship"})
|
||||
--
|
||||
auSetDefault(settings, "bDefinePartialABIInTargetName", true)
|
||||
|
||||
auSetDefault(settings, "bStaticRuntime", true)
|
||||
|
||||
auSetDefault(settings, "bEditAndCont", false)
|
||||
|
||||
-- Disable common warnings.
|
||||
-- Rationalized as other big projects tend to disable them, builds on linuxs were ugly, and clang and msvc would seethe at different things, and I don't care.
|
||||
-- You should probably turn this off once in a while to check for hidden issues
|
||||
|
Loading…
Reference in New Issue
Block a user