1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
3 #include "cmCTestCoverageCommand.h"
7 #include <cmext/string_view>
10 #include "cmCTestCoverageHandler.h"
12 class cmCTestGenericHandler;
14 void cmCTestCoverageCommand::BindArguments()
16 this->cmCTestHandlerCommand::BindArguments();
17 this->Bind("LABELS"_s, this->Labels);
20 cmCTestGenericHandler* cmCTestCoverageCommand::InitializeHandler()
22 this->CTest->SetCTestConfigurationFromCMakeVariable(
23 this->Makefile, "CoverageCommand", "CTEST_COVERAGE_COMMAND", this->Quiet);
24 this->CTest->SetCTestConfigurationFromCMakeVariable(
25 this->Makefile, "CoverageExtraFlags", "CTEST_COVERAGE_EXTRA_FLAGS",
27 cmCTestCoverageHandler* handler = this->CTest->GetCoverageHandler();
28 handler->Initialize();
30 // If a LABELS option was given, select only files with the labels.
32 handler->SetLabelFilter(
33 std::set<std::string>(this->Labels->begin(), this->Labels->end()));
36 handler->SetQuiet(this->Quiet);