1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #include "cmMessageCommand.h"
16 ::InitialPass(std::vector<std::string> const& args, cmExecutionStatus &)
20 this->SetError("called with incorrect number of arguments");
24 std::vector<std::string>::const_iterator i = args.begin();
26 cmake::MessageType type = cmake::MESSAGE;
29 if (*i == "SEND_ERROR")
31 type = cmake::FATAL_ERROR;
34 else if (*i == "FATAL_ERROR")
37 type = cmake::FATAL_ERROR;
40 else if (*i == "WARNING")
42 type = cmake::WARNING;
45 else if (*i == "AUTHOR_WARNING")
47 type = cmake::AUTHOR_WARNING;
50 else if (*i == "STATUS")
56 for(;i != args.end(); ++i)
61 if (type != cmake::MESSAGE)
63 this->Makefile->IssueMessage(type, message.c_str());
69 this->Makefile->DisplayStatus(message.c_str(), -1);
73 cmSystemTools::Message(message.c_str());
78 cmSystemTools::SetFatalErrorOccured();