packaging: Initial packaging
[platform/upstream/cmake.git] / Source / cmUnsetCommand.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 cmUnsetCommand_h
13 #define cmUnsetCommand_h
14
15 #include "cmCommand.h"
16
17 /** \class cmUnsetCommand
18  * \brief Unset a CMAKE variable
19  *
20  * cmUnsetCommand unsets or removes a variable.
21  */
22 class cmUnsetCommand : public cmCommand
23 {
24 public:
25   /**
26    * This is a virtual constructor for the command.
27    */
28   virtual cmCommand* Clone()
29     {
30     return new cmUnsetCommand;
31     }
32
33   /**
34    * This is called when the command is first encountered in
35    * the CMakeLists.txt file.
36    */
37   virtual bool InitialPass(std::vector<std::string> const& args,
38                            cmExecutionStatus &status);
39
40   /**
41    * This determines if the command is invoked when in script mode.
42    */
43   virtual bool IsScriptable() const { return true; }
44
45   /**
46    * The name of the command as specified in CMakeList.txt.
47    */
48   virtual const char* GetName() const {return "unset";}
49
50   /**
51    * Succinct documentation.
52    */
53   virtual const char* GetTerseDocumentation() const
54     {
55     return "Unset a variable, cache variable, or environment variable.";
56     }
57
58   /**
59    * More documentation.
60    */
61   virtual const char* GetFullDocumentation() const
62     {
63     return
64       "  unset(<variable> [CACHE])\n"
65       "Removes the specified variable causing it to become undefined.  "
66       "If CACHE is present then the variable is removed from the cache "
67       "instead of the current scope.\n"
68       "<variable> can be an environment variable such as:\n"
69       "  unset(ENV{LD_LIBRARY_PATH})\n"
70       "in which case the variable will be removed from the current "
71       "environment.";
72     }
73
74   cmTypeMacro(cmUnsetCommand, cmCommand);
75 };
76
77
78
79 #endif