Przeglądaj źródła

COMP: fix for when STRICT is defined, and fix for props that have no docs

Ken Martin 18 lat temu
rodzic
commit
923b51ece0
2 zmienionych plików z 8 dodań i 3 usunięć
  1. 4 2
      Source/cmMakefile.cxx
  2. 4 1
      Source/cmPropertyDefinitionMap.cxx

+ 4 - 2
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;

+ 4 - 1
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);
+      }
     }
 }