ENH: fix for gcc 3.1
This commit is contained in:
parent
c9e9e8d121
commit
0c72acd812
|
@ -1247,7 +1247,8 @@ int cmCTest::CoverageDirectory()
|
|||
|
||||
for ( cc = 0; cc < files.size(); cc ++ )
|
||||
{
|
||||
std::string command = coverageCommand + " -l \"" + files[cc] + "\"";
|
||||
std::string command = coverageCommand + " -o \"" + files[cc] + "\"";
|
||||
command += " -l \"" + files[cc] + "\"";
|
||||
std::string output;
|
||||
int retVal = 0;
|
||||
//std::cout << "Run gcov on " << files[cc] << std::flush;
|
||||
|
@ -1287,6 +1288,11 @@ int cmCTest::CoverageDirectory()
|
|||
{
|
||||
files.push_back(fname);
|
||||
std::string::size_type pos = fname.find(".da.");
|
||||
std::string::size_type pos2 = fname.find(".da##");
|
||||
if(pos2 != fname.npos)
|
||||
{
|
||||
pos = pos2+1;
|
||||
}
|
||||
if ( pos != fname.npos )
|
||||
{
|
||||
pos += 4;
|
||||
|
@ -1302,10 +1308,10 @@ int cmCTest::CoverageDirectory()
|
|||
}
|
||||
}
|
||||
}
|
||||
for ( cc = 0; cc < files.size(); cc ++ )
|
||||
{
|
||||
// for ( cc = 0; cc < files.size(); cc ++ )
|
||||
// {
|
||||
// std::cout << "File: " << files[cc] << std::endl;
|
||||
}
|
||||
// }
|
||||
|
||||
std::map<std::string, std::vector<std::string> >::iterator it;
|
||||
cmCTest::tm_CoverageMap coverageresults;
|
||||
|
@ -1377,12 +1383,15 @@ int cmCTest::CoverageDirectory()
|
|||
}
|
||||
cov.m_Show = true;
|
||||
}
|
||||
// std::cerr << "number of lines " << lines.size() << "\n";
|
||||
for ( cc = 0; cc < lines.size(); cc ++ )
|
||||
{
|
||||
std::string& line = lines[cc];
|
||||
//std::cerr << line << "\n";
|
||||
std::string sub = line.substr(0, strlen(" ######"));
|
||||
int count = atoi(sub.c_str());
|
||||
if ( sub.compare(" ######") == 0 )
|
||||
if ( sub.compare(0, strlen(" #####"), " #####") == 0
|
||||
|| sub.compare(" ######") == 0 )
|
||||
{
|
||||
if ( covlines[cc] == -1 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue