English alais' for the Optimize group of flags

This commit is contained in:
Liam Devine 2011-05-18 20:31:08 +01:00
parent dba4adab62
commit 7a89211a38
3 changed files with 66 additions and 31 deletions

View File

@ -23,6 +23,7 @@
* Patch 3043933 Allow gmake to use static lib when shared lib of same name exists (Jonathan Derque)
* Bug 3294459: vs10 x86_64 using incorrect debug format for minimal rebuild (learner)
* Bug 3297634: Special characters in directory name Xcode3 (jdale)
* Feature 3100194: English alais' for Optimize flags
-------
4.3

View File

@ -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 =

View File

@ -26,7 +26,24 @@
--
-- Debug/Release build testing
--
function suite.IsDebug_ReturnsFalse_EnglishSpellingOfOptimiseFlag()
flags { "Optimise" }
prepare()
return test.isfalse(premake.config.isdebugbuild(cfg))
end
function suite.IsDebug_ReturnsFalse_EnglishSpellingOfOptimiseSizeFlag()
flags { "OptimiseSize" }
prepare()
return test.isfalse(premake.config.isdebugbuild(cfg))
end
function suite.IsDebug_ReturnsFalse_EnglishSpellingOfOptimiseSpeedFlag()
flags { "OptimiseSpeed" }
prepare()
return test.isfalse(premake.config.isdebugbuild(cfg))
end
function suite.IsDebug_ReturnsFalse_OnOptimizeFlag()
flags { "Optimize" }
prepare()