From 27379d7b081be852c2b290a98db548cffffbff04 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Thu, 7 Dec 2006 09:45:32 -0500 Subject: ENH: make properties a bit more formal with documentation and chaining --- Source/cmPropertyMap.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Source/cmPropertyMap.cxx') diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx index 7e4c3fc50f..925bfdd19a 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; } -- cgit v1.2.1