mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 21:10:42 +02:00
codetools: find sources in fpc unit search paths
git-svn-id: trunk@32240 -
This commit is contained in:
parent
d7f55a0794
commit
73d34d3088
@ -5630,7 +5630,7 @@ begin
|
||||
debugln(['TCodeToolManager.DirectoryCachePoolGetUnitFromSet outdated UnitSet="',dbgstr(UnitSet),'"']);
|
||||
exit;
|
||||
end;
|
||||
Result:=UnitSetCache.GetUnitSrcFile(AnUnitName);
|
||||
Result:=UnitSetCache.GetUnitSrcFile(AnUnitName,false);
|
||||
end;
|
||||
|
||||
function TCodeToolManager.DirectoryCachePoolGetCompiledUnitFromSet(
|
||||
|
@ -8810,7 +8810,7 @@ begin
|
||||
if ConfigCache.HasPPUs then begin
|
||||
// but there are other ppu files
|
||||
{$IFDEF ShowTriedUnits}
|
||||
debugln(['TFPCUnitSetCache.GetUnitSrcFile Unit="',AnUnitName,'" unit has no ppu file in FPC path, but there are other']);
|
||||
debugln(['TFPCUnitSetCache.GetUnitSrcFile Unit="',AnUnitName,'" unit has no ppu file in FPC path, but there are other ppu']);
|
||||
{$ENDIF}
|
||||
exit;
|
||||
end else begin
|
||||
@ -8828,8 +8828,19 @@ begin
|
||||
end;
|
||||
if Tree<>nil then begin
|
||||
Result:=Tree[AnUnitName];
|
||||
if Result<>'' then
|
||||
if (Result<>'') and (not FilenameIsAbsolute(Result)) then
|
||||
Result:=FPCSourceDirectory+Result;
|
||||
if (Result='') then begin
|
||||
// maybe the source is in the fpc search path
|
||||
ConfigCache:=GetConfigCache(false);
|
||||
if ConfigCache<>nil then begin
|
||||
Result:=ConfigCache.Units[AnUnitName];
|
||||
if (CompareFileExt(Result,'ppu',false)=0) then begin
|
||||
Result:='';
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
{$IFDEF ShowTriedUnits}
|
||||
debugln(['TFPCUnitSetCache.GetUnitSrcFile Unit="',AnUnitName,'" Result=',Result]);
|
||||
{$ENDIF}
|
||||
|
@ -1223,7 +1223,7 @@ begin
|
||||
Result:=FindUnitSourceInCleanSearchPath(AUnitName,SrcPath,AnyCase);
|
||||
end;
|
||||
if Result='' then begin
|
||||
// search in unit links
|
||||
// search in unit set
|
||||
{$IFDEF ShowTriedUnits}
|
||||
DebugLn(['TCTDirectoryCache.FindUnitSourceInCompletePath unit ',AUnitName,' not found in SrcPath="',SrcPath,'" Directory="',Directory,'" searchin in unitset ...']);
|
||||
{$ENDIF}
|
||||
|
Loading…
Reference in New Issue
Block a user