summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmParseMumpsCoverage.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2012-05-01 21:00:43 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2012-05-01 21:00:43 (GMT)
commit7955e995ec400fb063529064b6232ca0eedfe5e0 (patch)
treebc3d928ad0b31dd93634794b83b425dfc8cdd8f7 /Source/CTest/cmParseMumpsCoverage.cxx
parenta86cd33cdd497acdb6b77a44c146a9779730675e (diff)
downloadCMake-7955e995ec400fb063529064b6232ca0eedfe5e0.zip
CMake-7955e995ec400fb063529064b6232ca0eedfe5e0.tar.gz
CMake-7955e995ec400fb063529064b6232ca0eedfe5e0.tar.bz2
Add support for Cache coverage.
This adds support for Cache coverage parsing. A test is added that does a basic run of the coverage on a small bit of data.
Diffstat (limited to 'Source/CTest/cmParseMumpsCoverage.cxx')
-rw-r--r--Source/CTest/cmParseMumpsCoverage.cxx28
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/CTest/cmParseMumpsCoverage.cxx b/Source/CTest/cmParseMumpsCoverage.cxx
index 761139f..ed263a4 100644
--- a/Source/CTest/cmParseMumpsCoverage.cxx
+++ b/Source/CTest/cmParseMumpsCoverage.cxx
@@ -127,3 +127,31 @@ bool cmParseMumpsCoverage::LoadPackages(const char* d)
}
return true;
}
+
+bool cmParseMumpsCoverage::FindMumpsFile(std::string const& routine,
+ std::string& filepath)
+{
+ std::map<cmStdString, cmStdString>::iterator i =
+ this->RoutineToDirectory.find(routine);
+ if(i != this->RoutineToDirectory.end())
+ {
+ filepath = i->second;
+ return true;
+ }
+ else
+ {
+ // try some alternate names
+ const char* tryname[] = {"GUX", "GTM", "ONT", 0};
+ for(int k=0; tryname[k] != 0; k++)
+ {
+ std::string routine2 = routine + tryname[k];
+ i = this->RoutineToDirectory.find(routine2);
+ if(i != this->RoutineToDirectory.end())
+ {
+ filepath = i->second;
+ return true;
+ }
+ }
+ }
+ return false;
+}