diff options
Diffstat (limited to 'Source/CTest/cmParseMumpsCoverage.cxx')
-rw-r--r-- | Source/CTest/cmParseMumpsCoverage.cxx | 28 |
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; +} |