1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmMessageCommand.h,v $
6 Date: $Date: 2009-03-06 17:06:43 $
7 Version: $Revision: 1.18 $
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 #ifndef cmMessageCommand_h
18 #define cmMessageCommand_h
20 #include "cmCommand.h"
22 /** \class cmMessageCommand
23 * \brief Displays a message to the user
26 class cmMessageCommand
: public cmCommand
30 * This is a virtual constructor for the command.
32 virtual cmCommand
* Clone()
34 return new cmMessageCommand
;
38 * This is called when the command is first encountered in
39 * the CMakeLists.txt file.
41 virtual bool InitialPass(std::vector
<std::string
> const& args
,
42 cmExecutionStatus
&status
);
45 * The name of the command as specified in CMakeList.txt.
47 virtual const char* GetName() { return "message";}
50 * This determines if the command is invoked when in script mode.
52 virtual bool IsScriptable() { return true; }
55 * Succinct documentation.
57 virtual const char* GetTerseDocumentation()
59 return "Display a message to the user.";
65 virtual const char* GetFullDocumentation()
68 " message([STATUS|WARNING|AUTHOR_WARNING|FATAL_ERROR|SEND_ERROR]\n"
69 " \"message to display\" ...)\n"
70 "The optional keyword determines the type of message:\n"
71 " (none) = Important information\n"
72 " STATUS = Incidental information\n"
73 " WARNING = CMake Warning, continue processing\n"
74 " AUTHOR_WARNING = CMake Warning (dev), continue processing\n"
75 " SEND_ERROR = CMake Error, continue but skip generation\n"
76 " FATAL_ERROR = CMake Error, stop all processing\n"
77 "The CMake command-line tool displays STATUS messages on stdout "
78 "and all other message types on stderr. "
79 "The CMake GUI displays all messages in its log area. "
80 "The interactive dialogs (ccmake and CMakeSetup) show STATUS messages "
81 "one at a time on a status line and other messages in interactive "
84 "CMake Warning and Error message text displays using a simple "
86 "Non-indented text is formatted in line-wrapped paragraphs delimited "
88 "Indented text is considered pre-formatted."
92 cmTypeMacro(cmMessageCommand
, cmCommand
);