|
@@ -1844,17 +1844,6 @@ begin
|
|
|
end;
|
|
|
|
|
|
|
|
|
-type
|
|
|
- TUnsortedDuplicatesStringList = class(TStringList)
|
|
|
- public
|
|
|
- function Add(const S: string): Integer; override;
|
|
|
- end;
|
|
|
-
|
|
|
- TUnsortedCompilerOptionsStringList = class(TStringList)
|
|
|
- public
|
|
|
- constructor Create;
|
|
|
- end;
|
|
|
-
|
|
|
var
|
|
|
CustomFpmakeCommandlineOptions: TStrings;
|
|
|
CustomFpMakeCommandlineValues: TStrings;
|
|
@@ -2938,7 +2927,7 @@ end;
|
|
|
procedure AddCustomFpmakeCommandlineOption(const ACommandLineOption, HelpMessage : string);
|
|
|
begin
|
|
|
if not assigned(CustomFpmakeCommandlineOptions) then
|
|
|
- CustomFpmakeCommandlineOptions := TUnsortedCompilerOptionsStringList.Create;
|
|
|
+ CustomFpmakeCommandlineOptions := TStringList.Create;
|
|
|
CustomFpmakeCommandlineOptions.Values[ACommandLineOption]:=HelpMessage;
|
|
|
end;
|
|
|
|
|
@@ -3012,7 +3001,7 @@ begin
|
|
|
Result:=Nil;
|
|
|
If (S='') then
|
|
|
Exit;
|
|
|
- Result:=TUnsortedCompilerOptionsStringList.Create;
|
|
|
+ Result:=TStringList.Create;
|
|
|
Repeat
|
|
|
P:=Pos(' ',S);
|
|
|
If P=0 then
|
|
@@ -3602,7 +3591,7 @@ constructor TPackageVariant.Create(ACollection: TCollection);
|
|
|
begin
|
|
|
inherited Create(ACollection);
|
|
|
FTargets := TTargets.Create(TTarget);
|
|
|
- FOptions := TUnsortedCompilerOptionsStringList.Create;
|
|
|
+ FOptions := TStringList.Create;
|
|
|
FIncludePath:=TConditionalStrings.Create(TConditionalString);
|
|
|
FSourcePath:=TConditionalStrings.Create(TConditionalString);
|
|
|
end;
|
|
@@ -3792,32 +3781,6 @@ end;
|
|
|
|
|
|
{$endif NO_THREADING}
|
|
|
|
|
|
-{****************************************************************************
|
|
|
- TUnsortedDuplicatesStringList
|
|
|
-****************************************************************************}
|
|
|
-
|
|
|
-function TUnsortedDuplicatesStringList.Add(const S: string): Integer;
|
|
|
-
|
|
|
-begin
|
|
|
- result := IndexOf(S);
|
|
|
- If result > -1 then
|
|
|
- Case DUplicates of
|
|
|
- DupAccept,
|
|
|
- DupIgnore : Exit;
|
|
|
- DupError : Error(SDuplicateString,0)
|
|
|
- end;
|
|
|
- inherited Add(S);
|
|
|
-end;
|
|
|
-
|
|
|
-{****************************************************************************
|
|
|
- TUnsortedCompilerOptionsStringList
|
|
|
-****************************************************************************}
|
|
|
-
|
|
|
-constructor TUnsortedCompilerOptionsStringList.Create;
|
|
|
-begin
|
|
|
- Inherited Create;
|
|
|
- Duplicates:=DupAccept;
|
|
|
-end;
|
|
|
|
|
|
{****************************************************************************
|
|
|
TNamedItem
|
|
@@ -4638,14 +4601,14 @@ end;
|
|
|
function TPackage.GetOptions: TStrings;
|
|
|
begin
|
|
|
If (FOptions=Nil) then
|
|
|
- FOptions:=TUnsortedCompilerOptionsStringList.Create;
|
|
|
+ FOptions:=TStringList.Create;
|
|
|
Result:=FOptions;
|
|
|
end;
|
|
|
|
|
|
function TPackage.GetTransmitOptions: TStrings;
|
|
|
begin
|
|
|
If (FTransmitOptions=Nil) then
|
|
|
- FTransmitOptions:=TUnsortedCompilerOptionsStringList.Create;
|
|
|
+ FTransmitOptions:=TStringList.Create;
|
|
|
Result:=FTransmitOptions;
|
|
|
end;
|
|
|
|
|
@@ -4815,7 +4778,7 @@ Var
|
|
|
T : TTarget;
|
|
|
S, O, FN : String;
|
|
|
SL : TStringList;
|
|
|
- L : TUnsortedDuplicatesStringList;
|
|
|
+ L : TStringList;
|
|
|
I : Integer;
|
|
|
iCPU : TCPU;
|
|
|
iOS : TOS;
|
|
@@ -4846,7 +4809,7 @@ begin
|
|
|
SL.Add('-dUNIX');
|
|
|
SL.Add('-M'+ModeToString(T.Mode));
|
|
|
// Include Path
|
|
|
- L:=TUnsortedDuplicatesStringList.Create;
|
|
|
+ L:=TStringList.Create;
|
|
|
L.Duplicates:=dupIgnore;
|
|
|
AddDependencyPaths(L,depInclude,T);
|
|
|
AddConditionalStrings(P, L,P.IncludePath,Defaults.CompileTarget);
|
|
@@ -5403,7 +5366,7 @@ end;
|
|
|
function TCustomDefaults.GetOptions: TStrings;
|
|
|
begin
|
|
|
If (FOptions=Nil) then
|
|
|
- FOptions:=TUnsortedCompilerOptionsStringList.Create;
|
|
|
+ FOptions:=TStringList.Create;
|
|
|
Result:=FOptions;
|
|
|
end;
|
|
|
|
|
@@ -6375,7 +6338,7 @@ begin
|
|
|
else if assigned(CustomFpmakeCommandlineOptions) and CheckCustomOption(I,CustOptName) then
|
|
|
begin
|
|
|
if not assigned(CustomFpMakeCommandlineValues) then
|
|
|
- CustomFpMakeCommandlineValues := TUnsortedCompilerOptionsStringList.Create;
|
|
|
+ CustomFpMakeCommandlineValues := TStringList.Create;
|
|
|
CustomFpMakeCommandlineValues.Values[CustOptName]:=OptionArg(I, true)
|
|
|
end
|
|
|
else if (not CheckBuildOptionSetValue(I)) and (not CheckPackageVariantOptionSetValue(I))
|
|
@@ -7952,7 +7915,7 @@ procedure TBuildEngine.GetCompilerCommand(Args: TStrings; APackage: TPackage;
|
|
|
ATarget: TTarget; Env: TStrings);
|
|
|
|
|
|
Var
|
|
|
- L : TUnsortedDuplicatesStringList;
|
|
|
+ L : TStringList;
|
|
|
s : string;
|
|
|
ExtCmd,ErrS: string;
|
|
|
i : Integer;
|
|
@@ -7986,7 +7949,7 @@ begin
|
|
|
Args.Add('-FE'+AddPathPrefix(APackage,APackage.GetBinOutputDir(Defaults.CompileTarget)));
|
|
|
Args.Add('-FU'+AddPathPrefix(APackage,APackage.GetUnitsOutputDir(Defaults.CompileTarget)));
|
|
|
// Object Path
|
|
|
- L:=TUnsortedDuplicatesStringList.Create;
|
|
|
+ L:=TStringList.Create;
|
|
|
L.Duplicates:=dupIgnore;
|
|
|
AddConditionalStrings(APackage, L,APackage.ObjectPath, Defaults.CompileTarget);
|
|
|
AddConditionalStrings(APackage, L,ATarget.ObjectPath, Defaults.CompileTarget);
|
|
@@ -7994,7 +7957,7 @@ begin
|
|
|
Args.Add('-Fo'+AddPathPrefix(APackage,L[i]));
|
|
|
FreeAndNil(L);
|
|
|
// Unit Dirs
|
|
|
- L:=TUnsortedDuplicatesStringList.Create;
|
|
|
+ L:=TStringList.Create;
|
|
|
L.Duplicates:=dupIgnore;
|
|
|
AddDependencyUnitPaths(L,APackage);
|
|
|
AddDependencyPaths(L,depUnit,ATarget);
|
|
@@ -8004,7 +7967,7 @@ begin
|
|
|
Args.Add('-Fu'+AddPathPrefix(APackage,L[i]));
|
|
|
FreeAndNil(L);
|
|
|
// Include Path
|
|
|
- L:=TUnsortedDuplicatesStringList.Create;
|
|
|
+ L:=TStringList.Create;
|
|
|
L.Duplicates:=dupIgnore;
|
|
|
AddDependencyPaths(L,depInclude,ATarget);
|
|
|
AddConditionalStrings(APackage, L,APackage.IncludePath, Defaults.CompileTarget);
|
|
@@ -9387,7 +9350,7 @@ Var
|
|
|
RemainingList : TStrings;
|
|
|
i : longint;
|
|
|
begin
|
|
|
- List:=TUnsortedDuplicatesStringList.Create;
|
|
|
+ List:=TStringList.Create;
|
|
|
List.Duplicates:=DupIgnore;
|
|
|
try
|
|
|
List.Add(APackage.GetUnitConfigOutputFilename(aTarget));
|
|
@@ -9395,7 +9358,7 @@ begin
|
|
|
if (List.Count>0) then
|
|
|
begin
|
|
|
CmdDeleteFiles(List);
|
|
|
- DirectoryList:=TUnsortedDuplicatesStringList.Create;
|
|
|
+ DirectoryList:=TStringList.Create;
|
|
|
DirectoryList.Duplicates:=DupIgnore;
|
|
|
try
|
|
|
GetDirectoriesFromFilelist(List,DirectoryList);
|
|
@@ -10108,7 +10071,7 @@ end;
|
|
|
function TTarget.GetOptions: TStrings;
|
|
|
begin
|
|
|
If Foptions=Nil then
|
|
|
- FOptions:=TUnsortedCompilerOptionsStringList.Create;
|
|
|
+ FOptions:=TStringList.Create;
|
|
|
Result:=FOptions;
|
|
|
end;
|
|
|
|
|
@@ -11121,7 +11084,7 @@ end;
|
|
|
function TCommand.GetOptions: TStrings;
|
|
|
begin
|
|
|
If (FOptions=Nil) then
|
|
|
- FOptions:=TUnsortedCompilerOptionsStringList.Create;
|
|
|
+ FOptions:=TStringList.Create;
|
|
|
Result:=FOptions;
|
|
|
end;
|
|
|
|