diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2010-09-08 16:03:42 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2010-09-08 16:03:42 (GMT) |
commit | 3801463c9f99fdbf0b1a115f5a5f55d211c08de1 (patch) | |
tree | 94b6226384569e1bda269553d1f0185f966c56b6 /Source/cmMakefile.cxx | |
parent | 8b520158c3c378acde541d2e99103dc9ab834595 (diff) | |
download | CMake-3801463c9f99fdbf0b1a115f5a5f55d211c08de1.zip CMake-3801463c9f99fdbf0b1a115f5a5f55d211c08de1.tar.gz CMake-3801463c9f99fdbf0b1a115f5a5f55d211c08de1.tar.bz2 |
Use built-ins for readability and maintainability
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
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 << "\'"; |