blob: 5bc2418b236f9025ff84e3a92ea5ff0560059281 [file]
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file LICENSE.rst or https://cmake.org/licensing for details. */
#pragma once
#include "cmConfigure.h" // IWYU pragma: keep
#include <iosfwd>
#include <string>
#include <vector>
#include "cmExportFileGenerator.h"
#include "cmSbomBuilder.h"
class cmExportSet;
class cmSbomArguments;
/** Build-tree SBOM (`export(SBOM ...)`). Covers the targets in the
* associated export sets. */
class cmBuildSbomBuilder final : public cmSbomBuilder
{
public:
cmBuildSbomBuilder(cmSbomArguments const& args,
std::vector<cmExportSet*> const& exportSets);
bool Generate(std::ostream& os, std::string const& config) override;
protected:
cmExportFileGenerator::ExportInfo FindExportInfoFor(
cmGeneratorTarget const* target) const override;
std::vector<std::string> FindSbomPackagesFor(
cmGeneratorTarget const* target) const override;
};