blob: 55ef52137e955a143e196a5465c9da0781e49740 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
/*============================================================================
CMake - Cross Platform Makefile Generator
Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
Distributed under the OSI-approved BSD License (the "License");
see accompanying file Copyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License for more information.
============================================================================*/
#ifndef cmDefinesPropertyCommand_h
#define cmDefinesPropertyCommand_h
#include "cmCommand.h"
class cmDefinePropertyCommand : public cmCommand
{
public:
virtual cmCommand* Clone()
{
return new cmDefinePropertyCommand;
}
/**
* This is called when the command is first encountered in
* the input file.
*/
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus &status);
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual const char* GetName() const { return "define_property";}
/**
* Succinct documentation.
*/
virtual const char* GetTerseDocumentation() const
{
return "Define and document custom properties.";
}
/**
* Longer documentation.
*/
virtual const char* GetFullDocumentation() const
{
return
" define_property(<GLOBAL | DIRECTORY | TARGET | SOURCE |\n"
" TEST | VARIABLE | CACHED_VARIABLE>\n"
" PROPERTY <name> [INHERITED]\n"
" BRIEF_DOCS <brief-doc> [docs...]\n"
" FULL_DOCS <full-doc> [docs...])\n"
"Define one property in a scope for use with the "
"set_property and get_property commands. "
"This is primarily useful to associate documentation with property "
"names that may be retrieved with the get_property command. "
"The first argument determines the kind of scope in which the "
"property should be used. It must be one of the following:\n"
" GLOBAL = associated with the global namespace\n"
" DIRECTORY = associated with one directory\n"
" TARGET = associated with one target\n"
" SOURCE = associated with one source file\n"
" TEST = associated with a test named with add_test\n"
" VARIABLE = documents a CMake language variable\n"
" CACHED_VARIABLE = documents a CMake cache variable\n"
"Note that unlike set_property and get_property no actual scope "
"needs to be given; only the kind of scope is important.\n"
"The required PROPERTY option is immediately followed by the name "
"of the property being defined.\n"
"If the INHERITED option then the get_property command will chain "
"up to the next higher scope when the requested property is not "
"set in the scope given to the command. "
"DIRECTORY scope chains to GLOBAL. "
"TARGET, SOURCE, and TEST chain to DIRECTORY.\n"
"The BRIEF_DOCS and FULL_DOCS options are followed by strings to be "
"associated with the property as its brief and full documentation. "
"Corresponding options to the get_property command will retrieve the "
"documentation.";
}
cmTypeMacro(cmDefinePropertyCommand, cmCommand);
private:
std::string PropertyName;
std::string BriefDocs;
std::string FullDocs;
};
#endif
|