mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-07 12:44:00 +02:00
IDE: refactor loading compiler options for build modes.
git-svn-id: trunk@45625 -
This commit is contained in:
parent
7f873f8ee6
commit
f61ce110b2
@ -684,6 +684,7 @@ type
|
||||
procedure LoadMacroValues(const Path: string; CurMode: TProjectBuildMode);
|
||||
procedure LoadAllMacroValues(const Path: string; Cnt: Integer);
|
||||
procedure LoadOldFormat(const Path: string);
|
||||
procedure SetActiveMode(const Path: string);
|
||||
// Used by SaveToXMLConfig
|
||||
procedure SaveMacroValuesAtOldPlace(const Path: string; aMode: TProjectBuildMode);
|
||||
public
|
||||
@ -7203,6 +7204,16 @@ begin
|
||||
CurMode.CompilerOptions.LoadFromXMLConfig(FXMLConfig,CompOptsPath);
|
||||
end;
|
||||
|
||||
procedure TProjectBuildModes.SetActiveMode(const Path: string);
|
||||
var
|
||||
CurMode: TProjectBuildMode;
|
||||
begin
|
||||
CurMode:=Find(FXMLConfig.GetValue(Path+'BuildModes/Active','default'));
|
||||
if CurMode=nil then
|
||||
CurMode:=Items[0];
|
||||
LazProject.ActiveBuildMode:=CurMode;
|
||||
end;
|
||||
|
||||
// LoadFromXMLConfig itself
|
||||
procedure TProjectBuildModes.LoadFromXMLConfig(XMLConfig: TXMLConfig;
|
||||
const Path: string; LoadData, LoadParts: boolean);
|
||||
@ -7237,11 +7248,7 @@ begin
|
||||
// load what matrix options are enabled in session build modes
|
||||
LoadSessionEnabledNonSessionMatrixOptions(Path+'BuildModes/SessionEnabledMatrixOptions/');
|
||||
|
||||
// set active mode
|
||||
CurMode:=Find(FXMLConfig.GetValue(Path+'BuildModes/Active','default'));
|
||||
if CurMode=nil then
|
||||
CurMode:=Items[0];
|
||||
LazProject.ActiveBuildMode:=CurMode;
|
||||
SetActiveMode(Path);
|
||||
end;
|
||||
|
||||
// Methods for SaveToXMLConfig
|
||||
|
Loading…
Reference in New Issue
Block a user