From 923b51ece003a658b4876743c3d9b6567c43e7e3 Mon Sep 17 00:00:00 2001 From: Ken Martin Date: Tue, 23 Oct 2007 10:40:49 -0400 Subject: [PATCH] COMP: fix for when STRICT is defined, and fix for props that have no docs --- Source/cmMakefile.cxx | 6 ++++-- Source/cmPropertyDefinitionMap.cxx | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index f2cafa6ea..c9e0c784a 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1217,7 +1217,8 @@ void cmMakefile::AddDefinition(const char* name, const char* value) } #ifdef CMAKE_STRICT - if (!this->CMakeInstance->IsPropertyDefined(name,cmProperty::VARIABLE)) + if (this->GetCMakeInstance() && + !this->GetCMakeInstance()->IsPropertyDefined(name,cmProperty::VARIABLE)) { std::string msg = "Variable "; msg += name; @@ -1681,7 +1682,8 @@ 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)) + if (this->GetCMakeInstance() && + !this->GetCMakeInstance()->IsPropertyDefined(name,cmProperty::VARIABLE)) { std::string msg = "Variable "; msg += name; diff --git a/Source/cmPropertyDefinitionMap.cxx b/Source/cmPropertyDefinitionMap.cxx index 72488e1bd..b9d0cdee4 100644 --- a/Source/cmPropertyDefinitionMap.cxx +++ b/Source/cmPropertyDefinitionMap.cxx @@ -87,7 +87,10 @@ void cmPropertyDefinitionMap cmSystemTools::UpperCase(secName).c_str()); } cmDocumentationEntry e = j->second.GetDocumentation(); - v[secName]->Append(e); + if (e.Brief.size() || e.Full.size()) + { + v[secName]->Append(e); + } } }