mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
45 lines
1.3 KiB
C++
45 lines
1.3 KiB
C++
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
file LICENSE.rst or https://cmake.org/licensing for details. */
|
|
#include "cmInstallSbomBuilder.h"
|
|
|
|
#include <utility>
|
|
|
|
#include "cmGeneratorExpression.h"
|
|
#include "cmGeneratorTarget.h"
|
|
#include "cmGlobalGenerator.h"
|
|
#include "cmLocalGenerator.h"
|
|
#include "cmSbomArguments.h"
|
|
|
|
cmInstallSbomBuilder::cmInstallSbomBuilder(
|
|
cmSbomArguments args, std::vector<cmExportSet*> exportSets,
|
|
cmLocalGenerator* lg)
|
|
: cmSbomBuilder(std::move(args), std::move(exportSets), lg)
|
|
{
|
|
}
|
|
|
|
bool cmInstallSbomBuilder::Generate(std::ostream& os,
|
|
std::string const& config)
|
|
{
|
|
if (!this->LocalGenerator) {
|
|
return false;
|
|
}
|
|
return this->GenerateForTargets(os, config,
|
|
cmGeneratorExpression::InstallInterface);
|
|
}
|
|
|
|
cmExportFileGenerator::ExportInfo cmInstallSbomBuilder::FindExportInfoFor(
|
|
cmGeneratorTarget const* target) const
|
|
{
|
|
return target->GetLocalGenerator()
|
|
->GetGlobalGenerator()
|
|
->FindInstallExportInfo(target);
|
|
}
|
|
|
|
cmSbomBuilder::SbomInfo cmInstallSbomBuilder::FindSbomInfoFor(
|
|
cmGeneratorTarget const* target) const
|
|
{
|
|
return target->GetLocalGenerator()
|
|
->GetGlobalGenerator()
|
|
->FindInstallSbomInfo(target);
|
|
}
|