summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2009-07-17 14:06:38 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2009-07-17 14:06:38 (GMT)
commit3250cb3d3b5b4ed60e620ff78cad7fa8fb24113f (patch)
tree5b8a4f8dab7f245f6271ab85a21b716427280c3d /Source
parent300514fd254579b69fdac6e9edd6e9415026305e (diff)
downloadCMake-3250cb3d3b5b4ed60e620ff78cad7fa8fb24113f.zip
CMake-3250cb3d3b5b4ed60e620ff78cad7fa8fb24113f.tar.gz
CMake-3250cb3d3b5b4ed60e620ff78cad7fa8fb24113f.tar.bz2
ENH: compute the max test name width based on the length of the tests
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 4b94567..0dffb26 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1108,6 +1108,21 @@ void cmCTestTestHandler::ComputeTestList()
this->TotalNumberOfTests = this->TestList.size();
// Set the TestList to the final list of all test
this->TestList = finalList;
+ std::string::size_type max = this->CTest->GetMaxTestNameWidth();
+ for (ListOfTests::iterator it = this->TestList.begin();
+ it != this->TestList.end(); it ++ )
+ {
+ cmCTestTestProperties& p = *it;
+ if(max < p.Name.size())
+ {
+ max = p.Name.size();
+ }
+ }
+ if(static_cast<std::string::size_type>(this->CTest->GetMaxTestNameWidth())
+ != max)
+ {
+ this->CTest->SetMaxTestNameWidth(max);
+ }
}
bool cmCTestTestHandler::GetValue(const char* tag,