packaging: Initial packaging
[platform/upstream/cmake.git] / Source / cmEndMacroCommand.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 cmEndMacroCommand_h
13 #define cmEndMacroCommand_h
14
15 #include "cmCommand.h"
16
17 /** \class cmEndMacroCommand
18  * \brief ends an if block
19  *
20  * cmEndMacroCommand ends an if block
21  */
22 class cmEndMacroCommand : public cmCommand
23 {
24 public:
25   /**
26    * This is a virtual constructor for the command.
27    */
28   virtual cmCommand* Clone()
29     {
30     return new cmEndMacroCommand;
31     }
32
33   /**
34    * Override cmCommand::InvokeInitialPass to get arguments before
35    * expansion.
36    */
37   virtual bool InvokeInitialPass(std::vector<cmListFileArgument> const&,
38                                  cmExecutionStatus &);
39
40   /**
41    * This is called when the command is first encountered in
42    * the CMakeLists.txt file.
43    */
44   virtual bool InitialPass(std::vector<std::string> const&,
45                            cmExecutionStatus &) {return false;}
46
47   /**
48    * This determines if the command is invoked when in script mode.
49    */
50   virtual bool IsScriptable() const { return true; }
51
52   /**
53    * The name of the command as specified in CMakeList.txt.
54    */
55   virtual const char* GetName() const { return "endmacro";}
56
57   /**
58    * Succinct documentation.
59    */
60   virtual const char* GetTerseDocumentation() const
61     {
62     return "Ends a list of commands in a macro block.";
63     }
64
65   /**
66    * More documentation.
67    */
68   virtual const char* GetFullDocumentation() const
69     {
70     return
71       "  endmacro(expression)\n"
72       "See the macro command.";
73     }
74
75   cmTypeMacro(cmEndMacroCommand, cmCommand);
76 };
77
78
79 #endif