codetools: check if ppu path exists

git-svn-id: trunk@26898 -
This commit is contained in:
mattias 2010-07-29 10:03:17 +00:00
parent fd285227cc
commit bc861b9767

View File

@ -48,6 +48,7 @@ type
procedure WriteHelp; virtual;
procedure Error(Msg: string; DoWriteHelp: Boolean);
procedure WriteCompilerInfo(ConfigCache: TFPCTargetConfigCache);
procedure WriteNonExistingPPUPaths(ConfigCache: TFPCTargetConfigCache);
procedure WriteDuplicatesInPPUPath(ConfigCache: TFPCTargetConfigCache);
procedure WriteMissingPPUSources(UnitSet: TFPCUnitSetCache);
procedure WriteDuplicateSources(UnitSet: TFPCUnitSetCache);
@ -126,6 +127,7 @@ begin
ConfigCache:=UnitSet.GetConfigCache(false);
writeln('FPCSrcDir=',UnitSet.FPCSourceDirectory);
WriteCompilerInfo(ConfigCache);
WriteNonExistingPPUPaths(ConfigCache);
WriteDuplicatesInPPUPath(ConfigCache);
WriteMissingPPUSources(UnitSet);
WriteDuplicateSources(UnitSet);
@ -207,6 +209,23 @@ begin
writeln('Number of PPU search paths=',ConfigCache.UnitPaths.Count);
end;
procedure TTestFPCSourceUnitRules.WriteNonExistingPPUPaths(
ConfigCache: TFPCTargetConfigCache);
var
SearchPaths: TStrings;
i: Integer;
Dir: String;
begin
SearchPaths:=ConfigCache.UnitPaths;
if SearchPaths=nil then exit;
for i:=0 to SearchPaths.Count-1 do begin
Dir:=CleanAndExpandDirectory(SearchPaths[i]);
if not DirPathExists(Dir) then begin
writeln('WARNING: ppu search path does not exist: ',SearchPaths[i]);
end;
end;
end;
procedure TTestFPCSourceUnitRules.WriteDuplicatesInPPUPath(
ConfigCache: TFPCTargetConfigCache);
var