IDE: only compiling project clean once if state file missing

git-svn-id: trunk@14433 -
This commit is contained in:
mattias 2008-03-05 16:01:13 +00:00
parent 0b76672701
commit d591f6327e

View File

@ -8389,7 +8389,14 @@ var
StateFileAge: LongInt; StateFileAge: LongInt;
AnUnitInfo: TUnitInfo; AnUnitInfo: TUnitInfo;
begin begin
NeedBuildAllFlag:=true; NeedBuildAllFlag:=false;
if (AProject.LastCompilerFilename<>CompilerFilename)
or (AProject.LastCompilerParams<>CompilerParams)
or ((AProject.LastCompilerFileDate>0)
and FileExistsCached(CompilerFilename)
and (FileAge(CompilerFilename)<>AProject.LastCompilerFileDate))
then
NeedBuildAllFlag:=true;
// check state file // check state file
StateFilename:=AProject.GetStateFilename; StateFilename:=AProject.GetStateFilename;
@ -8665,6 +8672,10 @@ begin
pbfSkipLinking in Flags, pbfSkipLinking in Flags,
pbfSkipAssembler in Flags); pbfSkipAssembler in Flags);
if Result<>mrOk then begin if Result<>mrOk then begin
// save state, so that next time the project is not compiled clean
Project1.LastCompilerFilename:=CompilerFilename;
Project1.LastCompilerParams:=CompilerParams;
Project1.LastCompilerFileDate:=FileAge(CompilerFilename);
DoJumpToCompilerMessage(-1,true); DoJumpToCompilerMessage(-1,true);
exit; exit;
end; end;