diff options
author | Brad King <brad.king@kitware.com> | 2014-05-27 20:21:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-05-27 20:21:37 (GMT) |
commit | 61a1612a17e7531dda0d7b318746e1c4e284d47b (patch) | |
tree | 4bec1bd94b3a1e4d13a3d684753b9b05c20b7e86 | |
parent | a8c6b309b1bc4152be7fdc9a685ed311165b7ec7 (diff) | |
parent | 1cd375272997cb58f0c51647cf199e4fd4eef678 (diff) | |
download | CMake-61a1612a17e7531dda0d7b318746e1c4e284d47b.zip CMake-61a1612a17e7531dda0d7b318746e1c4e284d47b.tar.gz CMake-61a1612a17e7531dda0d7b318746e1c4e284d47b.tar.bz2 |
Merge branch 'fix-cache-self-assignment' into release
-rw-r--r-- | Source/cmCacheManager.cxx | 6 | ||||
-rw-r--r-- | Source/cmake.cxx | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx index 9e0064e..cc9fa57 100644 --- a/Source/cmCacheManager.cxx +++ b/Source/cmCacheManager.cxx @@ -750,11 +750,7 @@ void cmCacheManager::AddCacheEntry(const char* 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 abbabe7..4f14d73 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1231,7 +1231,10 @@ int cmake::HandleDeleteCacheVariables(const char* var) if(ci.Find(save.key.c_str())) { save.type = ci.GetType(); - save.help = ci.GetProperty("HELPSTRING"); + if(const char* help = ci.GetProperty("HELPSTRING")) + { + save.help = help; + } } saved.push_back(save); } |