mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-17 02:20:43 +01: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;
|
Filename:=Directory+ShortFilename;
|
||||||
Ext:=LowerCase(ExtractFileExt(ShortFilename));
|
Ext:=LowerCase(ExtractFileExt(ShortFilename));
|
||||||
if (Ext='.inc') then begin
|
if (Ext='.inc') then begin
|
||||||
File_Name:=ExtractFileNameOnly(Filename);
|
File_Name:=ExtractFileName(Filename);
|
||||||
if (not Includes.Contains(File_Name))
|
if (not Includes.Contains(File_Name))
|
||||||
then
|
then
|
||||||
Includes[File_Name]:=Filename;
|
Includes[File_Name]:=Filename;
|
||||||
|
|||||||
@ -829,6 +829,8 @@ function dbgs(s: TLSDirectiveKind): string; overload;
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
uses
|
||||||
|
CodeToolManager, DefineTemplates;
|
||||||
|
|
||||||
// useful procs ----------------------------------------------------------------
|
// useful procs ----------------------------------------------------------------
|
||||||
|
|
||||||
@ -3968,6 +3970,9 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function SearchCasedInIncPath(const RelFilename: string): boolean;
|
function SearchCasedInIncPath(const RelFilename: string): boolean;
|
||||||
|
var
|
||||||
|
CfgCache: TFPCTargetConfigCache;
|
||||||
|
UnitSet: TFPCUnitSetCache;
|
||||||
begin
|
begin
|
||||||
if FilenameIsAbsolute(FMainSourceFilename) then begin
|
if FilenameIsAbsolute(FMainSourceFilename) then begin
|
||||||
// main source has absolute filename
|
// main source has absolute filename
|
||||||
@ -3991,6 +3996,17 @@ var
|
|||||||
if Result then exit;
|
if Result then exit;
|
||||||
end;
|
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
|
// then search the include file in the include path
|
||||||
if not HasPathDelims then begin
|
if not HasPathDelims then begin
|
||||||
if MissingIncludeFile=nil then
|
if MissingIncludeFile=nil then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user