[cmake-developers] Capturing messages to log files

Clifford Yapp cliffyapp at gmail.com
Tue Jul 21 12:48:11 EDT 2015


On Mon, Jul 20, 2015 at 9:36 AM, Brad King <brad.king at kitware.com> wrote:
> On 07/18/2015 03:45 PM, Clifford Yapp wrote:
>> Am I correct that cmSystemTools::Message is the gateway through which
>> all of the console output from CMake exits?  If so, perhaps the
>> simplest thing to do is simply allow copying to a log file at that
>> point?  It would be nice to have files containing only errors, only
>> warnings, etc. but it's not immediately clear to me how to set
>> something like that up...
>
> Look at Source/QtDialog/QCMake.cxx for use of SetStdoutCallback,
> SetStderrCallback, SetMessageCallback, and SetProgressCallback.
> The cmake-gui uses those to capture everything for display in
> the dialog.
>
> -Brad

Ah - thanks for the pointer.  Working on understanding how the various
overrides work - cmakemainProgressCallback et. al. and how Qt is
handling the various bits.

Cheers,
CY


More information about the cmake-developers mailing list