summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestCoverageHandler.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-02-13 20:17:06 (GMT)
committerBrad King <brad.king@kitware.com>2009-02-13 20:17:06 (GMT)
commit70b1ed2548aae673c4b798fc18c5b5c91d9ef6d8 (patch)
treef7ce738d637c4a9f456a675c9a79c9c8d3b3c1b9 /Source/CTest/cmCTestCoverageHandler.h
parent5be78462774c200353acdde11373d696ec2b6d30 (diff)
downloadCMake-70b1ed2548aae673c4b798fc18c5b5c91d9ef6d8.zip
CMake-70b1ed2548aae673c4b798fc18c5b5c91d9ef6d8.tar.gz
CMake-70b1ed2548aae673c4b798fc18c5b5c91d9ef6d8.tar.bz2
ENH: Teach CTest to put labels in coverage results
This teaches CTest to include source file labels in coverage dashboard submissions. The labels for each source are the union of the LABELS property from the source file and all the targets in which it is built.
Diffstat (limited to 'Source/CTest/cmCTestCoverageHandler.h')
-rw-r--r--Source/CTest/cmCTestCoverageHandler.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.h b/Source/CTest/cmCTestCoverageHandler.h
index 658ab78..b391b87 100644
--- a/Source/CTest/cmCTestCoverageHandler.h
+++ b/Source/CTest/cmCTestCoverageHandler.h
@@ -137,6 +137,22 @@ private:
std::vector<cmsys::RegularExpression> CustomCoverageExcludeRegex;
typedef std::map<std::string, cmCTestCoverage> CoverageMap;
+
+ // Map from source file to label ids.
+ class LabelSet: public std::set<int> {};
+ typedef std::map<cmStdString, LabelSet> LabelMapType;
+ LabelMapType SourceLabels;
+
+ // Map from label name to label id.
+ typedef std::map<cmStdString, int> LabelIdMapType;
+ LabelIdMapType LabelIdMap;
+ std::vector<std::string> Labels;
+ int GetLabelId(std::string const& label);
+
+ // Load reading and writing methods.
+ void LoadLabels();
+ void LoadLabels(const char* fname);
+ void WriteXMLLabels(std::ofstream& os, std::string const& source);
};
#endif