mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 18:49:16 +02:00
* patch from Darius that makes lower verbosity output more FPC language independant using -vq. Mantis #18051
git-svn-id: trunk@16591 -
This commit is contained in:
parent
0f15d89f0a
commit
fce3a5ca30
@ -1152,13 +1152,24 @@ var
|
|||||||
BytesRead: longint;
|
BytesRead: longint;
|
||||||
|
|
||||||
function ReadFromStream: longint;
|
function ReadFromStream: longint;
|
||||||
|
|
||||||
const
|
const
|
||||||
READ_BYTES = 2048;
|
READ_BYTES = 2048;
|
||||||
|
|
||||||
|
type
|
||||||
|
TMessages = (mCompiling, mLinking);
|
||||||
|
|
||||||
var
|
var
|
||||||
|
//ifdef the MsgNum so it contains the correct message numbers for each compiler version.
|
||||||
|
MsgNum : array [TMessages] of integer = (3104, 9015);
|
||||||
|
|
||||||
n: longint;
|
n: longint;
|
||||||
BuffPos: longint;
|
BuffPos: longint;
|
||||||
sLine: string;
|
sLine: string;
|
||||||
ch: char;
|
ch: char;
|
||||||
|
msg: TMessages;
|
||||||
|
ipos: integer;
|
||||||
|
snum: string;
|
||||||
begin
|
begin
|
||||||
// make sure we have room
|
// make sure we have room
|
||||||
M.SetSize(BytesRead + READ_BYTES);
|
M.SetSize(BytesRead + READ_BYTES);
|
||||||
@ -1181,8 +1192,15 @@ var
|
|||||||
if Verbose then
|
if Verbose then
|
||||||
writeln(sLine)
|
writeln(sLine)
|
||||||
else
|
else
|
||||||
if (Pos('Compiling', sLine) = 1) or (Pos('Linking', sLine) = 1) then
|
begin
|
||||||
writeln(' ', sLine);
|
for msg := Low(TMessages) to High(TMessages) do
|
||||||
|
begin
|
||||||
|
snum := Format('(%d)', [MsgNum[msg]]);
|
||||||
|
ipos := Pos(snum, sLine);
|
||||||
|
if ipos = 1 then
|
||||||
|
writeln(' ', Copy(sLine, ipos + Length(snum), Length(sLine) - ipos - Length(snum) + 1));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
sLine := '';
|
sLine := '';
|
||||||
BuffPos := M.Position;
|
BuffPos := M.Position;
|
||||||
@ -1209,10 +1227,13 @@ begin
|
|||||||
BytesRead := 0;
|
BytesRead := 0;
|
||||||
|
|
||||||
P := TProcess.Create(nil);
|
P := TProcess.Create(nil);
|
||||||
P.CommandLine := Path + ' ' + ComLine;
|
|
||||||
P.Options := [poUsePipes];
|
|
||||||
|
|
||||||
//writeln('Execute: ', P.CommandLine);
|
if Verbose then
|
||||||
|
P.CommandLine := Path + ' ' + ComLine
|
||||||
|
else
|
||||||
|
P.CommandLine := Path + ' -vq ' + ComLine;
|
||||||
|
|
||||||
|
P.Options := [poUsePipes];
|
||||||
|
|
||||||
P.Execute;
|
P.Execute;
|
||||||
while P.Running do
|
while P.Running do
|
||||||
|
Loading…
Reference in New Issue
Block a user