IDE: build IDE: update globals before compiling packages

git-svn-id: trunk@27931 -
This commit is contained in:
mattias 2010-10-28 20:55:36 +00:00
parent d16d3ded6a
commit 3baf3ad6ba
2 changed files with 8 additions and 2 deletions

View File

@ -172,6 +172,7 @@ type
procedure Load(XMLConfig: TXMLConfig; const Path: string; const FileVersion: integer);
procedure Save(XMLConfig: TXMLConfig; const Path: string);
procedure Move(CurIndex, NewIndex: Integer); // Replaces TList.Move
procedure UpdateGlobals;
public
property Globals: TGlobalCompilerOptions read fGlobals;
property MakeModeDefs: TMakeModeDefs read fMakeModeDefs;
@ -387,14 +388,12 @@ procedure TBuildLazarusProfile.SetTargetCPU(const AValue: string);
begin
if FTargetCPU=AValue then exit;
FTargetCPU:=AValue;
fOwnerCnt.Globals.TargetCPU:=FPCTargetCPU;
end;
procedure TBuildLazarusProfile.SetTargetOS(const AValue: string);
begin
if fTargetOS=AValue then exit;
fTargetOS:=AValue;
fOwnerCnt.Globals.TargetOS:=FPCTargetOS;
end;
function TBuildLazarusProfile.GetTargetPlatform: TLCLPlatform;
@ -723,6 +722,12 @@ begin
fCurrentIndex:=NewIndex;
end;
procedure TBuildLazarusProfiles.UpdateGlobals;
begin
Globals.TargetOS:=Current.FPCTargetOS;
Globals.TargetCPU:=Current.FPCTargetCPU;
end;
function TBuildLazarusProfiles.GetCurrentProfile: TBuildLazarusProfile;
begin
Result:=Items[fCurrentIndex];

View File

@ -3842,6 +3842,7 @@ begin
end;
// compile all auto install dependencies
MiscellaneousOptions.BuildLazProfiles.UpdateGlobals;
Result:=PackageGraph.CompileRequiredPackages(nil,
PackageGraph.FirstAutoInstallDependency,
MiscellaneousOptions.BuildLazProfiles.Globals,[pupAsNeeded]);