You've already forked lazarus-ccr
instantfpc: added option --skip-run
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2015 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -68,11 +68,13 @@ begin
|
|||||||
writeln;
|
writeln;
|
||||||
writeln(' --compiler=<path to compiler>');
|
writeln(' --compiler=<path to compiler>');
|
||||||
writeln(' Normally fpc is searched in PATH and used as compiler.');
|
writeln(' Normally fpc is searched in PATH and used as compiler.');
|
||||||
|
writeln;
|
||||||
|
writeln(' --skip-run');
|
||||||
|
writeln(' Do not execute the program. Useful to test if script compiles.');
|
||||||
Halt(0);
|
Halt(0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure DisplayCache;
|
Procedure DisplayCache;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
write(GetCacheDir);
|
write(GetCacheDir);
|
||||||
Halt(0);
|
Halt(0);
|
||||||
@ -88,11 +90,11 @@ var
|
|||||||
OutputFilename: String;
|
OutputFilename: String;
|
||||||
ExeExt: String;
|
ExeExt: String;
|
||||||
E : String;
|
E : String;
|
||||||
|
RunIt: boolean = true;
|
||||||
|
|
||||||
// Return true if filename found.
|
// Return true if filename found.
|
||||||
|
|
||||||
Function InterpretParam(p : String) : boolean;
|
Function InterpretParam(p : String) : boolean;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=False;
|
Result:=False;
|
||||||
if (P='') then exit;
|
if (P='') then exit;
|
||||||
@ -115,6 +117,10 @@ begin
|
|||||||
delete(P,1,12);
|
delete(P,1,12);
|
||||||
SetCacheDir(p);
|
SetCacheDir(p);
|
||||||
end
|
end
|
||||||
|
else if p='--skip-run' then
|
||||||
|
begin
|
||||||
|
RunIt:=false;
|
||||||
|
end
|
||||||
else if (P<>'') and (p[1]<>'-') then
|
else if (P<>'') and (p[1]<>'-') then
|
||||||
begin
|
begin
|
||||||
Filename:=p;
|
Filename:=p;
|
||||||
@ -182,6 +188,7 @@ begin
|
|||||||
Compile(CacheFilename,OutputFilename);
|
Compile(CacheFilename,OutputFilename);
|
||||||
end;
|
end;
|
||||||
// run
|
// run
|
||||||
|
if RunIt then
|
||||||
Run(OutputFilename);
|
Run(OutputFilename);
|
||||||
finally
|
finally
|
||||||
// memory is freed by OS, but for debugging puposes you can do it manually
|
// memory is freed by OS, but for debugging puposes you can do it manually
|
||||||
|
Reference in New Issue
Block a user