diff options
author | Ken Martin <ken.martin@kitware.com> | 2007-10-22 16:49:09 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2007-10-22 16:49:09 (GMT) |
commit | 6cdf03250568c2150094cddfb6542945903b41a1 (patch) | |
tree | d2180686ef12105d6855203eded0505775b507ab /Source/cmMakefile.cxx | |
parent | cfb84d8562646662cfee9622f657e8eacdd49f8c (diff) | |
download | CMake-6cdf03250568c2150094cddfb6542945903b41a1.zip CMake-6cdf03250568c2150094cddfb6542945903b41a1.tar.gz CMake-6cdf03250568c2150094cddfb6542945903b41a1.tar.bz2 |
ENH: change to make the documentation class more generic, about halfway there, also provides secitons for Variables now
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 8d22861..f2cafa6 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1215,6 +1215,17 @@ void cmMakefile::AddDefinition(const char* name, const char* value) { return; } + +#ifdef CMAKE_STRICT + if (!this->CMakeInstance->IsPropertyDefined(name,cmProperty::VARIABLE)) + { + std::string msg = "Variable "; + msg += name; + msg += " set yet not defined!"; + cmSystemTools::Error(msg.c_str()); + } +#endif + this->TemporaryDefinitionKey = name; this->Definitions[this->TemporaryDefinitionKey] = value; @@ -1669,6 +1680,15 @@ bool cmMakefile::IsDefinitionSet(const char* name) const const char* cmMakefile::GetDefinition(const char* name) const { +#ifdef CMAKE_STRICT + if (!this->CMakeInstance->IsPropertyDefined(name,cmProperty::VARIABLE)) + { + std::string msg = "Variable "; + msg += name; + msg += " queried yet undefined!"; + cmSystemTools::Error(msg.c_str()); + } +#endif const char* def = 0; DefinitionMap::const_iterator pos = this->Definitions.find(name); if(pos != this->Definitions.end()) |