lazarus-ccr/components/cmdlinecfg/trunk/testmakeline.lpr
skalogryz 6ee63d67b1 cmdlinecfg: the initial files commit
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2802 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-10-02 03:46:44 +00:00

32 lines
781 B
ObjectPascal

program testmakeline;
{$mode delphi}{$H+}
uses
Classes, cmdlinecfg, cmdlinecfgutils, cmdlinecfgjson;
var
cfg : TCmdLineCfg;
vals : TList;
begin
if ParamCount=0 then begin
writeln('please specify a configuration file');
Exit;
end;
cfg := TCmdLineCfg.Create;
vals:= TList.Create;
try
CmdLineCfgJSONReadFile(ParamStr(1), cfg);
vals.Add(TCmdLineOptionValue.Create( cfg.FindOption('instructionset'), 'PENTIUM' ));
vals.Add(TCmdLineOptionValue.Create( cfg.FindOption('generatelinkmap'), '-1' ));
vals.Add(TCmdLineOptionValue.Create( cfg.FindOption('shownotes'), '1' ));
vals.Add(TCmdLineOptionValue.Create( cfg.FindOption('showhints'), '1' ));
writeln( CmdLineMakeOptions ( vals ));
finally
vals.Free;
cfg.Free;
end;
end.