packaging: Initial packaging
[platform/upstream/cmake.git] / Source / cmMarkAsAdvancedCommand.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 cmMarkAsAdvancedCommand_h
13 #define cmMarkAsAdvancedCommand_h
14
15 #include "cmCommand.h"
16
17 /** \class cmMarkAsAdvancedCommand
18  * \brief mark_as_advanced command
19  *
20  * cmMarkAsAdvancedCommand implements the mark_as_advanced CMake command
21  */
22 class cmMarkAsAdvancedCommand : public cmCommand
23 {
24 public:
25   /**
26    * This is a virtual constructor for the command.
27    */
28   virtual cmCommand* Clone()
29     {
30     return new cmMarkAsAdvancedCommand;
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    * The name of the command as specified in CMakeList.txt.
42    */
43   virtual const char* GetName() const {return "mark_as_advanced";}
44
45   /**
46    * Succinct documentation.
47    */
48   virtual const char* GetTerseDocumentation() const
49     {
50     return "Mark cmake cached variables as advanced.";
51     }
52
53   /**
54    * More documentation.
55    */
56   virtual const char* GetFullDocumentation() const
57     {
58     return
59       "  mark_as_advanced([CLEAR|FORCE] VAR VAR2 VAR...)\n"
60       "Mark the named cached variables as advanced.  An advanced variable "
61       "will not be displayed in any of the cmake GUIs unless the show "
62       "advanced option is on.  "
63       "If CLEAR is the first argument advanced variables are changed back "
64       "to unadvanced.  "
65       "If FORCE is the first argument, then the variable is made advanced.  "
66       "If neither FORCE nor CLEAR is specified, new values will be marked as "
67       "advanced, but if the variable already has an advanced/non-advanced "
68       "state, it will not be changed.\n"
69       "It does nothing in script mode.";
70     }
71
72   /**
73    * This determines if the command is invoked when in script mode.
74    * mark_as_advanced() will have no effect in script mode, but this will
75    * make many of the modules usable in cmake/ctest scripts, (among them
76    * FindUnixMake.cmake used by the CTEST_BUILD command.
77   */
78   virtual bool IsScriptable() const { return true; }
79
80   cmTypeMacro(cmMarkAsAdvancedCommand, cmCommand);
81 };
82
83
84
85 #endif