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 cmMarkAsAdvancedCommand_h
13 #define cmMarkAsAdvancedCommand_h
15 #include "cmCommand.h"
17 /** \class cmMarkAsAdvancedCommand
18 * \brief mark_as_advanced command
20 * cmMarkAsAdvancedCommand implements the mark_as_advanced CMake command
22 class cmMarkAsAdvancedCommand : public cmCommand
26 * This is a virtual constructor for the command.
28 virtual cmCommand* Clone()
30 return new cmMarkAsAdvancedCommand;
34 * This is called when the command is first encountered in
35 * the CMakeLists.txt file.
37 virtual bool InitialPass(std::vector<std::string> const& args,
38 cmExecutionStatus &status);
41 * The name of the command as specified in CMakeList.txt.
43 virtual const char* GetName() const {return "mark_as_advanced";}
46 * Succinct documentation.
48 virtual const char* GetTerseDocumentation() const
50 return "Mark cmake cached variables as advanced.";
56 virtual const char* GetFullDocumentation() const
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 "
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.";
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.
78 virtual bool IsScriptable() const { return true; }
80 cmTypeMacro(cmMarkAsAdvancedCommand, cmCommand);