[Cmake-commits] CMake branch, next, updated. v2.8.11-2045-gf4f7374
Stephen Kelly
steveire at gmail.com
Thu May 16 15:55:22 EDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via f4f73746ec143818ede90959602dbc7ce708981d (commit)
via d4bca05e973476071245457c699adb4541a5429c (commit)
from 39e5de36001f350a4c73b8a803296a0bda4f2331 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f4f73746ec143818ede90959602dbc7ce708981d
commit f4f73746ec143818ede90959602dbc7ce708981d
Merge: 39e5de3 d4bca05
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu May 16 15:55:20 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu May 16 15:55:20 2013 -0400
Merge topic 'suppress-unused-cli-with-value-in-cache' into next
d4bca05 Suppress the unused cli warning if the key value pair is cached.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d4bca05e973476071245457c699adb4541a5429c
commit d4bca05e973476071245457c699adb4541a5429c
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Thu May 16 21:51:45 2013 +0200
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Thu May 16 21:51:45 2013 +0200
Suppress the unused cli warning if the key value pair is cached.
It is common to specify a CMAKE_TOOLCHAIN_FILE and get a warning
for using it despite it not being used.
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 864df8e..ed09545 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -750,6 +750,10 @@ 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;
}
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index ae62edb..e757f3a 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -383,11 +383,22 @@ bool cmake::SetCacheArgs(const std::vector<std::string>& args)
cmCacheManager::CacheEntryType type = cmCacheManager::UNINITIALIZED;
if(cmCacheManager::ParseEntry(entry.c_str(), var, value, type))
{
+ // The value is transformed if it is a filepath for example, so
+ // we can't compare whether the value is already in the cache until
+ // after we call AddCacheEntry.
+ const char *cachedValue =
+ this->CacheManager->GetCacheValue(var.c_str());
+
this->CacheManager->AddCacheEntry(var.c_str(), value.c_str(),
"No help, variable specified on the command line.", type);
if(this->WarnUnusedCli)
{
- this->WatchUnusedCli(var.c_str());
+ if (!cachedValue
+ || strcmp(this->CacheManager->GetCacheValue(var.c_str()),
+ cachedValue) != 0)
+ {
+ this->WatchUnusedCli(var.c_str());
+ }
}
}
else
-----------------------------------------------------------------------
Summary of changes:
Source/cmCacheManager.cxx | 4 ++++
Source/cmake.cxx | 13 ++++++++++++-
2 files changed, 16 insertions(+), 1 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list