mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 23:35:57 +02:00
IDE: check if project needs compile: check lfm too, bug #21206
git-svn-id: trunk@35910 -
This commit is contained in:
parent
2a417ff43a
commit
7763dcfc36
18
ide/main.pp
18
ide/main.pp
@ -11567,6 +11567,7 @@ var
|
||||
StateFilename: String;
|
||||
StateFileAge: LongInt;
|
||||
AnUnitInfo: TUnitInfo;
|
||||
LFMFilename: String;
|
||||
begin
|
||||
NeedBuildAllFlag:=false;
|
||||
if (AProject.LastCompilerFilename<>CompilerFilename)
|
||||
@ -11633,10 +11634,19 @@ begin
|
||||
// check project files
|
||||
AnUnitInfo:=AProject.FirstPartOfProject;
|
||||
while AnUnitInfo<>nil do begin
|
||||
if FileExistsCached(AnUnitInfo.Filename)
|
||||
and (StateFileAge<FileAgeCached(AnUnitInfo.Filename)) then begin
|
||||
DebugLn('TMainIDE.CheckIfProjectNeedsCompilation Src has changed ',AProject.IDAsString,' ',AnUnitInfo.Filename);
|
||||
exit(mrYes);
|
||||
if FileExistsCached(AnUnitInfo.Filename) then begin
|
||||
if (StateFileAge<FileAgeCached(AnUnitInfo.Filename)) then begin
|
||||
DebugLn('TMainIDE.CheckIfProjectNeedsCompilation Src has changed ',AProject.IDAsString,' ',AnUnitInfo.Filename);
|
||||
exit(mrYes);
|
||||
end;
|
||||
if AnUnitInfo.ComponentName<>'' then begin
|
||||
LFMFilename:=ChangeFileExt(AnUnitInfo.Filename,'.lfm');
|
||||
if FileExistsCached(LFMFilename)
|
||||
and (StateFileAge<FileAgeCached(LFMFilename)) then begin
|
||||
DebugLn('TMainIDE.CheckIfProjectNeedsCompilation LFM has changed ',AProject.IDAsString,' ',LFMFilename);
|
||||
exit(mrYes);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
AnUnitInfo:=AnUnitInfo.NextPartOfProject;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user