Hi thomas,
it makes the following difference
with CB rev_2801 i had to wait until all warnings got catched ... 8 minutes !!!
-------------- Build: Debug in wx_console ---------------
mingw32-g++.exe -W -pipe -mthreads -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DUSE_PCH -g -Id:\wx263\include -Id:\wx263\lib\gcc_dll\mswu -Id:\wx263\contrib\include -ID:\MinGW\include -c wx_pch.h -o wx_pch.h.gch\Debug_wx_pch.h.gch
In file included from d:/wx263/include/wx/string.h:55,
from d:/wx263/include/wx/memory.h:20,
from d:/wx263/include/wx/object.h:25,
from d:/wx263/include/wx/wx.h:16,
from d:/wx263/include/wx/wxprec.h:54,
from ./wx_pch.h:9,
from <command line>:7:
d:/wx263/include/wx/buffer.h:96: warning: inline function 'wxCharBuffer::wxCharBuffer(const char*)' is declared as dllimport: attribute ignored.
d:/wx263/include/wx/buffer.h:96: warning: inline function 'wxCharBuffer::wxCharBuffer(const char*)' is declared as dllimport: attribute ignored.
...
Process terminated with status 0 (8 minutes, 12 seconds)
0 errors, 4490 warnings
with your patch applied i got 39 sec. .... much better !!!!
-------------- Build: Debug in wx_console ---------------
mingw32-g++.exe -W -pipe -mthreads -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DUSE_PCH -g -Id:\wx263\include -Id:\wx263\lib\gcc_dll\mswu -Id:\wx263\contrib\include -ID:\MinGW\include -c wx_pch.h -o wx_pch.h.gch\Debug_wx_pch.h.gch
In file included from d:/wx263/include/wx/string.h:55,
from d:/wx263/include/wx/memory.h:20,
from d:/wx263/include/wx/object.h:25,
from d:/wx263/include/wx/wx.h:16,
from d:/wx263/include/wx/wxprec.h:54,
from ./wx_pch.h:9,
from <command line>:7:
d:/wx263/include/wx/buffer.h:96: warning: inline function 'wxCharBuffer::wxCharBuffer(const char*)' is declared as dllimport: attribute ignored.
d:/wx263/include/wx/buffer.h:96: warning: inline function 'wxCharBuffer::wxCharBuffer(const char*)' is declared as dllimport: attribute ignored.
...
Aborting process 0...
Process terminated with status 0 (0 minutes, 39 seconds)
0 errors, 436 warnings
thanks thomas, fine improvement !
one little "cosmetic" change would be fine ...
we should display the "Aborting process ..." before discarding all further messages from the pipeline,
so that the user knows that the Abort-button is processed actually.
Be patient!
This process will be aborted soon...
under windoze, the
wxProcess::Kill(m_Pid[i], wxSIGTERM);
obviously does nothing and does not return, until the signalled process finishes normally.
Therefore it is necessary under windoze, to send the Buildlog message before wxProcess::Kill() is called.
i did a test with the following patch and it works under windoze ok.
plugins\compilergcc\compilergcc.cpp:2273...
int CompilerGCC::KillProcess()
{
ResetBuildState();
m_RunAfterCompile = false;
if (!IsProcessRunning())
return 0;
wxKillError ret = wxKILL_OK;
m_CommandQueue.Clear();
for (size_t i = 0; i < m_ParallelProcessCount; ++i)
{
if (!m_Processes[i])
continue;
#ifdef __WXMSW__
Manager::Get()->GetMessageManager()->Log(m_PageIndex, _("Aborting process %d ... Be patient!"), i);
#endif // __WXMSW__
// Close input pipe
m_Processes[i]->CloseOutput();
((PipedProcess*) m_Processes[i])->ForfeitStreams();
ret = wxProcess::Kill(m_Pid[i], wxSIGTERM);
#ifndef __WXMSW__
if(ret != wxKILL_OK)
{
// No need to tell the user about the errors - just keep him waiting.
Manager::Get()->GetMessageManager()->Log(m_PageIndex, _("Aborting process %d ..."), i);
}
else switch (ret)
{
// case wxKILL_ACCESS_DENIED: cbMessageBox(_("Access denied")); break;
// case wxKILL_NO_PROCESS: cbMessageBox(_("No process")); break;
// case wxKILL_BAD_SIGNAL: cbMessageBox(_("Bad signal")); break;
// case wxKILL_ERROR: cbMessageBox(_("Unspecified error")); break;
case wxKILL_OK:
default: break;//Manager::Get()->GetMessageManager()->Log(m_PageIndex, _("Process killed..."));
}
#endif // __WXMSW__
}
return ret;
}
how does this work under linux ?
is the linux case necessary or could it be thrown completely ?
and maybe simplified to
int CompilerGCC::KillProcess()
{
ResetBuildState();
m_RunAfterCompile = false;
if (!IsProcessRunning())
return 0;
wxKillError ret = wxKILL_OK;
m_CommandQueue.Clear();
for (size_t i = 0; i < m_ParallelProcessCount; ++i)
{
if (!m_Processes[i])
continue;
#ifdef __WXMSW__
Manager::Get()->GetMessageManager()->Log(m_PageIndex, _("Aborting process %d ... Be patient!"), i);
#else
Manager::Get()->GetMessageManager()->Log(m_PageIndex, _("Aborting process %d ..."), i);
#endif // __WXMSW__
// Close input pipe
m_Processes[i]->CloseOutput();
((PipedProcess*) m_Processes[i])->ForfeitStreams();
ret = wxProcess::Kill(m_Pid[i], wxSIGTERM);
}
return ret;
}