summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/genie/src/base/config.lua
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/genie/src/base/config.lua')
-rw-r--r--3rdparty/genie/src/base/config.lua32
1 files changed, 25 insertions, 7 deletions
diff --git a/3rdparty/genie/src/base/config.lua b/3rdparty/genie/src/base/config.lua
index f4ddb6b4575..a27d7f2ac19 100644
--- a/3rdparty/genie/src/base/config.lua
+++ b/3rdparty/genie/src/base/config.lua
@@ -11,7 +11,7 @@
local config = premake.config
---
+--
-- Determine if a configuration represents a "debug" or "release" build.
-- This controls the runtime library selected for Visual Studio builds
-- (and might also be useful elsewhere).
@@ -42,11 +42,29 @@
--
+-- Return an iterator over each file included in this configuration.
+--
+
+ function premake.config.eachfile(cfg)
+ local i = 0
+ local t = cfg.files
+ return function ()
+ i = i + 1
+ if (i <= #t) then
+ local fcfg = cfg.__fileconfigs[t[i]]
+ fcfg.vpath = premake.project.getvpath(cfg.project, fcfg.name)
+ return fcfg
+ end
+ end
+ end
+
+
+--
-- Determines if this configuration can be linked incrementally.
---
-
+--
+
function premake.config.isincrementallink(cfg)
- if cfg.kind == "StaticLib"
+ if cfg.kind == "StaticLib"
or config.isoptimizedbuild(cfg.flags)
or cfg.flags.NoIncrementalLink then
return false
@@ -56,11 +74,11 @@
--
--- Determine if this configuration uses one of the optimize flags.
--- Optimized builds get different treatment, such as full linking
+-- Determine if this configuration uses one of the optimize flags.
+-- Optimized builds get different treatment, such as full linking
-- instead of incremental.
--
-
+
function premake.config.isoptimizedbuild(flags)
return flags.Optimize or flags.OptimizeSize or flags.OptimizeSpeed
end