packaging: Initial packaging
[platform/upstream/cmake.git] / Source / cmMessageCommand.h
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
4
5   Distributed under the OSI-approved BSD License (the "License");
6   see accompanying file Copyright.txt for details.
7
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
14
15 #include "cmCommand.h"
16
17 /** \class cmMessageCommand
18  * \brief Displays a message to the user
19  *
20  */
21 class cmMessageCommand : public cmCommand
22 {
23 public:
24   /**
25    * This is a virtual constructor for the command.
26    */
27   virtual cmCommand* Clone()
28     {
29     return new cmMessageCommand;
30     }
31
32   /**
33    * This is called when the command is first encountered in
34    * the CMakeLists.txt file.
35    */
36   virtual bool InitialPass(std::vector<std::string> const& args,
37                            cmExecutionStatus &status);
38
39   /**
40    * The name of the command as specified in CMakeList.txt.
41    */
42   virtual const char* GetName() const { return "message";}
43
44   /**
45    * This determines if the command is invoked when in script mode.
46    */
47   virtual bool IsScriptable() const { return true; }
48
49   /**
50    * Succinct documentation.
51    */
52   virtual const char* GetTerseDocumentation() const
53     {
54     return "Display a message to the user.";
55     }
56
57   /**
58    * More documentation.
59    */
60   virtual const char* GetFullDocumentation() const
61     {
62     return
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 "
78       "pop-up boxes."
79       "\n"
80       "CMake Warning and Error message text displays using a simple "
81       "markup language.  "
82       "Non-indented text is formatted in line-wrapped paragraphs delimited "
83       "by newlines.  "
84       "Indented text is considered pre-formatted."
85       ;
86     }
87
88   cmTypeMacro(cmMessageCommand, cmCommand);
89 };
90
91
92 #endif