mirror of https://gitlab.com/basile.b/dexed.git
default configs are added on new projects
This commit is contained in:
parent
cdc792f601
commit
d7a5009897
|
@ -4,8 +4,6 @@ unit ce_project;
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
// TODO: configuration templates
|
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, ce_dmdwrap, ce_libman;
|
Classes, SysUtils, ce_dmdwrap, ce_libman;
|
||||||
|
|
||||||
|
@ -55,6 +53,7 @@ type
|
||||||
procedure beforeChanged;
|
procedure beforeChanged;
|
||||||
procedure afterChanged;
|
procedure afterChanged;
|
||||||
procedure reset;
|
procedure reset;
|
||||||
|
procedure addDefaults;
|
||||||
function getAbsoluteSourceName(const aIndex: integer): string;
|
function getAbsoluteSourceName(const aIndex: integer): string;
|
||||||
function getAbsoluteFilename(const aFilename: string): string;
|
function getAbsoluteFilename(const aFilename: string): string;
|
||||||
procedure addSource(const aFilename: string);
|
procedure addSource(const aFilename: string);
|
||||||
|
@ -85,6 +84,7 @@ begin
|
||||||
fSrcsCop := TStringList.Create;
|
fSrcsCop := TStringList.Create;
|
||||||
fOptsColl := TCollection.create(TCompilerConfiguration);
|
fOptsColl := TCollection.create(TCompilerConfiguration);
|
||||||
reset;
|
reset;
|
||||||
|
addDefaults;
|
||||||
fModified := false;
|
fModified := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -231,6 +231,29 @@ begin
|
||||||
result := TCompilerConfiguration(fOptsColl.Items[fConfIx]);
|
result := TCompilerConfiguration(fOptsColl.Items[fConfIx]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCEProject.addDefaults;
|
||||||
|
begin
|
||||||
|
with TCompilerConfiguration(fOptsColl.Add) do
|
||||||
|
begin
|
||||||
|
Name := 'debug';
|
||||||
|
debugingOptions.debug := true;
|
||||||
|
debugingOptions.addCInformations := true;
|
||||||
|
end;
|
||||||
|
with TCompilerConfiguration(fOptsColl.Add) do
|
||||||
|
begin
|
||||||
|
Name := 'unittest';
|
||||||
|
outputOptions.unittest := true;
|
||||||
|
end;
|
||||||
|
with TCompilerConfiguration(fOptsColl.Add) do
|
||||||
|
begin
|
||||||
|
Name := 'release';
|
||||||
|
outputOptions.release := true;
|
||||||
|
outputOptions.inlining := true;
|
||||||
|
outputOptions.boundsCheck := offAlways;
|
||||||
|
outputOptions.optimizations := true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCEProject.reset;
|
procedure TCEProject.reset;
|
||||||
var
|
var
|
||||||
defConf: TCompilerConfiguration;
|
defConf: TCompilerConfiguration;
|
||||||
|
|
Loading…
Reference in New Issue