Introduce "generator expressions" to add_test()
[cmake.git] / Source / cmDefinePropertyCommand.h
blobaf2e188a1dcd824b63f04932cc7e1ef0e180faf2
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmDefinePropertyCommand.h,v $
5 Language: C++
6 Date: $Date: 2009-06-15 20:12:27 $
7 Version: $Revision: 1.7 $
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 cmDefinesPropertyCommand_h
18 #define cmDefinesPropertyCommand_h
20 #include "cmCommand.h"
22 class cmDefinePropertyCommand : public cmCommand
24 public:
25 virtual cmCommand* Clone()
27 return new cmDefinePropertyCommand;
30 /**
31 * This is called when the command is first encountered in
32 * the input file.
34 virtual bool InitialPass(std::vector<std::string> const& args,
35 cmExecutionStatus &status);
37 /**
38 * The name of the command as specified in CMakeList.txt.
40 virtual const char* GetName() { return "define_property";}
42 /**
43 * Succinct documentation.
45 virtual const char* GetTerseDocumentation()
47 return "Define and document custom properties.";
50 /**
51 * Longer documentation.
53 virtual const char* GetFullDocumentation()
55 return
56 " define_property(<GLOBAL | DIRECTORY | TARGET | SOURCE |\n"
57 " TEST | VARIABLE | CACHED_VARIABLE>\n"
58 " PROPERTY <name> [INHERITED]\n"
59 " BRIEF_DOCS <brief-doc> [docs...]\n"
60 " FULL_DOCS <full-doc> [docs...])\n"
61 "Define one property in a scope for use with the "
62 "set_property and get_property commands. "
63 "This is primarily useful to associate documentation with property "
64 "names that may be retrieved with the get_property command. "
65 "The first argument determines the kind of scope in which the "
66 "property should be used. It must be one of the following:\n"
67 " GLOBAL = associated with the global namespace\n"
68 " DIRECTORY = associated with one directory\n"
69 " TARGET = associated with one target\n"
70 " SOURCE = associated with one source file\n"
71 " TEST = associated with a test named with add_test command\n"
72 " VARIABLE = documents a CMake language variable\n"
73 " CACHED_VARIABLE = documents a CMake cache variable\n"
74 "Note that unlike set_property and get_property no actual scope "
75 "needs to be given; only the kind of scope is important.\n"
76 "The required PROPERTY option is immediately followed by the name "
77 "of the property being defined.\n"
78 "If the INHERITED option then the get_property command will chain "
79 "up to the next higher scope when the requested property is not "
80 "set in the scope given to the command. "
81 "DIRECTORY scope chains to GLOBAL. "
82 "TARGET, SOURCE, and TEST chain to DIRECTORY.\n"
83 "The BRIEF_DOCS and FULL_DOCS options are followed by strings to be "
84 "associated with the property as its brief and full documentation. "
85 "Corresponding options to the get_property command will retrieve the "
86 "documentation.";
89 cmTypeMacro(cmDefinePropertyCommand, cmCommand);
90 private:
91 std::string PropertyName;
92 std::string BriefDocs;
93 std::string FullDocs;
98 #endif