summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2010-09-14 21:14:25 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2010-09-14 21:14:25 (GMT)
commitae3eff35b4814334f3a7e5f3240911aad0936c84 (patch)
tree1585acc9c69ee271eb213c55802225620ecd88e7 /Source/cmMakefile.cxx
parent056b44113f86a79ea9d68548005292a9d48d45f8 (diff)
downloadCMake-ae3eff35b4814334f3a7e5f3240911aad0936c84.zip
CMake-ae3eff35b4814334f3a7e5f3240911aad0936c84.tar.gz
CMake-ae3eff35b4814334f3a7e5f3240911aad0936c84.tar.bz2
Fix the path used for ignoring system warnings
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index f6c8c73..4084d0e 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1766,13 +1766,12 @@ bool cmMakefile::CheckForUnused(const char* reason, const char* name)
{
if (this->WarnUnused && !this->VariableUsed(name))
{
- const char* cdir = this->ListFileStack.back().c_str();
+ const cmListFileContext* file = this->CallStack.back().Context;
if (this->CheckSystemVars ||
- cmSystemTools::IsSubDirectory(cdir, this->GetHomeDirectory()) ||
- cmSystemTools::IsSubDirectory(cdir, this->GetHomeOutputDirectory()))
+ cmSystemTools::IsSubDirectory(file->FilePath.c_str(), this->GetHomeDirectory()) ||
+ cmSystemTools::IsSubDirectory(file->FilePath.c_str(), this->GetHomeOutputDirectory()))
{
cmOStringStream msg;
- const cmListFileContext* file = this->CallStack.back().Context;
msg << file->FilePath << ":" << file->Line << ":" <<
" warning: (" << reason << ") unused variable \'" << name << "\'";
cmSystemTools::Message(msg.str().c_str());