summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-10-17 17:21:56 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-10-17 17:22:04 (GMT)
commit275290375dbacc090962285da39e73687b44464f (patch)
tree48b29a44f7332c177692af6001f642140ed69389 /Source
parent88ef5737a25b40ce738041b8f9e00df20a131eb6 (diff)
parentf7d92deff487810f21b4f7979a5fe1892fabd255 (diff)
downloadCMake-275290375dbacc090962285da39e73687b44464f.zip
CMake-275290375dbacc090962285da39e73687b44464f.tar.gz
CMake-275290375dbacc090962285da39e73687b44464f.tar.bz2
Merge topic 'ctest-coverage-gtm-percent'
f7d92deff4 CTest: Fix GTM coverage handling of entry point named "%" Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2489
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmParseGTMCoverage.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/CTest/cmParseGTMCoverage.cxx b/Source/CTest/cmParseGTMCoverage.cxx
index 83dde3f..0722753 100644
--- a/Source/CTest/cmParseGTMCoverage.cxx
+++ b/Source/CTest/cmParseGTMCoverage.cxx
@@ -1,5 +1,6 @@
#include "cmParseGTMCoverage.h"
+#include "cmAlgorithms.h"
#include "cmCTest.h"
#include "cmCTestCoverageHandler.h"
#include "cmSystemTools.h"
@@ -86,6 +87,10 @@ bool cmParseGTMCoverage::ReadMCovFile(const char* file)
}
// Find the full path to the file
bool found = this->FindMumpsFile(routine, filepath);
+ if (!found && cmHasLiteralSuffix(routine, "%")) {
+ routine.erase(0, 1);
+ found = this->FindMumpsFile(routine, filepath);
+ }
if (found) {
int lineoffset = 0;
if (this->FindFunctionInMumpsFile(filepath, function, lineoffset)) {
@@ -192,8 +197,8 @@ bool cmParseGTMCoverage::ParseMCOVLine(std::string const& line,
done = true;
}
} else {
- // all chars except ", (, and % get stored in the arg string
- if (cur != '\"' && cur != '(' && cur != '%') {
+ // all chars except " and ( get stored in the arg string
+ if (cur != '\"' && cur != '(') {
arg.append(1, line[pos]);
}
}