summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2004-01-27 22:11:57 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2004-01-27 22:11:57 (GMT)
commit35403245985070f3cfdc5a0cf1381a655e38a41e (patch)
tree175a90b21bf17291f7d698a2a8b36fda5a5e5b1a /Source
parent6b6971a2c220150663459a7dc98ffa39501f85fd (diff)
downloadCMake-35403245985070f3cfdc5a0cf1381a655e38a41e.zip
CMake-35403245985070f3cfdc5a0cf1381a655e38a41e.tar.gz
CMake-35403245985070f3cfdc5a0cf1381a655e38a41e.tar.bz2
ENH: Only display the precontext or postcontext up to the next or previous warning or error
Diffstat (limited to 'Source')
-rw-r--r--Source/cmCTest.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 621b2af..efe4806 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1203,15 +1203,19 @@ int cmCTest::BuildDirectory()
{
ll = kk - 6;
}
- for ( jj = kk;
- jj > 0 && jj > ll /* && markedLines[jj] == 0 */;
+ for ( jj = kk-1;
+ jj > 0 && jj > ll && markedLines[jj] != markedLines[kk];
jj -- );
+ while ( markedLines[jj] == markedLines[kk] && jj < kk )
+ {
+ jj ++;
+ }
for (; jj < kk; jj ++ )
{
errorwarning.m_PreContext += lines[jj] + "\n";
}
for ( jj = kk+1;
- jj < lines.size() && jj < kk + 7 /* && markedLines[jj] == 0*/;
+ jj < lines.size() && jj < kk + 7 && markedLines[jj] != markedLines[kk];
jj ++ )
{
errorwarning.m_PostContext += lines[jj] + "\n";