mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 23:29:16 +02:00
IDE: check if compiler was changed before compiling
git-svn-id: trunk@29743 -
This commit is contained in:
parent
20860be566
commit
672a743b6d
@ -66,6 +66,7 @@ type
|
||||
|
||||
procedure RescanCompilerDefines(ResetBuildTarget, ClearCaches,
|
||||
WaitTillDone, Quiet: boolean); virtual; abstract;
|
||||
function CompilerOnDiskChanged: boolean; virtual; abstract;
|
||||
|
||||
function CheckAmbiguousSources(const AFilename: string;
|
||||
Compiling: boolean): TModalResult; virtual; abstract;
|
||||
|
@ -165,6 +165,7 @@ type
|
||||
procedure UpdateEnglishErrorMsgFilename;
|
||||
procedure RescanCompilerDefines(ResetBuildTarget, ClearCaches,
|
||||
WaitTillDone, Quiet: boolean); override;
|
||||
function CompilerOnDiskChanged: boolean; override;
|
||||
procedure LoadFPCDefinesCaches;
|
||||
procedure SaveFPCDefinesCaches;
|
||||
property UnitSetCache: TFPCUnitSetCache read FUnitSetCache write SetUnitSetCache;
|
||||
@ -750,6 +751,17 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TBuildManager.CompilerOnDiskChanged: boolean;
|
||||
var
|
||||
CfgCache: TFPCTargetConfigCache;
|
||||
begin
|
||||
Result:=false;
|
||||
if UnitSetCache=nil then exit;
|
||||
CfgCache:=UnitSetCache.GetConfigCache(false);
|
||||
if CfgCache=nil then exit;
|
||||
Result:=CfgCache.NeedsUpdate;
|
||||
end;
|
||||
|
||||
procedure TBuildManager.LoadFPCDefinesCaches;
|
||||
var
|
||||
aFilename: String;
|
||||
|
@ -12402,6 +12402,9 @@ begin
|
||||
Result:=DebugBoss.DoStopProject;
|
||||
if Result<>mrOk then exit;
|
||||
end;
|
||||
|
||||
if MainBuildBoss.CompilerOnDiskChanged then
|
||||
MainBuildBoss.RescanCompilerDefines(false,false,false,false);
|
||||
end;
|
||||
|
||||
function TMainIDE.OnRunExternalTool(Tool: TIDEExternalToolOptions): TModalResult;
|
||||
|
Loading…
Reference in New Issue
Block a user