1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmMessageCommand.h,v $
6 Date: $Date: 2008-01-23 15:27:59 $
7 Version: $Revision: 1.16 $
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([SEND_ERROR | STATUS | FATAL_ERROR]\n"
69 " \"message to display\" ...)\n"
70 "By default the message is displayed in a pop up window (CMakeSetup), "
71 "or in the stdout of cmake, or the error section of ccmake. "
72 "If the first argument is "
73 "SEND_ERROR then an error is raised, and the generate phase will "
74 "be skipped. If the first argument is FATAL_ERROR, all processing "
75 "is halted. If the first argument is STATUS then the message is "
76 "displayed in the progress line for the GUI, or with a -- in the "
77 "command line cmake.";
80 cmTypeMacro(cmMessageCommand
, cmCommand
);