Imported Upstream version 2.8.9
[platform/upstream/cmake.git] / Source / cmPropertyDefinition.cxx
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 #include "cmPropertyDefinition.h"
13 #include "cmSystemTools.h"
14
15 cmDocumentationEntry cmPropertyDefinition::GetDocumentation() const
16 {
17   cmDocumentationEntry e;
18   e.Name = this->Name;
19   e.Brief = this->ShortDescription;
20   e.Full = this->FullDescription;
21   return e;
22 }
23
24 void cmPropertyDefinition
25 ::DefineProperty(const char *name, cmProperty::ScopeType scope,
26                  const char *shortDescription,
27                  const char *fullDescription,
28                  const char *sec,
29                  bool chain)
30 {
31   this->Name = name;
32   this->Scope = scope;
33   this->Chained = chain;
34   if (shortDescription)
35     {
36     this->ShortDescription = shortDescription;
37     }
38   if (fullDescription)
39     {
40     this->FullDescription = fullDescription;
41     }
42   if (sec)
43     {
44     this->DocumentationSection = sec;
45     }
46 }
47