mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 11:19:24 +02:00
added compiler options to IDEIntf and made Win32GraphicApp default for application projects
git-svn-id: trunk@6125 -
This commit is contained in:
parent
45c1fe7cee
commit
bce37f242b
@ -42,9 +42,8 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, LCLProc,
|
Classes, SysUtils, FileUtil, LCLProc,
|
||||||
Laz_XMLCfg,
|
Laz_XMLCfg, ProjectIntf,
|
||||||
IDEProcs, LazConf,
|
IDEProcs, LazConf, TransferMacros;
|
||||||
TransferMacros;
|
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -167,14 +166,8 @@ type
|
|||||||
end;
|
end;
|
||||||
TCompilationToolClass = class of TCompilationTool;
|
TCompilationToolClass = class of TCompilationTool;
|
||||||
|
|
||||||
TCompilationGenerateCode = (
|
|
||||||
cgcNormalCode,
|
|
||||||
cgcFasterCode,
|
|
||||||
cgcSmallerCode
|
|
||||||
);
|
|
||||||
|
|
||||||
TBaseCompilerOptionsClass = class of TBaseCompilerOptions;
|
TBaseCompilerOptionsClass = class of TBaseCompilerOptions;
|
||||||
TBaseCompilerOptions = class
|
TBaseCompilerOptions = class(TLazCompilerOptions)
|
||||||
private
|
private
|
||||||
FBaseDirectory: string;
|
FBaseDirectory: string;
|
||||||
FDefaultMakeOptionsFlags: TCompilerCmdLineOptions;
|
FDefaultMakeOptionsFlags: TCompilerCmdLineOptions;
|
||||||
@ -183,9 +176,7 @@ type
|
|||||||
fInheritedOptGraphStamps: integer;
|
fInheritedOptGraphStamps: integer;
|
||||||
fLoaded: Boolean;
|
fLoaded: Boolean;
|
||||||
FModified: boolean;
|
FModified: boolean;
|
||||||
FOnModified: TNotifyEvent;
|
|
||||||
fOptionsString: String;
|
fOptionsString: String;
|
||||||
fOwner: TObject;
|
|
||||||
FParsedOpts: TParsedCompilerOptions;
|
FParsedOpts: TParsedCompilerOptions;
|
||||||
fTargetFilename: string;
|
fTargetFilename: string;
|
||||||
FWin32GraphicApp: boolean;
|
FWin32GraphicApp: boolean;
|
||||||
@ -278,30 +269,29 @@ type
|
|||||||
fCompilerPath: String;
|
fCompilerPath: String;
|
||||||
fExecuteBefore: TCompilationTool;
|
fExecuteBefore: TCompilationTool;
|
||||||
fExecuteAfter: TCompilationTool;
|
fExecuteAfter: TCompilationTool;
|
||||||
|
|
||||||
protected
|
protected
|
||||||
procedure SetBaseDirectory(const AValue: string); virtual;
|
procedure SetBaseDirectory(const AValue: string); override;
|
||||||
procedure SetCompilerPath(const AValue: String); virtual;
|
procedure SetCompilerPath(const AValue: String); override;
|
||||||
procedure SetCustomOptions(const AValue: string); virtual;
|
procedure SetCustomOptions(const AValue: string); override;
|
||||||
procedure SetIncludeFiles(const AValue: String); virtual;
|
procedure SetIncludeFiles(const AValue: String); override;
|
||||||
procedure SetLibraries(const AValue: String); virtual;
|
procedure SetLibraries(const AValue: String); override;
|
||||||
procedure SetLinkerOptions(const AValue: String); virtual;
|
procedure SetLinkerOptions(const AValue: String); override;
|
||||||
procedure SetOtherUnitFiles(const AValue: String); virtual;
|
procedure SetOtherUnitFiles(const AValue: String); override;
|
||||||
procedure SetUnitOutputDir(const AValue: string); virtual;
|
procedure SetUnitOutputDir(const AValue: string); override;
|
||||||
procedure SetObjectPath(const AValue: string); virtual;
|
procedure SetObjectPath(const AValue: string); override;
|
||||||
procedure SetSrcPath(const AValue: string); virtual;
|
procedure SetSrcPath(const AValue: string); override;
|
||||||
procedure SetDebugPath(const AValue: string); virtual;
|
procedure SetDebugPath(const AValue: string); override;
|
||||||
procedure SetTargetCPU(const AValue: string); virtual;
|
procedure SetTargetCPU(const AValue: string); override;
|
||||||
procedure SetTargetProc(const AValue: Integer); virtual;
|
procedure SetTargetProc(const AValue: Integer); override;
|
||||||
procedure SetTargetOS(const AValue: string); virtual;
|
procedure SetTargetOS(const AValue: string); override;
|
||||||
|
procedure SetModified(const AValue: boolean); override;
|
||||||
protected
|
protected
|
||||||
procedure LoadTheCompilerOptions(const Path: string); virtual;
|
procedure LoadTheCompilerOptions(const Path: string); virtual;
|
||||||
procedure SaveTheCompilerOptions(const Path: string); virtual;
|
procedure SaveTheCompilerOptions(const Path: string); virtual;
|
||||||
procedure SetModified(const AValue: boolean); virtual;
|
|
||||||
procedure ClearInheritedOptions;
|
procedure ClearInheritedOptions;
|
||||||
procedure SetDefaultMakeOptionsFlags(const AValue: TCompilerCmdLineOptions);
|
procedure SetDefaultMakeOptionsFlags(const AValue: TCompilerCmdLineOptions);
|
||||||
public
|
public
|
||||||
constructor Create(const AOwner: TObject); virtual;
|
constructor Create(const AOwner: TObject); override;
|
||||||
constructor Create(const AOwner: TObject; const AToolClass: TCompilationToolClass);
|
constructor Create(const AOwner: TObject; const AToolClass: TCompilationToolClass);
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure Clear; virtual;
|
procedure Clear; virtual;
|
||||||
@ -311,7 +301,7 @@ type
|
|||||||
|
|
||||||
procedure LoadCompilerOptions(UseExistingFile: Boolean);
|
procedure LoadCompilerOptions(UseExistingFile: Boolean);
|
||||||
procedure SaveCompilerOptions(UseExistingFile: Boolean);
|
procedure SaveCompilerOptions(UseExistingFile: Boolean);
|
||||||
procedure Assign(CompOpts: TBaseCompilerOptions); virtual;
|
procedure Assign(Source: TPersistent); override;
|
||||||
function IsEqual(CompOpts: TBaseCompilerOptions): boolean; virtual;
|
function IsEqual(CompOpts: TBaseCompilerOptions): boolean; virtual;
|
||||||
|
|
||||||
function MakeOptionsString(Globals: TGlobalCompilerOptions;
|
function MakeOptionsString(Globals: TGlobalCompilerOptions;
|
||||||
@ -341,9 +331,6 @@ type
|
|||||||
function GetEffectiveLCLWidgetType: string;
|
function GetEffectiveLCLWidgetType: string;
|
||||||
public
|
public
|
||||||
{ Properties }
|
{ Properties }
|
||||||
property Owner: TObject read fOwner write fOwner;
|
|
||||||
property Modified: boolean read FModified write SetModified;
|
|
||||||
property OnModified: TNotifyEvent read FOnModified write FOnModified;
|
|
||||||
property ParsedOpts: TParsedCompilerOptions read FParsedOpts;
|
property ParsedOpts: TParsedCompilerOptions read FParsedOpts;
|
||||||
property BaseDirectory: string read FBaseDirectory write SetBaseDirectory;
|
property BaseDirectory: string read FBaseDirectory write SetBaseDirectory;
|
||||||
property TargetFilename: String read fTargetFilename write fTargetFilename;
|
property TargetFilename: String read fTargetFilename write fTargetFilename;
|
||||||
@ -787,8 +774,7 @@ end;
|
|||||||
constructor TBaseCompilerOptions.Create(const AOwner: TObject;
|
constructor TBaseCompilerOptions.Create(const AOwner: TObject;
|
||||||
const AToolClass: TCompilationToolClass);
|
const AToolClass: TCompilationToolClass);
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create(AOwner);
|
||||||
FOwner := AOwner;
|
|
||||||
FParsedOpts := TParsedCompilerOptions.Create;
|
FParsedOpts := TParsedCompilerOptions.Create;
|
||||||
FExecuteBefore := AToolClass.Create;
|
FExecuteBefore := AToolClass.Create;
|
||||||
FExecuteAfter := AToolClass.Create;
|
FExecuteAfter := AToolClass.Create;
|
||||||
@ -2143,8 +2129,15 @@ begin
|
|||||||
fExecuteAfter.Clear;
|
fExecuteAfter.Clear;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBaseCompilerOptions.Assign(CompOpts: TBaseCompilerOptions);
|
procedure TBaseCompilerOptions.Assign(Source: TPersistent);
|
||||||
|
var
|
||||||
|
CompOpts: TBaseCompilerOptions;
|
||||||
begin
|
begin
|
||||||
|
if not (Source is TBaseCompilerOptions) then begin
|
||||||
|
inherited Assign(Source);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
CompOpts:=TBaseCompilerOptions(Source);
|
||||||
fOptionsString := CompOpts.fOptionsString;
|
fOptionsString := CompOpts.fOptionsString;
|
||||||
fLoaded := CompOpts.fLoaded;
|
fLoaded := CompOpts.fLoaded;
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ interface
|
|||||||
uses
|
uses
|
||||||
Forms, Classes, LCLProc, SysUtils, ComCtrls, Buttons, StdCtrls, ExtCtrls,
|
Forms, Classes, LCLProc, SysUtils, ComCtrls, Buttons, StdCtrls, ExtCtrls,
|
||||||
Graphics, LResources, FileUtil, Dialogs, Controls, GraphType,
|
Graphics, LResources, FileUtil, Dialogs, Controls, GraphType,
|
||||||
|
ProjectIntf,
|
||||||
PathEditorDlg, LazarusIDEStrConsts, IDEOptionDefs, LazConf, IDEProcs,
|
PathEditorDlg, LazarusIDEStrConsts, IDEOptionDefs, LazConf, IDEProcs,
|
||||||
CompilerOptions, ShowCompilerOpts, Project, PackageDefs;
|
CompilerOptions, ShowCompilerOpts, Project, PackageDefs;
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ type
|
|||||||
function GetOwnerName: string; override;
|
function GetOwnerName: string; override;
|
||||||
function GetDefaultMainSourceFileName: string; override;
|
function GetDefaultMainSourceFileName: string; override;
|
||||||
procedure GetInheritedCompilerOptions(var OptionsList: TList); override;
|
procedure GetInheritedCompilerOptions(var OptionsList: TList); override;
|
||||||
procedure Assign(CompOpts: TBaseCompilerOptions); override;
|
procedure Assign(Source: TPersistent); override;
|
||||||
function IsEqual(CompOpts: TBaseCompilerOptions): boolean; override;
|
function IsEqual(CompOpts: TBaseCompilerOptions): boolean; override;
|
||||||
public
|
public
|
||||||
property OwnerProject: TProject read FOwnerProject;
|
property OwnerProject: TProject read FOwnerProject;
|
||||||
@ -401,6 +401,7 @@ type
|
|||||||
const OldUnitName, NewUnitName: string;
|
const OldUnitName, NewUnitName: string;
|
||||||
CheckIfAllowed: boolean; var Allowed: boolean);
|
CheckIfAllowed: boolean; var Allowed: boolean);
|
||||||
procedure SetAutoOpenDesignerFormsDisabled(const AValue: boolean);
|
procedure SetAutoOpenDesignerFormsDisabled(const AValue: boolean);
|
||||||
|
procedure SetCompilerOptions(const AValue: TProjectCompilerOptions);
|
||||||
procedure SetModified(const AValue: boolean);
|
procedure SetModified(const AValue: boolean);
|
||||||
procedure SetProjectInfoFile(const NewFilename: string);
|
procedure SetProjectInfoFile(const NewFilename: string);
|
||||||
procedure SetTargetFilename(const NewTargetFilename: string);
|
procedure SetTargetFilename(const NewTargetFilename: string);
|
||||||
@ -534,7 +535,7 @@ type
|
|||||||
write SetAutoOpenDesignerFormsDisabled;
|
write SetAutoOpenDesignerFormsDisabled;
|
||||||
property Bookmarks: TProjectBookmarkList read fBookmarks write fBookmarks;
|
property Bookmarks: TProjectBookmarkList read fBookmarks write fBookmarks;
|
||||||
property CompilerOptions: TProjectCompilerOptions
|
property CompilerOptions: TProjectCompilerOptions
|
||||||
read fCompilerOptions write fCompilerOptions;
|
read fCompilerOptions write SetCompilerOptions;
|
||||||
property DefineTemplates: TProjectDefineTemplates read FDefineTemplates;
|
property DefineTemplates: TProjectDefineTemplates read FDefineTemplates;
|
||||||
property Destroying: boolean read fDestroying;
|
property Destroying: boolean read fDestroying;
|
||||||
property FirstAutoRevertLockedUnit: TUnitInfo read GetFirstAutoRevertLockedUnit;
|
property FirstAutoRevertLockedUnit: TUnitInfo read GetFirstAutoRevertLockedUnit;
|
||||||
@ -1180,7 +1181,7 @@ begin
|
|||||||
fActiveEditorIndexAtStart := -1;
|
fActiveEditorIndexAtStart := -1;
|
||||||
FAutoCreateForms := true;
|
FAutoCreateForms := true;
|
||||||
fBookmarks := TProjectBookmarkList.Create;
|
fBookmarks := TProjectBookmarkList.Create;
|
||||||
fCompilerOptions := TProjectCompilerOptions.Create(Self);
|
CompilerOptions := TProjectCompilerOptions.Create(Self);
|
||||||
FDefineTemplates:=TProjectDefineTemplates.Create(Self);
|
FDefineTemplates:=TProjectDefineTemplates.Create(Self);
|
||||||
FFlags:=DefaultProjectFlags;
|
FFlags:=DefaultProjectFlags;
|
||||||
fIconPath := '';
|
fIconPath := '';
|
||||||
@ -2511,6 +2512,12 @@ begin
|
|||||||
FAutoOpenDesignerFormsDisabled:=AValue;
|
FAutoOpenDesignerFormsDisabled:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TProject.SetCompilerOptions(const AValue: TProjectCompilerOptions);
|
||||||
|
begin
|
||||||
|
fCompilerOptions:=AValue;
|
||||||
|
inherited SetLazCompilerOptions(AValue);
|
||||||
|
end;
|
||||||
|
|
||||||
function TProject.JumpHistoryCheckPosition(
|
function TProject.JumpHistoryCheckPosition(
|
||||||
APosition:TProjectJumpHistoryPosition): boolean;
|
APosition:TProjectJumpHistoryPosition): boolean;
|
||||||
var i: integer;
|
var i: integer;
|
||||||
@ -2773,11 +2780,11 @@ begin
|
|||||||
FGlobals.TargetOS:=TargetOS;
|
FGlobals.TargetOS:=TargetOS;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProjectCompilerOptions.Assign(CompOpts: TBaseCompilerOptions);
|
procedure TProjectCompilerOptions.Assign(Source: TPersistent);
|
||||||
begin
|
begin
|
||||||
inherited Assign(CompOpts);
|
inherited Assign(Source);
|
||||||
if CompOpts is TProjectCompilerOptions
|
if Source is TProjectCompilerOptions
|
||||||
then FCompileReasons := TProjectCompilerOptions(CompOpts).FCompileReasons
|
then FCompileReasons := TProjectCompilerOptions(Source).FCompileReasons
|
||||||
else FCompileReasons := [crCompile, crBuild, crRun];
|
else FCompileReasons := [crCompile, crBuild, crRun];
|
||||||
|
|
||||||
UpdateGlobals;
|
UpdateGlobals;
|
||||||
@ -3050,6 +3057,7 @@ begin
|
|||||||
AProject.AddSrcPath('$(LazarusDir)/lcl;'
|
AProject.AddSrcPath('$(LazarusDir)/lcl;'
|
||||||
+'$(LazarusDir)/lcl/interfaces/$(LCLWidgetType)');
|
+'$(LazarusDir)/lcl/interfaces/$(LCLWidgetType)');
|
||||||
AProject.AddPackageDependency('LCL');
|
AProject.AddPackageDependency('LCL');
|
||||||
|
AProject.LazCompilerOptions.Win32GraphicApp:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TProjectApplicationDescriptor.CreateStartFiles(AProject: TLazProject
|
procedure TProjectApplicationDescriptor.CreateStartFiles(AProject: TLazProject
|
||||||
@ -3121,6 +3129,9 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.168 2004/10/09 13:24:18 mattias
|
||||||
|
added compiler options to IDEIntf and made Win32GraphicApp default for application projects
|
||||||
|
|
||||||
Revision 1.167 2004/10/01 13:18:41 mattias
|
Revision 1.167 2004/10/01 13:18:41 mattias
|
||||||
removed uneeded function TProject.AddNewFile
|
removed uneeded function TProject.AddNewFile
|
||||||
|
|
||||||
|
@ -35,6 +35,200 @@ const
|
|||||||
ProjDescNameCustomProgram = 'custom program';
|
ProjDescNameCustomProgram = 'custom program';
|
||||||
|
|
||||||
type
|
type
|
||||||
|
{ TLazCompilerOptions }
|
||||||
|
|
||||||
|
TCompilationGenerateCode = (
|
||||||
|
cgcNormalCode,
|
||||||
|
cgcFasterCode,
|
||||||
|
cgcSmallerCode
|
||||||
|
);
|
||||||
|
|
||||||
|
TLazCompilerOptions = class(TPersistent)
|
||||||
|
private
|
||||||
|
fAdditionalConfigFile: Boolean;
|
||||||
|
fAllowLabel: Boolean;
|
||||||
|
fAssemblerStyle: Integer;
|
||||||
|
fCMacros: Boolean;
|
||||||
|
fConfigFilePath: String;
|
||||||
|
fCPPInline: Boolean;
|
||||||
|
fCStyleOp: Boolean;
|
||||||
|
fCustomOptions: string;
|
||||||
|
fD2Ext: Boolean;
|
||||||
|
FDebugPath: string;
|
||||||
|
fDelphiCompat: Boolean;
|
||||||
|
fDontUseConfigFile: Boolean;
|
||||||
|
FEmulatedFloatOpcodes: boolean;
|
||||||
|
fGenDebugDBX: Boolean;
|
||||||
|
fGenDebugInfo: Boolean;
|
||||||
|
fGenerate: TCompilationGenerateCode;
|
||||||
|
fGenGProfCode: Boolean;
|
||||||
|
fGPCCompat: Boolean;
|
||||||
|
fHeapSize: Integer;
|
||||||
|
fIncludeAssertionCode: Boolean;
|
||||||
|
fIncludeFiles: String;
|
||||||
|
fInitConst: Boolean;
|
||||||
|
fIOChecks: Boolean;
|
||||||
|
fLCLWidgetType: string;
|
||||||
|
fLibraries: String;
|
||||||
|
fLinkerOptions: String;
|
||||||
|
fLinkStyle: Integer;
|
||||||
|
FModified: boolean;
|
||||||
|
FObjectPath: string;
|
||||||
|
FOnModified: TNotifyEvent;
|
||||||
|
fOptLevel: Integer;
|
||||||
|
fOtherUnitFiles: String;
|
||||||
|
fOverflowChecks: Boolean;
|
||||||
|
fOwner: TObject;
|
||||||
|
fPassLinkerOpt: Boolean;
|
||||||
|
fRangeChecks: Boolean;
|
||||||
|
fShowAll: Boolean;
|
||||||
|
fShowAllProcsOnError: Boolean;
|
||||||
|
fShowCompProc: Boolean;
|
||||||
|
fShowCond: Boolean;
|
||||||
|
fShowDebugInfo: Boolean;
|
||||||
|
fShowDefMacros: Boolean;
|
||||||
|
fShowErrors: Boolean;
|
||||||
|
fShowGenInfo: Boolean;
|
||||||
|
fShowHints: Boolean;
|
||||||
|
fShowHintsForUnusedUnitsInMainSrc: Boolean;
|
||||||
|
fShowLineNum: Boolean;
|
||||||
|
fShowNotes: Boolean;
|
||||||
|
fShowNothing: Boolean;
|
||||||
|
fShowTriedFiles: Boolean;
|
||||||
|
fShowUsedFiles: Boolean;
|
||||||
|
fShowWarn: Boolean;
|
||||||
|
FSrcPath: string;
|
||||||
|
fStackChecks: Boolean;
|
||||||
|
fStaticKwd: Boolean;
|
||||||
|
fStopAfterErrCount: integer;
|
||||||
|
fStripSymbols: Boolean;
|
||||||
|
fTargetCPU: string;
|
||||||
|
fTargetOS: string;
|
||||||
|
fTargetProc: Integer;
|
||||||
|
fTPCompat: Boolean;
|
||||||
|
fUncertainOpt: Boolean;
|
||||||
|
fUnitOutputDir: string;
|
||||||
|
fUnitStyle: Integer;
|
||||||
|
fUseAnsiStr: Boolean;
|
||||||
|
fUseHeaptrc: Boolean;
|
||||||
|
fUseLineInfoUnit: Boolean;
|
||||||
|
fUseValgrind: Boolean;
|
||||||
|
fVarsInReg: Boolean;
|
||||||
|
FWin32GraphicApp: boolean;
|
||||||
|
fWriteFPCLogo: Boolean;
|
||||||
|
protected
|
||||||
|
procedure SetBaseDirectory(const AValue: string); virtual; abstract;
|
||||||
|
procedure SetCompilerPath(const AValue: String); virtual; abstract;
|
||||||
|
procedure SetCustomOptions(const AValue: string); virtual; abstract;
|
||||||
|
procedure SetIncludeFiles(const AValue: String); virtual; abstract;
|
||||||
|
procedure SetLibraries(const AValue: String); virtual; abstract;
|
||||||
|
procedure SetLinkerOptions(const AValue: String); virtual; abstract;
|
||||||
|
procedure SetOtherUnitFiles(const AValue: String); virtual; abstract;
|
||||||
|
procedure SetUnitOutputDir(const AValue: string); virtual; abstract;
|
||||||
|
procedure SetObjectPath(const AValue: string); virtual; abstract;
|
||||||
|
procedure SetSrcPath(const AValue: string); virtual; abstract;
|
||||||
|
procedure SetDebugPath(const AValue: string); virtual; abstract;
|
||||||
|
procedure SetTargetCPU(const AValue: string); virtual; abstract;
|
||||||
|
procedure SetTargetProc(const AValue: Integer); virtual; abstract;
|
||||||
|
procedure SetTargetOS(const AValue: string); virtual; abstract;
|
||||||
|
procedure SetModified(const AValue: boolean); virtual; abstract;
|
||||||
|
public
|
||||||
|
constructor Create(const TheOwner: TObject); virtual;
|
||||||
|
public
|
||||||
|
property Owner: TObject read fOwner write fOwner;
|
||||||
|
property Modified: boolean read FModified write SetModified;
|
||||||
|
property OnModified: TNotifyEvent read FOnModified write FOnModified;
|
||||||
|
|
||||||
|
// search paths:
|
||||||
|
property IncludeFiles: String read fIncludeFiles write SetIncludeFiles;
|
||||||
|
property Libraries: String read fLibraries write SetLibraries;
|
||||||
|
property OtherUnitFiles: String read fOtherUnitFiles write SetOtherUnitFiles;
|
||||||
|
property ObjectPath: string read FObjectPath write SetObjectPath;
|
||||||
|
property SrcPath: string read FSrcPath write SetSrcPath;
|
||||||
|
property UnitOutputDirectory: string read fUnitOutputDir write SetUnitOutputDir;
|
||||||
|
property DebugPath: string read FDebugPath write SetDebugPath;
|
||||||
|
property LCLWidgetType: string read fLCLWidgetType write fLCLWidgetType;
|
||||||
|
|
||||||
|
// parsing:
|
||||||
|
property AssemblerStyle: Integer read fAssemblerStyle write fAssemblerStyle;
|
||||||
|
property D2Extensions: Boolean read fD2Ext write fD2Ext;
|
||||||
|
property CStyleOperators: Boolean read fCStyleOp write fCStyleOp;
|
||||||
|
property IncludeAssertionCode: Boolean
|
||||||
|
read fIncludeAssertionCode write fIncludeAssertionCode;
|
||||||
|
property DelphiCompat: Boolean read fDelphiCompat write fDelphiCompat;
|
||||||
|
property AllowLabel: Boolean read fAllowLabel write fAllowLabel;
|
||||||
|
property UseAnsiStrings: Boolean read fUseAnsiStr write fUseAnsiStr;
|
||||||
|
property CPPInline: Boolean read fCPPInline write fCPPInline;
|
||||||
|
property CStyleMacros: Boolean read fCMacros write fCMacros;
|
||||||
|
property TPCompatible: Boolean read fTPCompat write fTPCompat;
|
||||||
|
property GPCCompat: Boolean read fGPCCompat write fGPCCompat;
|
||||||
|
property InitConstructor: Boolean read fInitConst write fInitConst;
|
||||||
|
property StaticKeyword: Boolean read fStaticKwd write fStaticKwd;
|
||||||
|
|
||||||
|
// code generation:
|
||||||
|
property UnitStyle: Integer read fUnitStyle write fUnitStyle;
|
||||||
|
property IOChecks: Boolean read fIOChecks write fIOChecks;
|
||||||
|
property RangeChecks: Boolean read fRangeChecks write fRangeChecks;
|
||||||
|
property OverflowChecks: Boolean read fOverflowChecks write fOverflowChecks;
|
||||||
|
property StackChecks: Boolean read fStackChecks write fStackChecks;
|
||||||
|
property EmulatedFloatOpcodes: boolean read FEmulatedFloatOpcodes
|
||||||
|
write FEmulatedFloatOpcodes;
|
||||||
|
property HeapSize: Integer read fHeapSize write fHeapSize;
|
||||||
|
property VerifyObjMethodCall: boolean read FEmulatedFloatOpcodes
|
||||||
|
write FEmulatedFloatOpcodes;
|
||||||
|
property Generate: TCompilationGenerateCode read fGenerate write fGenerate;
|
||||||
|
property TargetCPU: string read fTargetCPU write SetTargetCPU; // general type
|
||||||
|
property TargetProcessor: Integer read fTargetProc write SetTargetProc; // specific
|
||||||
|
property TargetOS: string read fTargetOS write SetTargetOS;
|
||||||
|
property VariablesInRegisters: Boolean read fVarsInReg write fVarsInReg;
|
||||||
|
property UncertainOptimizations: Boolean read fUncertainOpt write fUncertainOpt;
|
||||||
|
property OptimizationLevel: Integer read fOptLevel write fOptLevel;
|
||||||
|
|
||||||
|
// linking:
|
||||||
|
property GenerateDebugInfo: Boolean read fGenDebugInfo write fGenDebugInfo;
|
||||||
|
property GenerateDebugDBX: Boolean read fGenDebugDBX write fGenDebugDBX;
|
||||||
|
property UseLineInfoUnit: Boolean read fUseLineInfoUnit write fUseLineInfoUnit;
|
||||||
|
property UseHeaptrc: Boolean read fUseHeaptrc write fUseHeaptrc;
|
||||||
|
property UseValgrind: Boolean read fUseValgrind write fUseValgrind;
|
||||||
|
property GenGProfCode: Boolean read fGenGProfCode write fGenGProfCode;
|
||||||
|
property StripSymbols: Boolean read fStripSymbols write fStripSymbols;
|
||||||
|
property LinkStyle: Integer read fLinkStyle write fLinkStyle;
|
||||||
|
property PassLinkerOptions: Boolean read fPassLinkerOpt write fPassLinkerOpt;
|
||||||
|
property LinkerOptions: String read fLinkerOptions write SetLinkerOptions;
|
||||||
|
property Win32GraphicApp: boolean read FWin32GraphicApp write FWin32GraphicApp;
|
||||||
|
|
||||||
|
// messages:
|
||||||
|
property ShowErrors: Boolean read fShowErrors write fShowErrors;
|
||||||
|
property ShowWarn: Boolean read fShowWarn write fShowWarn;
|
||||||
|
property ShowNotes: Boolean read fShowNotes write fShowNotes;
|
||||||
|
property ShowHints: Boolean read fShowHints write fShowHints;
|
||||||
|
property ShowGenInfo: Boolean read fShowGenInfo write fShowGenInfo;
|
||||||
|
property ShowLineNum: Boolean read fShowLineNum write fShowLineNum;
|
||||||
|
property ShowAll: Boolean read fShowAll write fShowAll;
|
||||||
|
property ShowAllProcsOnError: Boolean
|
||||||
|
read fShowAllProcsOnError write fShowAllProcsOnError;
|
||||||
|
property ShowDebugInfo: Boolean read fShowDebugInfo write fShowDebugInfo;
|
||||||
|
property ShowUsedFiles: Boolean read fShowUsedFiles write fShowUsedFiles;
|
||||||
|
property ShowTriedFiles: Boolean read fShowTriedFiles write fShowTriedFiles;
|
||||||
|
property ShowDefMacros: Boolean read fShowDefMacros write fShowDefMacros;
|
||||||
|
property ShowCompProc: Boolean read fShowCompProc write fShowCompProc;
|
||||||
|
property ShowCond: Boolean read fShowCond write fShowCond;
|
||||||
|
property ShowNothing: Boolean read fShowNothing write fShowNothing;
|
||||||
|
property ShowHintsForUnusedUnitsInMainSrc: Boolean
|
||||||
|
read fShowHintsForUnusedUnitsInMainSrc write fShowHintsForUnusedUnitsInMainSrc;
|
||||||
|
property WriteFPCLogo: Boolean read fWriteFPCLogo write fWriteFPCLogo;
|
||||||
|
property StopAfterErrCount: integer
|
||||||
|
read fStopAfterErrCount write fStopAfterErrCount;
|
||||||
|
|
||||||
|
// other
|
||||||
|
property DontUseConfigFile: Boolean read fDontUseConfigFile
|
||||||
|
write fDontUseConfigFile;
|
||||||
|
property AdditionalConfigFile: Boolean read fAdditionalConfigFile
|
||||||
|
write fAdditionalConfigFile;
|
||||||
|
property ConfigFilePath: String read fConfigFilePath write fConfigFilePath;
|
||||||
|
property CustomOptions: string read fCustomOptions write SetCustomOptions;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TLazProjectFile }
|
{ TLazProjectFile }
|
||||||
|
|
||||||
TLazProjectFile = class(TPersistent)
|
TLazProjectFile = class(TPersistent)
|
||||||
@ -204,8 +398,10 @@ type
|
|||||||
TLazProject = class(TPersistent)
|
TLazProject = class(TPersistent)
|
||||||
private
|
private
|
||||||
FFlags: TProjectFlags;
|
FFlags: TProjectFlags;
|
||||||
|
FLazCompilerOptions: TLazCompilerOptions;
|
||||||
fTitle: String;
|
fTitle: String;
|
||||||
protected
|
protected
|
||||||
|
procedure SetLazCompilerOptions(const AValue: TLazCompilerOptions);
|
||||||
function GetMainFile: TLazProjectFile; virtual; abstract;
|
function GetMainFile: TLazProjectFile; virtual; abstract;
|
||||||
function GetMainFileID: Integer; virtual; abstract;
|
function GetMainFileID: Integer; virtual; abstract;
|
||||||
procedure SetMainFileID(const AValue: Integer); virtual; abstract;
|
procedure SetMainFileID(const AValue: Integer); virtual; abstract;
|
||||||
@ -230,6 +426,8 @@ type
|
|||||||
property MainFile: TLazProjectFile read GetMainFile;
|
property MainFile: TLazProjectFile read GetMainFile;
|
||||||
property Title: String read fTitle write SetTitle;
|
property Title: String read fTitle write SetTitle;
|
||||||
property Flags: TProjectFlags read FFlags write SetFlags;
|
property Flags: TProjectFlags read FFlags write SetFlags;
|
||||||
|
property LazCompilerOptions: TLazCompilerOptions read FLazCompilerOptions
|
||||||
|
write SetLazCompilerOptions;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -588,6 +786,12 @@ begin
|
|||||||
FFlags:=AValue;
|
FFlags:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TLazProject.SetLazCompilerOptions(const AValue: TLazCompilerOptions);
|
||||||
|
begin
|
||||||
|
if FLazCompilerOptions=AValue then exit;
|
||||||
|
FLazCompilerOptions:=AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TLazProject.SetTitle(const AValue: String);
|
procedure TLazProject.SetTitle(const AValue: String);
|
||||||
begin
|
begin
|
||||||
if fTitle=AValue then exit;
|
if fTitle=AValue then exit;
|
||||||
@ -606,6 +810,14 @@ begin
|
|||||||
FIsPartOfProject:=AValue;
|
FIsPartOfProject:=AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TLazCompilerOptions }
|
||||||
|
|
||||||
|
constructor TLazCompilerOptions.Create(const TheOwner: TObject);
|
||||||
|
begin
|
||||||
|
inherited Create;
|
||||||
|
FOwner := TheOwner;
|
||||||
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
ProjectFileDescriptors:=nil;
|
ProjectFileDescriptors:=nil;
|
||||||
|
|
||||||
|
@ -345,7 +345,7 @@ type
|
|||||||
function GetDefaultMainSourceFileName: string; override;
|
function GetDefaultMainSourceFileName: string; override;
|
||||||
function CreateTargetFilename(const MainSourceFileName: string): string; override;
|
function CreateTargetFilename(const MainSourceFileName: string): string; override;
|
||||||
|
|
||||||
procedure Assign(CompOpts: TBaseCompilerOptions); override;
|
procedure Assign(Source: TPersistent); override;
|
||||||
function IsEqual(CompOpts: TBaseCompilerOptions): boolean; override;
|
function IsEqual(CompOpts: TBaseCompilerOptions): boolean; override;
|
||||||
public
|
public
|
||||||
property LazPackage: TLazPackage read FLazPackage write SetLazPackage;
|
property LazPackage: TLazPackage read FLazPackage write SetLazPackage;
|
||||||
@ -3143,12 +3143,12 @@ begin
|
|||||||
Result:='';
|
Result:='';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPkgCompilerOptions.Assign(CompOpts: TBaseCompilerOptions);
|
procedure TPkgCompilerOptions.Assign(Source: TPersistent);
|
||||||
begin
|
begin
|
||||||
inherited Assign(CompOpts);
|
inherited Assign(Source);
|
||||||
if CompOpts is TPkgCompilerOptions
|
if Source is TPkgCompilerOptions
|
||||||
then begin
|
then begin
|
||||||
FSkipCompiler := TPkgCompilerOptions(CompOpts).FSkipCompiler;
|
FSkipCompiler := TPkgCompilerOptions(Source).FSkipCompiler;
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
FSkipCompiler := False;
|
FSkipCompiler := False;
|
||||||
|
Loading…
Reference in New Issue
Block a user