From a6e68ac582a2e0f77af2ae38a850a039e7e90e9d Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Thu, 22 Jun 2006 15:37:58 -0400 Subject: [PATCH] ENH: Use CMake's error reporting mechanism --- Source/cmMessageCommand.cxx | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx index 2ba6fd7a2..7ab17fb91 100644 --- a/Source/cmMessageCommand.cxx +++ b/Source/cmMessageCommand.cxx @@ -57,25 +57,26 @@ bool cmMessageCommand::InitialPass(std::vector const& args) message += *i; } - if (send_error) + if (send_error || fatal_error) { - cmSystemTools::Error(message.c_str()); + //cmSystemTools::Error(message.c_str()); + this->SetError(message.c_str()); } else { - if (status) - { - this->Makefile->DisplayStatus(message.c_str(), -1); - } - else - { - cmSystemTools::Message(message.c_str()); - } + if (status) + { + this->Makefile->DisplayStatus(message.c_str(), -1); + } + else + { + cmSystemTools::Message(message.c_str()); + } } if(fatal_error ) { cmSystemTools::SetFatalErrorOccured(); } - return true; + return (!send_error && !fatal_error); }