You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.7 KiB

20 years ago
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmMarkAsAdvancedCommand_h
  14. #define cmMarkAsAdvancedCommand_h
  15. #include "cmCommand.h"
  16. /** \class cmMarkAsAdvancedCommand
  17. * \brief MarkAsAdvanced a CMAKE variable
  18. *
  19. * cmMarkAsAdvancedCommand sets a variable to a value with expansion.
  20. */
  21. class cmMarkAsAdvancedCommand : public cmCommand
  22. {
  23. public:
  24. /**
  25. * This is a virtual constructor for the command.
  26. */
  27. virtual cmCommand* Clone()
  28. {
  29. return new cmMarkAsAdvancedCommand;
  30. }
  31. /**
  32. * This is called when the command is first encountered in
  33. * the CMakeLists.txt file.
  34. */
  35. virtual bool InitialPass(std::vector<std::string> const& args);
  36. /**
  37. * The name of the command as specified in CMakeList.txt.
  38. */
  39. virtual const char* GetName() {return "mark_as_advanced";}
  40. /**
  41. * Succinct documentation.
  42. */
  43. virtual const char* GetTerseDocumentation()
  44. {
  45. return "Mark cmake cached variables as advanced.";
  46. }
  47. /**
  48. * More documentation.
  49. */
  50. virtual const char* GetFullDocumentation()
  51. {
  52. return
  53. " mark_as_advanced([CLEAR|FORCE] VAR VAR2 VAR...)\n"
  54. "Mark the named cached variables as advanced. An advanced variable "
  55. "will not be displayed in any of the cmake GUIs unless the show "
  56. "advanced option is on. "
  57. "If CLEAR is the first argument advanced variables are changed back "
  58. "to unadvanced. "
  59. "If FORCE is the first argument, then the variable is made advanced. "
  60. "If neither FORCE nor CLEAR is specified, new values will be marked as "
  61. "advanced, but if the variable already has an advanced/non-advanced "
  62. "state, it will not be changed.\n"
  63. "It does nothing in script mode.";
  64. }
  65. /**
  66. * This determines if the command is invoked when in script mode.
  67. * mark_as_advanced() will have no effect in script mode, but this will
  68. * make many of the modules usable in cmake/ctest scripts, (among them
  69. * FindUnixMake.cmake used by the CTEST_BUILD command.
  70. */
  71. virtual bool IsScriptable() { return true; }
  72. cmTypeMacro(cmMarkAsAdvancedCommand, cmCommand);
  73. };
  74. #endif