packaging: Initial packaging
[platform/upstream/cmake.git] / Source / cmGetDirectoryPropertyCommand.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 cmGetDirectoryPropertyCommand_h
13 #define cmGetDirectoryPropertyCommand_h
14
15 #include "cmCommand.h"
16
17 class cmGetDirectoryPropertyCommand : public cmCommand
18 {
19 public:
20   virtual cmCommand* Clone()
21     {
22       return new cmGetDirectoryPropertyCommand;
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    * This determines if the command is invoked when in script mode.
34    */
35   virtual bool IsScriptable() const { return true; }
36
37   /**
38    * The name of the command as specified in CMakeList.txt.
39    */
40   virtual const char* GetName() const { return "get_directory_property";}
41
42   /**
43    * Succinct documentation.
44    */
45   virtual const char* GetTerseDocumentation() const
46     {
47     return "Get a property of DIRECTORY scope.";
48     }
49
50   /**
51    * Longer documentation.
52    */
53   virtual const char* GetFullDocumentation() const
54     {
55       return
56         "  get_directory_property(<variable> [DIRECTORY <dir>] <prop-name>)\n"
57         "Store a property of directory scope in the named variable.  "
58         "If the property is not defined the empty-string is returned.  "
59         "The DIRECTORY argument specifies another directory from which "
60         "to retrieve the property value.  "
61         "The specified directory must have already been traversed by "
62         "CMake."
63         "\n"
64         "  get_directory_property(<variable> [DIRECTORY <dir>]\n"
65         "                         DEFINITION <var-name>)\n"
66         "Get a variable definition from a directory.  "
67         "This form is useful to get a variable definition from another "
68         "directory."
69         "\n"
70         "See also the more general get_property() command.";
71     }
72
73   cmTypeMacro(cmGetDirectoryPropertyCommand, cmCommand);
74 };
75
76
77
78 #endif