Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / cmReturnCommand.h
blob01850c49ce5516f2f10976a4f92ab1bdc0bd7c0b
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmReturnCommand.h,v $
5 Language: C++
6 <<<<<<< cmReturnCommand.h
7 Date: $Date: 2008/01/23 23:34:19 $
8 Version: $Revision: 1.2 $
9 =======
10 Date: $Date: 2008-08-16 22:06:17 $
11 Version: $Revision: 1.3 $
12 >>>>>>> 1.3
14 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
15 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
17 This software is distributed WITHOUT ANY WARRANTY; without even
18 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
19 PURPOSE. See the above copyright notices for more information.
21 =========================================================================*/
22 #ifndef cmReturnCommand_h
23 #define cmReturnCommand_h
25 #include "cmCommand.h"
27 /** \class cmReturnCommand
28 * \brief Return from a directory or function
30 * cmReturnCommand returns from a directory or function
32 class cmReturnCommand : public cmCommand
34 public:
35 /**
36 * This is a virtual constructor for the command.
38 virtual cmCommand* Clone()
40 return new cmReturnCommand;
43 /**
44 * This is called when the command is first encountered in
45 * the CMakeLists.txt file.
47 virtual bool InitialPass(std::vector<std::string> const& args,
48 cmExecutionStatus &status);
50 /**
51 * This determines if the command is invoked when in script mode.
53 virtual bool IsScriptable() { return true; }
55 /**
56 * The name of the command as specified in CMakeList.txt.
58 virtual const char* GetName() {return "return";}
60 /**
61 * Succinct documentation.
63 virtual const char* GetTerseDocumentation()
65 return "Return from a file, directory or function.";
68 /**
69 * More documentation.
71 virtual const char* GetFullDocumentation()
73 return
74 " return()\n"
75 "Returns from a file, directory or function. When this command is "
76 "encountered in an included file (via include() or find_package()), "
77 "it causes processing of the current file to stop and control is "
78 "returned to the including file. If it is encountered in a file which "
79 "is not included by another file, e.g. a CMakeLists.txt, control is "
80 "returned to the parent directory if there is one. "
81 "If return is called in a function, control is returned to the caller "
82 "of the function. Note that a macro "
83 "is not a function and does not handle return like a function does.";
86 cmTypeMacro(cmReturnCommand, cmCommand);
91 #endif