mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-15 17:29:40 +02:00
CodeTools: find all *.ini files located in paths declared in fpc.cfg (-Fi option)
git-svn-id: trunk@54438 -
This commit is contained in:
parent
9219f84705
commit
b823ce3277
@ -1871,7 +1871,7 @@ begin
|
||||
Filename:=Directory+ShortFilename;
|
||||
Ext:=LowerCase(ExtractFileExt(ShortFilename));
|
||||
if (Ext='.inc') then begin
|
||||
File_Name:=ExtractFileNameOnly(Filename);
|
||||
File_Name:=ExtractFileName(Filename);
|
||||
if (not Includes.Contains(File_Name))
|
||||
then
|
||||
Includes[File_Name]:=Filename;
|
||||
|
@ -829,6 +829,8 @@ function dbgs(s: TLSDirectiveKind): string; overload;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
CodeToolManager, DefineTemplates;
|
||||
|
||||
// useful procs ----------------------------------------------------------------
|
||||
|
||||
@ -3968,6 +3970,9 @@ var
|
||||
end;
|
||||
|
||||
function SearchCasedInIncPath(const RelFilename: string): boolean;
|
||||
var
|
||||
CfgCache: TFPCTargetConfigCache;
|
||||
UnitSet: TFPCUnitSetCache;
|
||||
begin
|
||||
if FilenameIsAbsolute(FMainSourceFilename) then begin
|
||||
// main source has absolute filename
|
||||
@ -3991,6 +3996,17 @@ var
|
||||
if Result then exit;
|
||||
end;
|
||||
|
||||
// then search the include file from fpc.cfg (-Fi option)
|
||||
UnitSet:=CodeToolBoss.GetUnitSetForDirectory('');
|
||||
if UnitSet<>nil then begin
|
||||
CfgCache:=UnitSet.GetConfigCache(false);
|
||||
if CfgCache.Includes.GetString(AFilename,ExpFilename) then begin
|
||||
NewCode:=LoadSourceCaseLoUp(ExpFilename);
|
||||
Result:=(NewCode<>nil);
|
||||
if Result then exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
// then search the include file in the include path
|
||||
if not HasPathDelims then begin
|
||||
if MissingIncludeFile=nil then
|
||||
|
Loading…
Reference in New Issue
Block a user