mirror of
https://github.com/Kitware/CMake.git
synced 2026-11-06 05:16:58 +00:00
install(SBOM) could crash for dependencies outside an export set and mishandle private dependencies expressed through LINK_ONLY. Resolve link expressions before target lookup, traverse unexported dependencies transitively, and isolate document state per configuration. Preserve target license precedence and align document metadata inheritance with CPS. Add regression coverage for these cases. Fixes: #28141 Fixes: #28210
21 lines
678 B
C++
21 lines
678 B
C++
/* 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 "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"));
|
|
return this->GenerateForBuild(os, config);
|
|
}
|