1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmGetDirectoryPropertyCommand.h,v $
6 Date: $Date: 2008-06-26 14:58:44 $
7 Version: $Revision: 1.9 $
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 cmGetDirectoryPropertyCommand_h
18 #define cmGetDirectoryPropertyCommand_h
20 #include "cmCommand.h"
22 class cmGetDirectoryPropertyCommand
: public cmCommand
25 virtual cmCommand
* Clone()
27 return new cmGetDirectoryPropertyCommand
;
31 * This is called when the command is first encountered in
34 virtual bool InitialPass(std::vector
<std::string
> const& args
,
35 cmExecutionStatus
&status
);
38 * This determines if the command is invoked when in script mode.
40 virtual bool IsScriptable() { return true; }
43 * The name of the command as specified in CMakeList.txt.
45 virtual const char* GetName() { return "get_directory_property";}
48 * Succinct documentation.
50 virtual const char* GetTerseDocumentation()
52 return "Get a property of DIRECTORY scope.";
56 * Longer documentation.
58 virtual const char* GetFullDocumentation()
61 " get_directory_property(<variable> [DIRECTORY <dir>] <prop-name>)\n"
62 "Store a property of directory scope in the named variable. "
63 "If the property is not defined the empty-string is returned. "
64 "The DIRECTORY argument specifies another directory from which "
65 "to retrieve the property value. "
66 "The specified directory must have already been traversed by "
69 " get_directory_property(<variable> [DIRECTORY <dir>]\n"
70 " DEFINITION <var-name>)\n"
71 "Get a variable definition from a directory. "
72 "This form is useful to get a variable definition from another "
77 cmTypeMacro(cmGetDirectoryPropertyCommand
, cmCommand
);