summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-17 13:25:08 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-07-17 13:25:08 (GMT)
commit95a8331edb4ba7b53abd796066165b29f70ff258 (patch)
tree05e7fdd622a040259c37877366c7c697538ccc2b /Source/cmMakefile.cxx
parent57f25c53e3bbbbda97a7e58fac27c1c56bc1f03a (diff)
downloadCMake-95a8331edb4ba7b53abd796066165b29f70ff258.zip
CMake-95a8331edb4ba7b53abd796066165b29f70ff258.tar.gz
CMake-95a8331edb4ba7b53abd796066165b29f70ff258.tar.bz2
ENH: produce a lot more output when running with --debug-output
-try to fix build error on HPUX Alex
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx31
1 files changed, 19 insertions, 12 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 7ed1f2b..2757ad3 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -306,7 +306,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff)
error << "Error in cmake code at\n"
<< lff.FilePath << ":" << lff.Line << ":\n"
<< rm->GetError() << std::endl
- << "Current CMake stack: " << this->GetListFileStack().c_str();
+ << "Called from: " << this->GetListFileStack().c_str();
cmSystemTools::Error(error.str().c_str());
return false;
}
@@ -323,7 +323,7 @@ bool cmMakefile::ExecuteCommand(const cmListFileFunction& lff)
error << "Error in cmake code at\n"
<< lff.FilePath << ":" << lff.Line << ":\n"
<< usedCommand->GetError() << std::endl
- << "Current CMake stack: " << this->GetListFileStack().c_str();
+ << "Called from: " << this->GetListFileStack().c_str();
cmSystemTools::Error(error.str().c_str());
result = false;
if ( this->GetCMakeInstance()->GetScriptMode() )
@@ -2607,7 +2607,7 @@ const char *cmMakefile::GetProperty(const char* prop,
}
else if (!strcmp("LISTFILE_STACK",prop))
{
- for (std::deque<cmStdString>::const_iterator i = this->ListFileStack.begin();
+ for (std::deque<cmStdString>::iterator i = this->ListFileStack.begin();
i != this->ListFileStack.end(); ++i)
{
if (i != this->ListFileStack.begin())
@@ -2774,17 +2774,24 @@ std::string cmMakefile::GetListFileStack()
{
cmOStringStream tmp;
size_t depth = this->ListFileStack.size();
- std::deque<cmStdString>::iterator it = this->ListFileStack.end();
- do
+ if (depth > 0)
{
- --it;
- tmp << "\n[";
- tmp << depth;
- tmp << "]\t";
- tmp << *it;
- depth--;
+ std::deque<cmStdString>::iterator it = this->ListFileStack.end();
+ do
+ {
+ if (depth != this->ListFileStack.size())
+ {
+ tmp << "\n ";
+ }
+ --it;
+ tmp << "[";
+ tmp << depth;
+ tmp << "]\t";
+ tmp << *it;
+ depth--;
+ }
+ while (it != this->ListFileStack.begin());
}
- while (it != this->ListFileStack.begin());
return tmp.str();
}