ENH: put the 64 bit paths first
[cmake.git] / Source / cmSetCommand.h
blob1a969285536bfac091c83a38770474901ed4c71e
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmSetCommand.h,v $
5 Language: C++
6 Date: $Date: 2008-08-25 14:31:28 $
7 Version: $Revision: 1.21 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html 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 "cmCommand.h"
22 /** \class cmSetCommand
23 * \brief Set a CMAKE variable
25 * cmSetCommand sets a variable to a value with expansion.
27 class cmSetCommand : public cmCommand
29 public:
30 /**
31 * This is a virtual constructor for the command.
33 virtual cmCommand* Clone()
35 return new cmSetCommand;
38 /**
39 * This is called when the command is first encountered in
40 * the CMakeLists.txt file.
42 virtual bool InitialPass(std::vector<std::string> const& args,
43 cmExecutionStatus &status);
45 /**
46 * This determines if the command is invoked when in script mode.
48 virtual bool IsScriptable() { return true; }
50 /**
51 * The name of the command as specified in CMakeList.txt.
53 virtual const char* GetName() {return "set";}
55 /**
56 * Succinct documentation.
58 virtual const char* GetTerseDocumentation()
60 return "Set a CMAKE variable to a given value.";
63 /**
64 * More documentation.
66 virtual const char* GetFullDocumentation()
68 return
69 " set(<variable> <value> [[CACHE <type> <docstring> [FORCE]] | "
70 "PARENT_SCOPE])\n"
71 "Within CMake sets <variable> to the value <value>. <value> is expanded"
72 " before <variable> is set to it. If CACHE is present, then the "
73 "<variable> is put in the cache. <type> and <docstring> are then "
74 "required. <type> is used by the CMake GUI to choose a widget with "
75 "which the user sets a value. The value for <type> may be one of\n"
76 " FILEPATH = File chooser dialog.\n"
77 " PATH = Directory chooser dialog.\n"
78 " STRING = Arbitrary string.\n"
79 " BOOL = Boolean ON/OFF checkbox.\n"
80 " INTERNAL = No GUI entry (used for persistent variables).\n"
81 "If <type> is INTERNAL, then the <value> is always written into the "
82 "cache, replacing any values existing in the cache. If it is not a "
83 "cache variable, then this always writes into the current makefile. The "
84 "FORCE option will overwrite the cache value removing any changes by "
85 "the user.\n"
86 "If PARENT_SCOPE is present, the variable will be set in the scope "
87 "above the current scope. Each new directory or function creates a new "
88 "scope. This command will set the value of a variable into the parent "
89 "directory or calling function (whichever is applicable to the case at "
90 "hand).\n"
91 "If <value> is not specified then the variable is removed "
92 "instead of set. See also: the unset() command.\n"
93 " set(<variable> <value1> ... <valueN>)\n"
94 "In this case <variable> is set to a semicolon separated list of "
95 "values.\n"
96 "<variable> can be an environment variable such as:\n"
97 " set( ENV{PATH} /home/martink )\n"
98 "in which case the environment variable will be set.";
101 cmTypeMacro(cmSetCommand, cmCommand);
106 #endif