blob: e7dede0f73a7664bd0159a3e8674c3e37eca6d2a [file]
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file LICENSE.rst or https://cmake.org/licensing for details. */
#include "cmBuildSbomGenerator.h"
#include <cmext/string_view>
#include "cmBuildSbomBuilder.h"
#include "cmGeneratedFileStream.h"
#include "cmStringAlgorithms.h"
void cmBuildSbomGenerator::Compute(cmLocalGenerator* lg)
{
this->Builder->Compute(lg);
}
bool cmBuildSbomGenerator::GenerateForBuild(std::string const& config)
{
cmGeneratedFileStream os(cmStrCat(this->OutputFile, '-',
config.empty() ? "noconfig" : config,
".spdx.json"_s));
return this->GenerateForBuild(os, config);
}