i used the following patch for testing the behaviour of 2.
Index: trunk/src/plugins/compilergcc/compilergcc.cpp
===================================================================
--- trunk/src/plugins/compilergcc/compilergcc.cpp (revision 3133)
+++ trunk/src/plugins/compilergcc/compilergcc.cpp (working copy)
@@ -1030,6 +1030,10 @@
// msgMan->Log(m_PageIndex, _T("[%u] %s"), procIndex, cmd->message.c_str());
LogMessage(cmd->message);
}
+ if (!cmd->command.IsEmpty())
+ {
+ LogMessage(_T(">>>") + cmd->command,false,false,false,true);
+ }
if (cmd->command.IsEmpty())
{
which results in pretty nice logs:
IDE build log:
-------------- Build: default in datetime ---------------
Compiling: dt.rc
Compiling: main.cpp
Compiling: controls.cpp
Linking executable: dt.exe
Process terminated with status 0 (0 minutes, 2 seconds)
0 errors, 0 warnings
Build log saved as: D:\Devel\_projects\datetime\datetime_build_log.html
build_log.html file
Build started on: 24-10-2006 at 12:02.19
Build ended on: 24-10-2006 at 12:02.21
-------------- Build: default in datetime ---------------
Compiling: dt.rc
>>>windres.exe -i dt.rc -J rc -o .objs\dt.res -O coff -ID:\MinGW\include
Compiling: main.cpp
>>>mingw32-g++.exe -Os -Wall -g -ID:\MinGW\include -c main.cpp -o .objs\main.o
Compiling: controls.cpp
>>>mingw32-g++.exe -Os -Wall -g -ID:\MinGW\include -c controls.cpp -o .objs\controls.o
Linking executable: dt.exe
>>>mingw32-g++.exe -LD:\MinGW\lib -o dt.exe .objs\main.o .objs\controls.o .objs\dt.res -mwindows
Process terminated with status 0 (0 minutes, 2 seconds)
0 errors, 0 warnings
but this solution works only when compiler logging is set to "Task description"
@mandrav
what do you think about changing the compiler logging output format in general,
so that full compiler logging always shows the messages from the Task description and the commandline,
as shown in the above example for the buildlog.html file ?
brgds
look at this code :
void CompilerGCC::InitBuildLog(bool workspaceBuild)
{
wxString title;
wxString basepath;
wxString basename;
if (!workspaceBuild && m_Project)
{
title = m_Project->GetTitle();
basepath = m_Project->GetBasePath();
basename = wxFileName(m_Project->GetFilename()).GetName();
basename = _T("baa");
}
else if (workspaceBuild)
{
cbWorkspace* wksp = Manager::Get()->GetProjectManager()->GetWorkspace();
title = wksp->GetTitle();
basepath = wxFileName(wksp->GetFilename()).GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);
basename = wxFileName(wksp->GetFilename()).GetName();
basename = _T("boo");
}
if (basename.IsEmpty())
basename = _T("unnamed");
// init HTML build log
m_BuildStartTime = wxDateTime::Now();
m_BuildLogTitle = title + _(" build log");
m_BuildLogFilename = basepath;
m_BuildLogFilename << basename << _T("_build_log.html");
m_BuildLogContents.Clear();
}
I added that "baa" and "boo", and we end up at the "boo", meaning that the bool that enters is on true and says it's a workspace build, which it was not.
This can only happen when called from :
int CompilerGCC::BuildWorkspace(const wxString& target)
because of :
int CodeBlocksApp::BatchJob()
{
...
if (m_ReBuild)
compiler->RebuildWorkspace(m_BatchTarget);
else if (m_Build)
compiler->BuildWorkspace(m_BatchTarget);