summaryrefslogtreecommitdiff
path: root/Source/cmMessageCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-03-06 12:06:43 -0500
committerBrad King <brad.king@kitware.com>2009-03-06 12:06:43 -0500
commitb04c37c700d8da00849a65203c19067122340391 (patch)
tree0973500b73ad9c94a5145e80114e0ee8f2889ebd /Source/cmMessageCommand.cxx
parentca3b93d9c6a816afd7a07bf218c8884510219cf4 (diff)
downloadcmake-b04c37c700d8da00849a65203c19067122340391.tar.gz
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.
Diffstat (limited to 'Source/cmMessageCommand.cxx')
-rw-r--r--Source/cmMessageCommand.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx
index 7e66e05dba..90f023b2f0 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;
}