From b04c37c700d8da00849a65203c19067122340391 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 6 Mar 2009 12:06:43 -0500 Subject: BUG: Fix message(SEND_ERROR) to continue During testing of the new message() signatures I mistakenly concluded that SEND_ERROR stops processing. The corresponding commit enforced this wrong behavior. This restores the correct behavior and fixes the documentation accordingly. --- Source/cmMessageCommand.cxx | 13 ++++++++++++- Source/cmMessageCommand.h | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx index 7e66e05..90f023b 100644 --- a/Source/cmMessageCommand.cxx +++ b/Source/cmMessageCommand.cxx @@ -30,11 +30,18 @@ bool cmMessageCommand cmake::MessageType type = cmake::MESSAGE; bool status = false; - if (*i == "SEND_ERROR" || *i == "FATAL_ERROR") + bool fatal = false; + if (*i == "SEND_ERROR") { type = cmake::FATAL_ERROR; ++i; } + else if (*i == "FATAL_ERROR") + { + fatal = true; + type = cmake::FATAL_ERROR; + ++i; + } else if (*i == "WARNING") { type = cmake::WARNING; @@ -71,6 +78,10 @@ bool cmMessageCommand cmSystemTools::Message(message.c_str()); } } + if(fatal) + { + cmSystemTools::SetFatalErrorOccured(); + } return true; } diff --git a/Source/cmMessageCommand.h b/Source/cmMessageCommand.h index f2496f4..068dd57 100644 --- a/Source/cmMessageCommand.h +++ b/Source/cmMessageCommand.h @@ -72,8 +72,8 @@ public: " STATUS = Incidental information\n" " WARNING = CMake Warning, continue processing\n" " AUTHOR_WARNING = CMake Warning (dev), continue processing\n" + " SEND_ERROR = CMake Error, continue but skip generation\n" " FATAL_ERROR = CMake Error, stop all processing\n" - " SEND_ERROR = CMake Error, stop all processing (legacy)\n" "The CMake command-line tool displays STATUS messages on stdout " "and all other message types on stderr. " "The CMake GUI displays all messages in its log area. " -- cgit v0.12