[cmake-developers] Wrapping functions in CMake

Clifford Yapp cliffyapp at gmail.com
Thu Jul 9 13:53:48 EDT 2015


On Thu, Jul 9, 2015 at 1:35 PM, Clifford Yapp <cliffyapp at gmail.com> wrote:

> 3.  Have one or a number of variables that will hold in memory all the
> text written out by message (CMAKE_MESSAGES, CMAKE_STATUS_MESSAGES,
> CMAKE_ERROR_MESSAGES, etc.) so the CMakeLists.txt file can create log
> files reflecting what the user is seeing on the console window.

Actually, thinking about that, what's really needed is not an
in-memory log but a way to specify log files, since an unexpected
crash or exit is not a situation under which such in-memory logs could
be reliably written to disk.  So it would instead need to be
CMAKE_STATUS_MESSAGE_LOG, CMAKE_ERROR_MESSAGES_LOG, etc. which would
hold paths to which messages would be copied before being written to
stdout/stderr.

Cheers,
Cliff


More information about the cmake-developers mailing list