ENH: mark some vars as advanced (and resort the list)
[cmake.git] / Source / cmSetCommand.h
blobb64af4381aa450d0961417320d881a032f3c79bb
1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: cmSetCommand.h,v $
5 Language: C++
6 Date: $Date: 2002-10-09 19:48:59 $
7 Version: $Revision: 1.8 $
9 Copyright (c) 2002 Insight Consortium. All rights reserved.
10 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmSetCommand_h
18 #define cmSetCommand_h
20 #include "cmStandardIncludes.h"
21 #include "cmCommand.h"
23 /** \class cmSetCommand
24 * \brief Set a CMAKE variable
26 * cmSetCommand sets a variable to a value with expansion.
28 class cmSetCommand : public cmCommand
30 public:
31 /**
32 * This is a virtual constructor for the command.
34 virtual cmCommand* Clone()
36 return new cmSetCommand;
39 /**
40 * This is called when the command is first encountered in
41 * the CMakeLists.txt file.
43 virtual bool InitialPass(std::vector<std::string> const& args);
45 /**
46 * This determines if the command gets propagated down
47 * to makefiles located in subdirectories.
49 virtual bool IsInherited() {return true;}
51 /**
52 * The name of the command as specified in CMakeList.txt.
54 virtual const char* GetName() {return "SET";}
56 /**
57 * Succinct documentation.
59 virtual const char* GetTerseDocumentation()
61 return "Set a CMAKE variable to a value";
64 /**
65 * More documentation.
67 virtual const char* GetFullDocumentation()
69 return
70 "SET(VAR [VALUE] [CACHE TYPE DOCSTRING [FORCE]])\n"
71 "Within CMAKE sets VAR to the value VALUE. VALUE is expanded before VAR "
72 "is set to it. If CACHE is present, then the VAR is put in the cache."
73 " TYPE and DOCSTRING are required. TYPE may be BOOL, PATH, FILEPATH, STRING, INTERNAL, "
74 "or STATIC. If TYPE is INTERNAL, then the "
75 " VALUE is Always written into the cache, replacing any values "
76 "existing in the cache. If it is not a CACHE VAR, then this always "
77 "writes into the current makefile. The FORCE option will overwrite"
78 "the CACHE value removing any changes from the USER.\n"
79 "An optional syntax is SET(VAR VALUE1 ... VALUEN).\n"
80 "In this case VAR is set to a ; separated list of values.";
83 cmTypeMacro(cmSetCommand, cmCommand);
88 #endif