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 #ifndef cmMessageCommand_h
13 #define cmMessageCommand_h
15 #include "cmCommand.h"
17 /** \class cmMessageCommand
18 * \brief Displays a message to the user
21 class cmMessageCommand : public cmCommand
25 * This is a virtual constructor for the command.
27 virtual cmCommand* Clone()
29 return new cmMessageCommand;
33 * This is called when the command is first encountered in
34 * the CMakeLists.txt file.
36 virtual bool InitialPass(std::vector<std::string> const& args,
37 cmExecutionStatus &status);
40 * The name of the command as specified in CMakeList.txt.
42 virtual const char* GetName() const { return "message";}
45 * This determines if the command is invoked when in script mode.
47 virtual bool IsScriptable() const { return true; }
50 * Succinct documentation.
52 virtual const char* GetTerseDocumentation() const
54 return "Display a message to the user.";
60 virtual const char* GetFullDocumentation() const
63 " message([STATUS|WARNING|AUTHOR_WARNING|FATAL_ERROR|SEND_ERROR]\n"
64 " \"message to display\" ...)\n"
65 "The optional keyword determines the type of message:\n"
66 " (none) = Important information\n"
67 " STATUS = Incidental information\n"
68 " WARNING = CMake Warning, continue processing\n"
69 " AUTHOR_WARNING = CMake Warning (dev), continue processing\n"
70 " SEND_ERROR = CMake Error, continue processing,\n"
71 " but skip generation\n"
72 " FATAL_ERROR = CMake Error, stop processing and generation\n"
73 "The CMake command-line tool displays STATUS messages on stdout "
74 "and all other message types on stderr. "
75 "The CMake GUI displays all messages in its log area. "
76 "The interactive dialogs (ccmake and CMakeSetup) show STATUS messages "
77 "one at a time on a status line and other messages in interactive "
80 "CMake Warning and Error message text displays using a simple "
82 "Non-indented text is formatted in line-wrapped paragraphs delimited "
84 "Indented text is considered pre-formatted."
88 cmTypeMacro(cmMessageCommand, cmCommand);