dixes #117 - Build duration not always displayed

This commit is contained in:
Basile Burg 2017-02-02 14:12:54 +01:00
parent 7025ca3b7d
commit b9d23ccbcb
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
1 changed files with 17 additions and 6 deletions

View File

@ -352,6 +352,7 @@ type
fUpdateCount: NativeInt; fUpdateCount: NativeInt;
fProject: ICECommonProject; fProject: ICECommonProject;
fFreeProj: ICECommonProject; fFreeProj: ICECommonProject;
fProjBeforeGroup: ICECommonProject;
fDubProject: TCEDubProject; fDubProject: TCEDubProject;
fNativeProject: TCENativeProject; fNativeProject: TCENativeProject;
fProjMru: TCEMRUProjectList; fProjMru: TCEMRUProjectList;
@ -2069,6 +2070,7 @@ procedure TCEMainForm.projCompiled(project: ICECommonProject; success: boolean);
var var
runArgs: string = ''; runArgs: string = '';
runprev: boolean = true; runprev: boolean = true;
groupok: boolean = true;
i: integer; i: integer;
begin begin
fProjActionsLock := false; fProjActionsLock := false;
@ -2094,22 +2096,30 @@ begin
fRunProjAfterCompile := false; fRunProjAfterCompile := false;
fRunProjAfterCompArg := false; fRunProjAfterCompArg := false;
end end
else begin else
begin
fGroupCompilationCnt += 1; fGroupCompilationCnt += 1;
if (fGroupCompilationCnt = fProjectGroup.projectCount) then if (fGroupCompilationCnt = fProjectGroup.projectCount) then
begin begin
for i:= 0 to fProjectGroup.projectCount-1 do for i:= 0 to fProjectGroup.projectCount-1 do
if not fProjectGroup.getProject(i).compiled then if not fProjectGroup.getProject(i).compiled then
begin begin
fMsgs.message('error, the project group is not fully compiled', nil, amcAll, amkErr); groupok := false;
exit; break;
end; end;
if not groupok then
fMsgs.message('error, the project group is not fully compiled', nil, amcAll, amkErr)
else
fMsgs.message('the project group is successfully compiled', nil, amcAll, amkInf); fMsgs.message('the project group is successfully compiled', nil, amcAll, amkInf);
if fAppliOpts.showBuildDuration then if fAppliOpts.showBuildDuration then
begin begin
fCompStart := Time - fCompStart; fCompStart := Time - fCompStart;
fMsgs.message('Group build duration: ' + TimeToStr(fCompStart), nil, amcAll, amkInf); fMsgs.message('Group build duration: ' + TimeToStr(fCompStart), nil, amcAll, amkInf);
end; end;
if assigned(fProjBeforeGroup) then
fProjBeforeGroup.activate;
fProjBeforeGroup := nil;
fIsCompilingGroup := false;
end; end;
end; end;
end; end;
@ -3542,6 +3552,7 @@ begin
exit; exit;
if fProjectGroup.projectCount = 0 then if fProjectGroup.projectCount = 0 then
exit; exit;
fProjBeforeGroup := fProject;
fGroupCompilationCnt := 0; fGroupCompilationCnt := 0;
fIsCompilingGroup := true; fIsCompilingGroup := true;
fMsgs.message('start compiling a project group...', nil, amcAll, amkInf); fMsgs.message('start compiling a project group...', nil, amcAll, amkInf);