summaryrefslogtreecommitdiffstats
path: root/Source/cmMessageCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2016-01-28 21:10:27 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-25 13:47:27 (GMT)
commit421012a330989a64b24a3289379bb4938e6ed3ea (patch)
tree02c059dff6075626a5edaeedcb8477ea6aaa058e /Source/cmMessageCommand.cxx
parent14a8d61fd49a9b990cbef7e1495e4763f31c55f2 (diff)
downloadCMake-421012a330989a64b24a3289379bb4938e6ed3ea.zip
CMake-421012a330989a64b24a3289379bb4938e6ed3ea.tar.gz
CMake-421012a330989a64b24a3289379bb4938e6ed3ea.tar.bz2
cmMessenger: Extract from cmake class
This way messages can be issued independent of the cmake instance. It is now possible to make DisplayMessage a virtual interface and override it to handle messages in the cmake-gui or future IDE interaction interfaces.
Diffstat (limited to 'Source/cmMessageCommand.cxx')
-rw-r--r--Source/cmMessageCommand.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx
index 080880b..c48910e 100644
--- a/Source/cmMessageCommand.cxx
+++ b/Source/cmMessageCommand.cxx
@@ -11,6 +11,8 @@
============================================================================*/
#include "cmMessageCommand.h"
+#include "cmMessenger.h"
+
// cmLibraryCommand
bool cmMessageCommand::InitialPass(std::vector<std::string> const& args,
cmExecutionStatus&)
@@ -65,8 +67,8 @@ bool cmMessageCommand::InitialPass(std::vector<std::string> const& args,
if (type != cmake::MESSAGE) {
// we've overriden the message type, above, so display it directly
- cmake* cm = this->Makefile->GetCMakeInstance();
- cm->DisplayMessage(type, message, this->Makefile->GetBacktrace());
+ cmMessenger* m = this->Makefile->GetMessenger();
+ m->DisplayMessage(type, message, this->Makefile->GetBacktrace());
} else {
if (status) {
this->Makefile->DisplayStatus(message.c_str(), -1);