summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestCoverageCommand.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/cmCTestCoverageCommand.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/cmCTestCoverageCommand.h')
-rw-r--r--Source/CTest/cmCTestCoverageCommand.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestCoverageCommand.h b/Source/CTest/cmCTestCoverageCommand.h
index 3796392..c2062cd 100644
--- a/Source/CTest/cmCTestCoverageCommand.h
+++ b/Source/CTest/cmCTestCoverageCommand.h
@@ -60,11 +60,15 @@ public:
virtual const char* GetFullDocumentation()
{
return
- " ctest_coverage([BUILD build_dir] [RETURN_VALUE res] [APPEND])\n"
+ " ctest_coverage([BUILD build_dir] [RETURN_VALUE res] [APPEND]\n"
+ " [LABELS label1 [label2 [...]]])\n"
"Perform the coverage of the given build directory and stores results "
"in Coverage.xml. The second argument is a variable that will hold "
"value."
"\n"
+ "The LABELS option filters the coverage report to include only "
+ "source files labeled with at least one of the labels specified."
+ "\n"
CTEST_COMMAND_APPEND_OPTION_DOCS;
}
@@ -72,6 +76,18 @@ public:
protected:
cmCTestGenericHandler* InitializeHandler();
+
+ virtual bool CheckArgumentKeyword(std::string const& arg);
+ virtual bool CheckArgumentValue(std::string const& arg);
+
+ enum
+ {
+ ArgumentDoingLabels = Superclass::ArgumentDoingLast1,
+ ArgumentDoingLast2
+ };
+
+ bool LabelsMentioned;
+ std::set<cmStdString> Labels;
};