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 cmEndMacroCommand_h
13 #define cmEndMacroCommand_h
15 #include "cmCommand.h"
17 /** \class cmEndMacroCommand
18 * \brief ends an if block
20 * cmEndMacroCommand ends an if block
22 class cmEndMacroCommand : public cmCommand
26 * This is a virtual constructor for the command.
28 virtual cmCommand* Clone()
30 return new cmEndMacroCommand;
34 * Override cmCommand::InvokeInitialPass to get arguments before
37 virtual bool InvokeInitialPass(std::vector<cmListFileArgument> const&,
41 * This is called when the command is first encountered in
42 * the CMakeLists.txt file.
44 virtual bool InitialPass(std::vector<std::string> const&,
45 cmExecutionStatus &) {return false;}
48 * This determines if the command is invoked when in script mode.
50 virtual bool IsScriptable() const { return true; }
53 * The name of the command as specified in CMakeList.txt.
55 virtual const char* GetName() const { return "endmacro";}
58 * Succinct documentation.
60 virtual const char* GetTerseDocumentation() const
62 return "Ends a list of commands in a macro block.";
68 virtual const char* GetFullDocumentation() const
71 " endmacro(expression)\n"
72 "See the macro command.";
75 cmTypeMacro(cmEndMacroCommand, cmCommand);