summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestCoverageHandler.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-03-02 20:33:18 (GMT)
committerBrad King <brad.king@kitware.com>2009-03-02 20:33:18 (GMT)
commit91a8569648aba920a4b168eb25e946ca012a93ba (patch)
tree722c768d8d402479d1c44ee205cd3a63f2d0faad /Source/CTest/cmCTestCoverageHandler.h
parent3078fef81c9f6d00aceba5ca16435ba37f1cdf03 (diff)
downloadCMake-91a8569648aba920a4b168eb25e946ca012a93ba.zip
CMake-91a8569648aba920a4b168eb25e946ca012a93ba.tar.gz
CMake-91a8569648aba920a4b168eb25e946ca012a93ba.tar.bz2
ENH: Teach ctest_coverage to filter with LABELS
This teaches ctest_coverage() to report only coverage of files labeled with at least one label given by a new LABELS option.
Diffstat (limited to 'Source/CTest/cmCTestCoverageHandler.h')
-rw-r--r--Source/CTest/cmCTestCoverageHandler.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.h b/Source/CTest/cmCTestCoverageHandler.h
index b391b87..48894fb 100644
--- a/Source/CTest/cmCTestCoverageHandler.h
+++ b/Source/CTest/cmCTestCoverageHandler.h
@@ -50,6 +50,9 @@ public:
*/
void PopulateCustomVectors(cmMakefile *mf);
+ /** Report coverage only for sources with these labels. */
+ void SetLabelFilter(std::set<cmStdString> const& labels);
+
private:
bool ShouldIDoCoverage(const char* file, const char* srcDir,
const char* binDir);
@@ -153,6 +156,10 @@ private:
void LoadLabels();
void LoadLabels(const char* fname);
void WriteXMLLabels(std::ofstream& os, std::string const& source);
+
+ // Label-based filtering.
+ std::set<int> LabelFilter;
+ bool IsFilteredOut(std::string const& source);
};
#endif