1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmMessageCommand.cxx,v $
6 Date: $Date: 2008-04-14 13:20:16 $
7 Version: $Revision: 1.23 $
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 bool send_error
= false;
32 bool fatal_error
= false;
34 if (*i
== "SEND_ERROR")
48 if (*i
== "FATAL_ERROR")
56 for(;i
!= args
.end(); ++i
)
61 if (send_error
|| fatal_error
)
63 this->Makefile
->IssueMessage(cmake::FATAL_ERROR
, message
.c_str());
69 this->Makefile
->DisplayStatus(message
.c_str(), -1);
73 cmSystemTools::Message(message
.c_str());
78 cmSystemTools::SetFatalErrorOccured();