mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-08 10:09:37 +01:00
IDE: warn for macro cicles in project compiler options dialog, bug #18461
git-svn-id: trunk@29198 -
This commit is contained in:
parent
4a27b745a3
commit
d9cc4dbb7f
@ -7,7 +7,7 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLProc, FileUtil, Forms, Controls, Dialogs, Graphics,
|
Classes, SysUtils, LCLProc, FileUtil, Forms, Controls, Dialogs, Graphics,
|
||||||
Buttons, StdCtrls, LCLType, InterfaceBase,
|
Buttons, StdCtrls, LCLType, InterfaceBase,
|
||||||
IDEOptionsIntf, MacroIntf,
|
IDEOptionsIntf, MacroIntf, IDEDialogs,
|
||||||
Project, CompilerOptions, LazarusIDEStrConsts, PathEditorDlg, LazConf,
|
Project, CompilerOptions, LazarusIDEStrConsts, PathEditorDlg, LazConf,
|
||||||
IDEProcs, CheckCompilerOpts, ShowCompilerOpts, MainIntf;
|
IDEProcs, CheckCompilerOpts, ShowCompilerOpts, MainIntf;
|
||||||
|
|
||||||
@ -131,9 +131,13 @@ var
|
|||||||
NewParsedDebugPath:=FCompilerOpts.GetDebugPath(False,coptParsed,false);
|
NewParsedDebugPath:=FCompilerOpts.GetDebugPath(False,coptParsed,false);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
o: TParsedCompilerOptString;
|
||||||
|
Msg: String;
|
||||||
begin
|
begin
|
||||||
GetParsedPaths;
|
Result:=false;
|
||||||
|
|
||||||
|
GetParsedPaths;
|
||||||
|
|
||||||
OldParsedIncludePath := NewParsedIncludePath;
|
OldParsedIncludePath := NewParsedIncludePath;
|
||||||
OldUnparsedIncludePath := FCompilerOpts.IncludePath;
|
OldUnparsedIncludePath := FCompilerOpts.IncludePath;
|
||||||
@ -146,7 +150,6 @@ begin
|
|||||||
OldParsedDebugPath := NewParsedDebugPath;
|
OldParsedDebugPath := NewParsedDebugPath;
|
||||||
OldUnparsedDebugPath := FCompilerOpts.DebugPath;
|
OldUnparsedDebugPath := FCompilerOpts.DebugPath;
|
||||||
|
|
||||||
Result:=false;
|
|
||||||
try
|
try
|
||||||
FCompilerOpts.IncludePath := IncludeFilesEdit.Text;
|
FCompilerOpts.IncludePath := IncludeFilesEdit.Text;
|
||||||
FCompilerOpts.Libraries := LibrariesEdit.Text;
|
FCompilerOpts.Libraries := LibrariesEdit.Text;
|
||||||
@ -155,6 +158,40 @@ begin
|
|||||||
FCompilerOpts.DebugPath := DebugPathEdit.Text;
|
FCompilerOpts.DebugPath := DebugPathEdit.Text;
|
||||||
GetParsedPaths;
|
GetParsedPaths;
|
||||||
|
|
||||||
|
if FCompilerOpts.ParsedOpts.HasParsedError then begin
|
||||||
|
o:=FCompilerOpts.ParsedOpts.ParsedErrorOption;
|
||||||
|
case o of
|
||||||
|
pcosBaseDir:
|
||||||
|
Msg:='I wonder how you did that: Error in the base directory:';
|
||||||
|
pcosUnitPath:
|
||||||
|
Msg:='Error in the search path for "Other unit files":';
|
||||||
|
pcosIncludePath:
|
||||||
|
Msg:='Error in the search path for "Include files":';
|
||||||
|
pcosObjectPath:
|
||||||
|
Msg:='Error in the search path for "Object files":';
|
||||||
|
pcosLibraryPath:
|
||||||
|
Msg:='Error in the search path for "Libraries":';
|
||||||
|
pcosSrcPath:
|
||||||
|
Msg:='Error in the search path for "Other sources":';
|
||||||
|
pcosLinkerOptions:
|
||||||
|
Msg:='Error in the custom linker options (Linking / Pass options to linker):';
|
||||||
|
pcosCustomOptions:
|
||||||
|
Msg:='Error in the custom compiler options (Other):';
|
||||||
|
pcosOutputDir:
|
||||||
|
Msg:='Error in the "unit output directory":';
|
||||||
|
pcosCompilerPath:
|
||||||
|
Msg:='Error in the compiler file name:';
|
||||||
|
pcosDebugPath:
|
||||||
|
Msg:='Error in the "Debugger path addition":';
|
||||||
|
else
|
||||||
|
Msg:='I wonder how you did that. Error in the '+ParsedCompilerOptStringNames[o]+':';
|
||||||
|
end;
|
||||||
|
Msg:=Msg+#13+FCompilerOpts.ParsedOpts.ParsedErrorMsg+#13
|
||||||
|
+'Value: '+dbgstr(FCompilerOpts.ParsedOpts.UnparsedValues[o]);
|
||||||
|
IDEMessageDialog('Error',Msg,mtError,[mbCancel]);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
if not CheckPutSearchPath('include search path', OldParsedIncludePath, NewParsedIncludePath) then
|
if not CheckPutSearchPath('include search path', OldParsedIncludePath, NewParsedIncludePath) then
|
||||||
Exit;
|
Exit;
|
||||||
if not CheckPutSearchPath('library search path', OldParsedLibraryPath, NewParsedLibraries) then
|
if not CheckPutSearchPath('library search path', OldParsedLibraryPath, NewParsedLibraries) then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user