mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-30 16:22:46 +02:00
IDE: warn if fpc has no config file
git-svn-id: trunk@28939 -
This commit is contained in:
parent
a2157c46f8
commit
dc5709cc8a
@ -840,6 +840,7 @@ type
|
||||
class function GetInvalidChangeStamp: integer;
|
||||
procedure IncreaseChangeStamp;
|
||||
function GetUnitSetID: string;
|
||||
function GetFirstFPCCfg: string;
|
||||
end;
|
||||
|
||||
{ TFPCDefinesCache }
|
||||
@ -8823,6 +8824,23 @@ begin
|
||||
CompilerOptions,FPCSourceDirectory,ChangeStamp);
|
||||
end;
|
||||
|
||||
function TFPCUnitSetCache.GetFirstFPCCfg: string;
|
||||
var
|
||||
Cfg: TFPCTargetConfigCache;
|
||||
i: Integer;
|
||||
begin
|
||||
Result:='';
|
||||
Cfg:=GetConfigCache(false);
|
||||
if Cfg=nil then exit;
|
||||
if Cfg.ConfigFiles=nil then exit;
|
||||
for i:=0 to Cfg.ConfigFiles.Count-1 do begin
|
||||
if Cfg.ConfigFiles[i].FileExists then begin
|
||||
Result:=Cfg.ConfigFiles[i].Filename;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
InitDefaultFPCSourceRules;
|
||||
|
||||
|
@ -712,6 +712,12 @@ begin
|
||||
Format(lisTheProjectUsesTargetOSAndCPUTheSystemPpuForThisTar, [
|
||||
TargetOS, TargetCPU, #13, #13]),
|
||||
mtError,[mbOk]);
|
||||
end else if (UnitSetCache<>nil) then begin
|
||||
if UnitSetCache.GetFirstFPCCfg='' then begin
|
||||
IDEMessageDialog(lisCCOWarningCaption,
|
||||
lisTheCurrentFPCHasNoConfigFileItWillProbablyMissSome,
|
||||
mtWarning,[mbOk]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -5095,6 +5095,9 @@ resourcestring
|
||||
lisApplyConventions = 'Apply conventions';
|
||||
lisKeepRelativeIndentationOfMultiLineTemplate = 'Keep relative indentation '
|
||||
+'of multi line template';
|
||||
lisTheCurrentFPCHasNoConfigFileItWillProbablyMissSome = 'The current FPC '
|
||||
+'has no config file. It will probably miss some units. Check your '
|
||||
+'installation of fpc.';
|
||||
|
||||
implementation
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user