https://github.com/Kitware/CMake
Tip revision: 67a1e2a5d17aec461ed464fa254fb01f32a0a384 authored by Brad King on 22 February 2023, 15:06:26 UTC
CMake 3.26.0-rc4
CMake 3.26.0-rc4
Tip revision: 67a1e2a
cmCTestCoverageCommand.cxx
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#include "cmCTestCoverageCommand.h"
#include <set>
#include <cmext/string_view>
#include "cmCTest.h"
#include "cmCTestCoverageHandler.h"
class cmCTestGenericHandler;
void cmCTestCoverageCommand::BindArguments()
{
this->cmCTestHandlerCommand::BindArguments();
this->Bind("LABELS"_s, this->Labels);
}
cmCTestGenericHandler* cmCTestCoverageCommand::InitializeHandler()
{
this->CTest->SetCTestConfigurationFromCMakeVariable(
this->Makefile, "CoverageCommand", "CTEST_COVERAGE_COMMAND", this->Quiet);
this->CTest->SetCTestConfigurationFromCMakeVariable(
this->Makefile, "CoverageExtraFlags", "CTEST_COVERAGE_EXTRA_FLAGS",
this->Quiet);
cmCTestCoverageHandler* handler = this->CTest->GetCoverageHandler();
handler->Initialize();
// If a LABELS option was given, select only files with the labels.
if (this->Labels) {
handler->SetLabelFilter(
std::set<std::string>(this->Labels->begin(), this->Labels->end()));
}
handler->SetQuiet(this->Quiet);
return handler;
}