fix #246 - Add compiler name to log

This commit is contained in:
Basile Burg 2018-02-25 08:25:58 +01:00
parent d2df199d82
commit 9d91bc28de
3 changed files with 16 additions and 0 deletions

View File

@ -818,6 +818,7 @@ begin
fCompilProc := TCEProcess.Create(nil);
subjProjCompiling(fProjectSubject, self as ICECommonProject);
fMsgs.message('compiling ' + prjname, self as ICECommonProject, amcProj, amkInf);
fMsgs.message(usingCompilerInfo(CEProjectCompiler), self as ICECommonProject, amcProj, amkInf);
// this doesn't work under linux, so the previous ChDir.
if prjpath.dirExists then
fCompilProc.CurrentDirectory := prjpath;

View File

@ -363,6 +363,11 @@ type
procedure getCompilerImports(value: DCompiler; paths: TStrings);
end;
// Returns a string indicating the which compiler will be used.
function usingCompilerInfo(value: DCompiler): string;
type
(**
* Single service that provides access to the main menu.
*)
@ -591,4 +596,13 @@ begin
end;
{$ENDREGION}
function usingCompilerInfo(value: DCompiler): string;
const
c2id: array[DCompiler] of string = ('dmd', 'gdc', 'gdmd', 'ldc', 'ldmd',
'user1', 'user2');
begin
result := format('using %s (%s)',
[getCompilerSelector.getCompilerPath(value), c2id[value]]);
end;
end.

View File

@ -2890,6 +2890,7 @@ begin
dmdproc := TCEProcess.Create(nil);
try
fMsgs.message('compiling ' + shortenPath(fDoc.fileName, 25), fDoc, amcEdit, amkInf);
fMsgs.message(usingCompilerInfo(fRunnablesOptions.compiler), fDoc, amcEdit, amkInf);
if fDoc.fileName.fileExists then
fDoc.save
else