summaryrefslogtreecommitdiffstats
path: root/Source/cmPropertyMap.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2006-12-07 14:45:32 (GMT)
committerKen Martin <ken.martin@kitware.com>2006-12-07 14:45:32 (GMT)
commit27379d7b081be852c2b290a98db548cffffbff04 (patch)
treefcc9e19282bdfb71bf4bf9b1f8fcea1401c2fbd5 /Source/cmPropertyMap.cxx
parent833548f53a2ed799bb0df23fd7d973c30b423d1b (diff)
downloadCMake-27379d7b081be852c2b290a98db548cffffbff04.zip
CMake-27379d7b081be852c2b290a98db548cffffbff04.tar.gz
CMake-27379d7b081be852c2b290a98db548cffffbff04.tar.bz2
ENH: make properties a bit more formal with documentation and chaining
Diffstat (limited to 'Source/cmPropertyMap.cxx')
-rw-r--r--Source/cmPropertyMap.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx
index 7e4c3fc..925bfdd 100644
--- a/Source/cmPropertyMap.cxx
+++ b/Source/cmPropertyMap.cxx
@@ -18,6 +18,9 @@
#include "cmSystemTools.h"
#include "cmake.h"
+// define STRICT to get checking of all set and get property calls
+//#define STRICT
+
cmProperty *cmPropertyMap::GetOrCreateProperty(const char *name)
{
cmPropertyMap::iterator it = this->find(name);
@@ -41,7 +44,7 @@ void cmPropertyMap::SetProperty(const char *name, const char *value,
return;
}
-#if 0
+#ifdef STRICT
if (!this->CMakeInstance)
{
cmSystemTools::Error("CMakeInstance not set on a property map!");
@@ -92,7 +95,7 @@ const char *cmPropertyMap
}
// has the property been defined?
-#if 0
+#ifdef STRICT
if (!this->CMakeInstance)
{
cmSystemTools::Error("CMakeInstance not set on a property map!");
@@ -131,7 +134,10 @@ const char *cmPropertyMap
if (it == this->end())
{
// should we chain up?
- chain = this->CMakeInstance->IsPropertyChained(name,scope);
+ if (this->CMakeInstance)
+ {
+ chain = this->CMakeInstance->IsPropertyChained(name,scope);
+ }
return 0;
}