summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCacheManager.cxx6
-rw-r--r--Source/cmake.cxx5
2 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 8f352b1..d6b84a0 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -751,11 +751,7 @@ void cmCacheManager::AddCacheEntry(const std::string& key,
}
e.SetProperty("HELPSTRING", helpString? helpString :
"(This variable does not exist and should not be used)");
- if (this->Cache[key].Value == e.Value)
- {
- this->CMakeInstance->UnwatchUnusedCli(key);
- }
- this->Cache[key] = e;
+ this->CMakeInstance->UnwatchUnusedCli(key);
}
bool cmCacheManager::CacheIterator::IsAtEnd() const
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index a83ebd5..976bf44 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -1236,7 +1236,10 @@ int cmake::HandleDeleteCacheVariables(const std::string& var)
if(ci.Find(save.key))
{
save.type = ci.GetType();
- save.help = ci.GetProperty("HELPSTRING");
+ if(const char* help = ci.GetProperty("HELPSTRING"))
+ {
+ save.help = help;
+ }
}
saved.push_back(save);
}