![]() |
TCM 1.1.0
A CMake module to reduce boilerplate
|
TCM provides some logging functions. Following variables will alter its behaviours:
CMAKE_COLOR_DIAGNOSTICS automatically.During setup:
CMAKE_MESSAGE_CONTEXT_SHOW is not already set by the user, it defaults to TRUE.CMAKE_MESSAGE_CONTEXT is not already set by the user, it defaults to ${PROJECT_NAME}.TCM provides two handy functions to manipulate CMAKE_MESSAGE_CONTEXT :
tcm_section("...") - append a name to CMAKE_MESSAGE_CONTEXT.tcm_section_end() - pop last element from CMAKE_MESSAGE_CONTEXT.Most of the time, you don't have to close a section, unless you want to open and close them in the same scope. CMake's scoping rules take care of this.
You can also use tcm_indent() and tcm_outdent() for indenting/outdenting messages.