mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 21:41:01 +02:00
Merge branch 'IDE/Options/ShowCompOpts' into 'main'
ShowCompilerOpts: Show the compiler path and main project file first in the list of options See merge request freepascal.org/lazarus/lazarus!306
This commit is contained in:
commit
f6653b4638
@ -300,15 +300,25 @@ var
|
||||
begin
|
||||
if CompilerOpts=nil then exit;
|
||||
|
||||
// set flags
|
||||
Flags:=CompilerOpts.DefaultMakeOptionsFlags;
|
||||
Include(Flags, ccloAddCompilerPath);
|
||||
if not RelativePathsCheckBox.Checked then
|
||||
Include(Flags,ccloAbsolutePaths);
|
||||
|
||||
// get command line parameters (include compiler path)
|
||||
CompOptions := CompilerOpts.MakeCompilerParams(Flags);
|
||||
try
|
||||
CompPath:=CompilerOpts.ParsedOpts.GetParsedValue(pcosCompilerPath);
|
||||
if Pos(' ',CompPath)>0 then
|
||||
CompPath:=QuotedStr(CompPath);
|
||||
CompOptions.Add(CompPath);
|
||||
// add the main project unit after the compiler path
|
||||
if (Project1<>nil) and (Project1.MainUnitInfo<>nil) and (CompOptions.Count>0) then
|
||||
begin
|
||||
if RelativePathsCheckBox.Checked then
|
||||
CompOptions.Insert(1, Project1.MainUnitInfo.ShortFilename)
|
||||
else
|
||||
CompOptions.Insert(1, Project1.MainUnitInfo.GetFullFilename);
|
||||
end;
|
||||
|
||||
// show
|
||||
FillMemo(CmdLineMemo,CompOptions);
|
||||
finally
|
||||
CompOptions.Free;
|
||||
|
Loading…
Reference in New Issue
Block a user