Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
authorLiam Devine <dmail00@gmail.com>2011-05-18 23:31:08 +0400
committerLiam Devine <dmail00@gmail.com>2011-05-18 23:31:08 +0400
commit882641b32a241f1ccf7c3de17363228a72b6878b (patch)
treef129e3277b19df19ae720eb07b5a70c28277b764 /src/base
parent7b647b1537ed346c11b4be6e95b34d21fa95154c (diff)
English alais' for the Optimize group of flags
Diffstat (limited to 'src/base')
-rw-r--r--src/base/api.lua79
1 files changed, 48 insertions, 31 deletions
diff --git a/src/base/api.lua b/src/base/api.lua
index ecc920d..18369ba 100644
--- a/src/base/api.lua
+++ b/src/base/api.lua
@@ -85,37 +85,54 @@
scope = "config",
isflags = true,
usagecopy = true,
- allowed = {
- "EnableSSE",
- "EnableSSE2",
- "ExtraWarnings",
- "FatalWarnings",
- "FloatFast",
- "FloatStrict",
- "Managed",
- "MFC",
- "NativeWChar",
- "No64BitChecks",
- "NoEditAndContinue",
- "NoExceptions",
- "NoFramePointer",
- "NoImportLib",
- "NoIncrementalLink",
- "NoManifest",
- "NoMinimalRebuild",
- "NoNativeWChar",
- "NoPCH",
- "NoRTTI",
- "Optimize",
- "OptimizeSize",
- "OptimizeSpeed",
- "SEH",
- "StaticRuntime",
- "Symbols",
- "Unicode",
- "Unsafe",
- "WinMain"
- },
+ allowed = function(value)
+
+ local allowed_flags = {
+ EnableSSE = 1,
+ EnableSSE2 = 1,
+ ExtraWarnings = 1,
+ FatalWarnings = 1,
+ FloatFast = 1,
+ FloatStrict = 1,
+ Managed = 1,
+ MFC = 1,
+ NativeWChar = 1,
+ No64BitChecks = 1,
+ NoEditAndContinue = 1,
+ NoExceptions = 1,
+ NoFramePointer = 1,
+ NoImportLib = 1,
+ NoIncrementalLink = 1,
+ NoManifest = 1,
+ NoMinimalRebuild = 1,
+ NoNativeWChar = 1,
+ NoPCH = 1,
+ NoRTTI = 1,
+ Optimize = 1,
+ OptimizeSize = 1,
+ OptimizeSpeed = 1,
+ SEH = 1,
+ StaticRuntime = 1,
+ Symbols = 1,
+ Unicode = 1,
+ Unsafe = 1,
+ WinMain = 1
+ }
+
+ local englishToAmericanSpelling =
+ {
+ Optimise = 'Optimize',
+ OptimiseSize = 'OptimizeSize',
+ OptimiseSpeed = 'OptimizeSpeed'
+ }
+
+ if englishToAmericanSpelling[value] then value = englishToAmericanSpelling[value] end
+
+ if allowed_flags[value] then return value
+ else
+ return nil, "invalid flag"
+ end
+ end,
},
framework =