summaryrefslogtreecommitdiffstats
path: root/Source/cmCTest.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-12-08 16:23:46 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-12-08 16:23:46 (GMT)
commit403f220d25b99ccdf0ceef87ef5f669a047d31cd (patch)
tree1194f44be97cb7c412a8f807e3525d13584b3d40 /Source/cmCTest.cxx
parentb777b8656e2ea28a165c22a3c1f7a1a1dd1b11a7 (diff)
downloadCMake-403f220d25b99ccdf0ceef87ef5f669a047d31cd.zip
CMake-403f220d25b99ccdf0ceef87ef5f669a047d31cd.tar.gz
CMake-403f220d25b99ccdf0ceef87ef5f669a047d31cd.tar.bz2
ENH: Improve coverage on systems with multiple gcov commands
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r--Source/cmCTest.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 3992ca0..31fa566 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1143,7 +1143,14 @@ int cmCTest::CoverageDirectory()
std::string sourceDirectory = m_DartConfiguration["SourceDirectory"];
if ( sourceDirectory.size() == 0 )
{
- std::cerr << "Cannot find SourceDirectory key in the DartConfiguration.tcl" << std::endl;
+ std::cerr << "Cannot find SourceDirectory key in the DartConfiguration.tcl" << std::endl;
+ return 1;
+ }
+
+ std::string coverageCommand = m_DartConfiguration["CoverageCommand"];
+ if ( coverageCommand.size() == 0 )
+ {
+ std::cerr << "Coverage command not defined in DartConfiguration.tcl" << std::endl;
return 1;
}
cdirs.push_back(sourceDirectory);
@@ -1237,10 +1244,10 @@ int cmCTest::CoverageDirectory()
std::string opath = m_ToplevelPath + "/Testing/Temporary/Coverage";
cmSystemTools::MakeDirectory(opath.c_str());
-
+
for ( cc = 0; cc < files.size(); cc ++ )
{
- std::string command = "gcov -l \"" + files[cc] + "\"";
+ std::string command = coverageCommand + " -l \"" + files[cc] + "\"";
std::string output;
int retVal = 0;
//std::cout << "Run gcov on " << files[cc] << std::flush;
@@ -1258,7 +1265,9 @@ int cmCTest::CoverageDirectory()
}
else
{
- //std::cout << " - fail" << std::endl;
+ std::cout << "Run gcov on " << files[cc] << std::flush;
+ std::cout << " [" << command << "]" << std::endl;
+ std::cout << " - fail" << std::endl;
}
}