fix #4417, update news

This commit is contained in:
miere43 2016-07-30 18:25:48 +03:00
commit f16140fc95
3 changed files with 17 additions and 1 deletions

View file

@ -217,6 +217,15 @@ proc testCompileOptionArg*(switch, arg: string, info: TLineInfo): bool =
of "none": result = gOptions * {optOptimizeSpeed, optOptimizeSize} == {}
else: localError(info, errNoneSpeedOrSizeExpectedButXFound, arg)
of "verbosity": result = $gVerbosity == arg
of "app":
case arg.normalize
of "gui": result = contains(gGlobalOptions, optGenGuiApp)
of "console": result = not contains(gGlobalOptions, optGenGuiApp)
of "lib": result = contains(gGlobalOptions, optGenDynLib) and
not contains(gGlobalOptions, optGenGuiApp)
of "staticlib": result = contains(gGlobalOptions, optGenStaticLib) and
not contains(gGlobalOptions, optGenGuiApp)
else: localError(info, errGuiConsoleOrLibExpectedButXFound, arg)
else: invalidCmdLineOption(passCmd1, switch, info)
proc testCompileOption*(switch: string, info: TLineInfo): bool =