[Cmake-commits] CMake branch, next, updated. v2.8.2-713-g96fc295
Ben Boeckel
ben.boeckel at kitware.com
Wed Sep 8 12:05:05 EDT 2010
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 96fc295e7cc8d41f72cb9b3cc2faec2676a0e195 (commit)
via 3801463c9f99fdbf0b1a115f5a5f55d211c08de1 (commit)
from a785f3ca23ecb1fb24fa1cc08852a2bc98f3d24e (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=96fc295e7cc8d41f72cb9b3cc2faec2676a0e195
commit 96fc295e7cc8d41f72cb9b3cc2faec2676a0e195
Merge: a785f3c 3801463
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Wed Sep 8 12:05:02 2010 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Sep 8 12:05:02 2010 -0400
Merge topic 'dev/strict-mode' into next
3801463 Use built-ins for readability and maintainability
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3801463c9f99fdbf0b1a115f5a5f55d211c08de1
commit 3801463c9f99fdbf0b1a115f5a5f55d211c08de1
Author: Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Wed Sep 8 12:03:42 2010 -0400
Commit: Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Wed Sep 8 12:03:42 2010 -0400
Use built-ins for readability and maintainability
diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx
index c0a8127..54af13b 100644
--- a/Source/cmCommandArgumentParserHelper.cxx
+++ b/Source/cmCommandArgumentParserHelper.cxx
@@ -132,8 +132,9 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var)
{
const char* srcRoot = this->Makefile->GetDefinition("CMAKE_SOURCE_DIR");
const char* binRoot = this->Makefile->GetDefinition("CMAKE_BINARY_DIR");
- if (this->CheckSystemVars || strstr(this->FileName, srcRoot) == this->FileName ||
- strstr(this->FileName, binRoot) == this->FileName)
+ if (this->CheckSystemVars ||
+ cmSystemTools::IsSubDirectory(this->FileName, this->Makefile->GetHomeDirectory()) ||
+ cmSystemTools::IsSubDirectory(this->FileName, this->Makefile->GetHomeOutputDirectory()))
{
cmOStringStream msg;
msg << this->FileName << ":" << this->FileLine << ":" <<
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 33c61a7..c15f5b3 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -778,7 +778,7 @@ void cmMakefile::SetLocalGenerator(cmLocalGenerator* lg)
this->Internal->VarUsageStack.push(std::set<cmStdString>());
}
}
- this->CheckSystemVars = this->GetCMakeInstance()->GetCheckSystemVars();
+ this->CheckSystemVars = this->GetCMakeInstance()->GetCheckSystemVars();
}
bool cmMakefile::NeedBackwardsCompatibility(unsigned int major,
@@ -3394,9 +3394,9 @@ void cmMakefile::PopScope()
if (this->WarnUnused && usage.find(*it) == usage.end())
{
const char* cdir = this->ListFileStack.back().c_str();
- const char* srcRoot = this->GetDefinition("CMAKE_SOURCE_DIR");
- const char* binRoot = this->GetDefinition("CMAKE_BINARY_DIR");
- if (this->CheckSystemVars || strstr(cdir, srcRoot) == cdir || strstr(cdir, binRoot) == cdir)
+ if (this->CheckSystemVars ||
+ cmSystemTools::IsSubDirectory(cdir, this->GetHomeDirectory()) ||
+ cmSystemTools::IsSubDirectory(cdir, this->GetHomeOutputDirectory()))
{
cmOStringStream m;
m << "unused variable \'" << *it << "\'";
-----------------------------------------------------------------------
Summary of changes:
Source/cmCommandArgumentParserHelper.cxx | 5 +++--
Source/cmMakefile.cxx | 8 ++++----
2 files changed, 7 insertions(+), 6 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list