codetools: added TPCTargetConfigCache.Kind

git-svn-id: trunk@56780 -
This commit is contained in:
mattias 2017-12-18 17:10:42 +00:00
parent 0d058c9c07
commit 0e22f592cb
2 changed files with 18 additions and 2 deletions

View File

@ -8443,7 +8443,8 @@ begin
then
exit;
end;
if (CompilerDate<>Item.CompilerDate)
if (Kind<>Item.Kind)
or (CompilerDate<>Item.CompilerDate)
or (RealCompiler<>Item.RealCompiler)
or (RealCompilerDate<>Item.RealCompilerDate)
or (RealTargetOS<>Item.RealTargetOS)
@ -8496,6 +8497,7 @@ begin
Compiler:=Item.Compiler;
CompilerOptions:=Item.CompilerOptions;
// values
Kind:=Item.Kind;
CompilerDate:=Item.CompilerDate;
RealCompiler:=Item.RealCompiler;
RealCompilerDate:=Item.RealCompilerDate;
@ -8598,6 +8600,7 @@ var
begin
Clear;
Kind:=StrToPascalCompiler(XMLConfig.GetValue(Path+'Kind',PascalCompilerNames[pcFPC]));
TargetOS:=XMLConfig.GetValue(Path+'TargetOS','');
TargetCPU:=XMLConfig.GetValue(Path+'TargetCPU','');
Compiler:=XMLConfig.GetValue(Path+'Compiler/File','');
@ -8729,6 +8732,7 @@ var
end;
begin
XMLConfig.SetDeleteValue(Path+'Kind',PascalCompilerNames[Kind],PascalCompilerNames[pcFPC]);
XMLConfig.SetDeleteValue(Path+'TargetOS',TargetOS,'');
XMLConfig.SetDeleteValue(Path+'TargetCPU',TargetCPU,'');
XMLConfig.SetDeleteValue(Path+'Compiler/File',Compiler,'');

View File

@ -278,7 +278,10 @@ const
);
type
TPascalCompiler = (pcFPC, pcDelphi, pcPas2js);
TPascalCompiler = (
pcFPC,
pcDelphi,
pcPas2js);
type
TLSSkippingDirective = (
@ -849,6 +852,7 @@ var
PSourceChangeStepMemManager: TPSourceChangeStepMemManager;
function StrToCompilerMode(const aName: string): TCompilerMode;
function StrToPascalCompiler(const aName: string): TPascalCompiler;
procedure AddCodeToUniqueList(ACode: Pointer; UniqueSortedCodeList: TFPList);
function IndexOfCodeInUniqueList(ACode: Pointer;
@ -958,6 +962,14 @@ begin
Result:=cmFPC;
end;
function StrToPascalCompiler(const aName: string): TPascalCompiler;
begin
for Result:=low(Result) to high(Result) do
if SysUtils.CompareText(aName,PascalCompilerNames[Result])=0 then
exit;
Result:=pcFPC;
end;
procedure AddCodeToUniqueList(ACode: Pointer; UniqueSortedCodeList: TFPList);
var l,m,r: integer;
begin