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 cmEndWhileCommand_h
13 #define cmEndWhileCommand_h
15 #include "cmCommand.h"
17 /** \class cmEndWhileCommand
18 * \brief ends a while loop
20 * cmEndWhileCommand ends a while loop
22 class cmEndWhileCommand : public cmCommand
26 * This is a virtual constructor for the command.
28 virtual cmCommand* Clone()
30 return new cmEndWhileCommand;
34 * Override cmCommand::InvokeInitialPass to get arguments before
37 virtual bool InvokeInitialPass(std::vector<cmListFileArgument> const& args,
38 cmExecutionStatus &status);
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 "endwhile";}
58 * Succinct documentation.
60 virtual const char* GetTerseDocumentation() const
62 return "Ends a list of commands in a while block.";
68 virtual const char* GetFullDocumentation() const
71 " endwhile(expression)\n"
72 "See the while command.";
75 cmTypeMacro(cmEndWhileCommand, cmCommand);