packaging: Initial packaging
[platform/upstream/cmake.git] / Source / cmBuildNameCommand.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 cmBuildNameCommand_h
13 #define cmBuildNameCommand_h
14
15 #include "cmCommand.h"
16
17 /** \class cmBuildNameCommand
18  * \brief build_name command
19  *
20  * cmBuildNameCommand implements the build_name CMake command
21  */
22 class cmBuildNameCommand : public cmCommand
23 {
24 public:
25   /**
26    * This is a virtual constructor for the command.
27    */
28   virtual cmCommand* Clone()
29     {
30     return new cmBuildNameCommand;
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    * This determines if the command is invoked when in script mode.
42    */
43   virtual bool IsScriptable() const { return true; }
44
45   /**
46    * The name of the command as specified in CMakeList.txt.
47    */
48   virtual const char* GetName() const {return "build_name";}
49
50   /**
51    * Succinct documentation.
52    */
53   virtual const char* GetTerseDocumentation() const
54     {
55     return
56       "Deprecated.  Use ${CMAKE_SYSTEM} and ${CMAKE_CXX_COMPILER} instead.";
57     }
58
59   /**
60    * More documentation.
61    */
62   virtual const char* GetFullDocumentation() const
63     {
64     return
65       "  build_name(variable)\n"
66       "Sets the specified variable to a string representing the platform "
67       "and compiler settings.  These values are now available through the "
68       "CMAKE_SYSTEM and CMAKE_CXX_COMPILER variables.";
69     }
70
71   /** This command is kept for compatibility with older CMake versions. */
72   virtual bool IsDiscouraged() const
73     {
74     return true;
75     }
76
77   cmTypeMacro(cmBuildNameCommand, cmCommand);
78 };
79
80
81
82 #endif