mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 18:39:05 +02:00
IDE: project directory is now added to the include path of all project directories
git-svn-id: trunk@10142 -
This commit is contained in:
parent
44743b499f
commit
9b795b8260
@ -1109,7 +1109,8 @@ begin
|
||||
FuncData:=PReadFunctionData(Data);
|
||||
Result:=false;
|
||||
if Project1<>nil then begin
|
||||
FuncData^.Result:=Project1.CompilerOptions.GetIncludePath(false);
|
||||
FuncData^.Result:=
|
||||
Project1.CompilerOptions.GetIncludePath(false,coptParsed,true);
|
||||
Result:=true;
|
||||
end;
|
||||
end;
|
||||
|
@ -330,21 +330,27 @@ type
|
||||
function GetDefaultMainSourceFileName: string; virtual;
|
||||
function NeedsLinkerOpts: boolean;
|
||||
function GetUnitPath(RelativeToBaseDir: boolean;
|
||||
Parsed: TCompilerOptionsParseType = coptParsed): string;
|
||||
Parsed: TCompilerOptionsParseType = coptParsed;
|
||||
WithProjDir: boolean = false): string;
|
||||
function GetIncludePath(RelativeToBaseDir: boolean;
|
||||
Parsed: TCompilerOptionsParseType = coptParsed): string;
|
||||
Parsed: TCompilerOptionsParseType = coptParsed;
|
||||
WithProjDir: boolean = false): string;
|
||||
function GetSrcPath(RelativeToBaseDir: boolean;
|
||||
Parsed: TCompilerOptionsParseType = coptParsed): string;
|
||||
Parsed: TCompilerOptionsParseType = coptParsed;
|
||||
WithProjDir: boolean = false): string;
|
||||
function GetLibraryPath(RelativeToBaseDir: boolean;
|
||||
Parsed: TCompilerOptionsParseType = coptParsed): string;
|
||||
Parsed: TCompilerOptionsParseType = coptParsed;
|
||||
WithProjDir: boolean = false): string;
|
||||
function GetUnitOutPath(RelativeToBaseDir: boolean;
|
||||
Parsed: TCompilerOptionsParseType = coptParsed): string;
|
||||
function GetObjectPath(RelativeToBaseDir: boolean;
|
||||
Parsed: TCompilerOptionsParseType = coptParsed): string;
|
||||
Parsed: TCompilerOptionsParseType = coptParsed;
|
||||
WithProjDir: boolean = false): string;
|
||||
function GetPath(Option: TParsedCompilerOptString;
|
||||
InheritedOption: TInheritedCompilerOption;
|
||||
RelativeToBaseDir: boolean;
|
||||
Parsed: TCompilerOptionsParseType): string;
|
||||
Parsed: TCompilerOptionsParseType;
|
||||
WithProjDir: boolean): string;
|
||||
function GetParsedPath(Option: TParsedCompilerOptString;
|
||||
InheritedOption: TInheritedCompilerOption;
|
||||
RelativeToBaseDir: boolean): string;
|
||||
@ -355,7 +361,7 @@ type
|
||||
InheritedOption: TInheritedCompilerOption;
|
||||
RelativeToBaseDir: boolean): string;
|
||||
function ShortenPath(const SearchPath: string;
|
||||
MakeAlwaysRelative: boolean): string;
|
||||
MakeAlwaysRelative: boolean): string;
|
||||
function GetCustomOptions(Parsed: TCompilerOptionsParseType = coptParsed): string;
|
||||
function GetEffectiveLCLWidgetType: string;
|
||||
public
|
||||
@ -1450,27 +1456,29 @@ begin
|
||||
end;
|
||||
|
||||
function TBaseCompilerOptions.GetUnitPath(RelativeToBaseDir: boolean;
|
||||
Parsed: TCompilerOptionsParseType = coptParsed): string;
|
||||
Parsed: TCompilerOptionsParseType; WithProjDir: boolean): string;
|
||||
begin
|
||||
Result:=GetPath(pcosUnitPath,icoUnitPath,RelativeToBaseDir,Parsed);
|
||||
Result:=GetPath(pcosUnitPath,icoUnitPath,RelativeToBaseDir,Parsed,WithProjDir);
|
||||
end;
|
||||
|
||||
function TBaseCompilerOptions.GetIncludePath(RelativeToBaseDir: boolean;
|
||||
Parsed: TCompilerOptionsParseType): string;
|
||||
Parsed: TCompilerOptionsParseType; WithProjDir: boolean): string;
|
||||
begin
|
||||
Result:=GetPath(pcosIncludePath,icoIncludePath,RelativeToBaseDir,Parsed);
|
||||
Result:=GetPath(pcosIncludePath,icoIncludePath,RelativeToBaseDir,Parsed,
|
||||
WithProjDir);
|
||||
end;
|
||||
|
||||
function TBaseCompilerOptions.GetSrcPath(RelativeToBaseDir: boolean;
|
||||
Parsed: TCompilerOptionsParseType): string;
|
||||
Parsed: TCompilerOptionsParseType; WithProjDir: boolean): string;
|
||||
begin
|
||||
Result:=GetPath(pcosSrcPath,icoSrcPath,RelativeToBaseDir,Parsed);
|
||||
Result:=GetPath(pcosSrcPath,icoSrcPath,RelativeToBaseDir,Parsed,WithProjDir);
|
||||
end;
|
||||
|
||||
function TBaseCompilerOptions.GetLibraryPath(RelativeToBaseDir: boolean;
|
||||
Parsed: TCompilerOptionsParseType): string;
|
||||
Parsed: TCompilerOptionsParseType; WithProjDir: boolean): string;
|
||||
begin
|
||||
Result:=GetPath(pcosLibraryPath,icoLibraryPath,RelativeToBaseDir,Parsed);
|
||||
Result:=GetPath(pcosLibraryPath,icoLibraryPath,RelativeToBaseDir,Parsed,
|
||||
WithProjDir);
|
||||
end;
|
||||
|
||||
function TBaseCompilerOptions.GetUnitOutPath(RelativeToBaseDir: boolean;
|
||||
@ -1487,14 +1495,17 @@ begin
|
||||
end;
|
||||
|
||||
function TBaseCompilerOptions.GetObjectPath(RelativeToBaseDir: boolean;
|
||||
Parsed: TCompilerOptionsParseType): string;
|
||||
Parsed: TCompilerOptionsParseType; WithProjDir: boolean): string;
|
||||
begin
|
||||
Result:=GetPath(pcosObjectPath,icoObjectPath,RelativeToBaseDir,Parsed);
|
||||
Result:=GetPath(pcosObjectPath,icoObjectPath,RelativeToBaseDir,Parsed,
|
||||
WithProjDir);
|
||||
end;
|
||||
|
||||
function TBaseCompilerOptions.GetPath(Option: TParsedCompilerOptString;
|
||||
InheritedOption: TInheritedCompilerOption; RelativeToBaseDir: boolean;
|
||||
Parsed: TCompilerOptionsParseType): string;
|
||||
Parsed: TCompilerOptionsParseType; WithProjDir: boolean): string;
|
||||
var
|
||||
AddPath: String;
|
||||
begin
|
||||
case Parsed of
|
||||
coptUnparsed:
|
||||
@ -1506,6 +1517,14 @@ begin
|
||||
else
|
||||
RaiseGDBException('');
|
||||
end;
|
||||
if WithProjDir then begin
|
||||
if RelativeToBaseDir then
|
||||
AddPath:='.'
|
||||
else
|
||||
AddPath:=BaseDirectory;
|
||||
if AddPath<>'' then
|
||||
Result:=MergeSearchPaths(Result,AddPath);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TBaseCompilerOptions.GetParsedPath(Option: TParsedCompilerOptString;
|
||||
|
Loading…
Reference in New Issue
Block a user