Imported Upstream version 2.8.9
[platform/upstream/cmake.git] / Source / cmGetTargetPropertyCommand.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 cmGetTargetPropertyCommand_h
13 #define cmGetTargetPropertyCommand_h
14
15 #include "cmCommand.h"
16
17 class cmGetTargetPropertyCommand : public cmCommand
18 {
19 public:
20   virtual cmCommand* Clone() 
21     {
22       return new cmGetTargetPropertyCommand;
23     }
24
25   /**
26    * This is called when the command is first encountered in
27    * the input file.
28    */
29   virtual bool InitialPass(std::vector<std::string> const& args,
30                            cmExecutionStatus &status);
31
32   /**
33    * The name of the command as specified in CMakeList.txt.
34    */
35   virtual const char* GetName() const { return "get_target_property";}
36
37   /**
38    * Succinct documentation.
39    */
40   virtual const char* GetTerseDocumentation() const
41     {
42     return "Get a property from a target.";
43     }
44   
45   /**
46    * Longer documentation.
47    */
48   virtual const char* GetFullDocumentation() const
49     {
50       return
51         "  get_target_property(VAR target property)\n"
52         "Get a property from a target.   The value of the property is "
53         "stored in the variable VAR.  If the property is not found, VAR "
54         "will be set to \"NOTFOUND\".  Use set_target_properties to set "
55         "property values.  Properties are usually used to control how "
56         "a target is built, but some query the target instead.  "
57         "This command can get properties for any target so far created. "
58         "The targets do not need to be in the current CMakeLists.txt file."
59         "\n"
60         "See also the more general get_property() command.";
61     }
62   
63   cmTypeMacro(cmGetTargetPropertyCommand, cmCommand);
64 };
65
66
67
68 #endif