1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmMessageCommand.cxx,v $
6 Date: $Date: 2009-03-06 17:06:41 $
7 Version: $Revision: 1.25 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #include "cmMessageCommand.h"
21 ::InitialPass(std::vector
<std::string
> const& args
, cmExecutionStatus
&)
25 this->SetError("called with incorrect number of arguments");
29 std::vector
<std::string
>::const_iterator i
= args
.begin();
31 cmake::MessageType type
= cmake::MESSAGE
;
34 if (*i
== "SEND_ERROR")
36 type
= cmake::FATAL_ERROR
;
39 else if (*i
== "FATAL_ERROR")
42 type
= cmake::FATAL_ERROR
;
45 else if (*i
== "WARNING")
47 type
= cmake::WARNING
;
50 else if (*i
== "AUTHOR_WARNING")
52 type
= cmake::AUTHOR_WARNING
;
55 else if (*i
== "STATUS")
61 for(;i
!= args
.end(); ++i
)
66 if (type
!= cmake::MESSAGE
)
68 this->Makefile
->IssueMessage(type
, message
.c_str());
74 this->Makefile
->DisplayStatus(message
.c_str(), -1);
78 cmSystemTools::Message(message
.c_str());
83 cmSystemTools::SetFatalErrorOccured();