Coverage Report

Created: 2026-02-09 06:05

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/CMake/Source/cmExportInstallSbomGenerator.h
Line
Count
Source
1
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2
   file LICENSE.rst or https://cmake.org/licensing for details.  */
3
#pragma once
4
5
#include "cmConfigure.h" // IWYU pragma: keep
6
7
#include <iosfwd>
8
#include <string>
9
10
#include <cm/optional>
11
#include <cm/string_view>
12
13
#include "cmExportInstallFileGenerator.h"
14
#include "cmExportSbomGenerator.h"
15
16
class cmFileSet;
17
class cmGeneratorTarget;
18
class cmInstallExportGenerator;
19
class cmSbomArguments;
20
class cmTargetExport;
21
22
class cmExportInstallSbomGenerator
23
  : public cmExportSbomGenerator
24
  , public cmExportInstallFileGenerator
25
{
26
public:
27
  /** Construct with the export installer that will install the
28
      files.  */
29
  cmExportInstallSbomGenerator(cmInstallExportGenerator* iegen,
30
                               cmSbomArguments arguments);
31
32
  /** Compute the globbing expression used to load per-config import
33
      files from the main file.  */
34
  std::string GetConfigImportFileGlob() const override;
35
36
protected:
37
  std::string const& GetExportName() const override;
38
39
  cm::string_view GetImportPrefixWithSlash() const override;
40
  std::string GetCxxModuleFile(std::string const& name) const override;
41
  void GenerateCxxModuleConfigInformation(std::string const&,
42
                                          std::ostream& os) const override;
43
44
  // Implement virtual methods from the superclass.
45
  bool GenerateMainFile(std::ostream& os) override;
46
  void GenerateImportTargetsConfig(std::ostream& os, std::string const& config,
47
                                   std::string const& suffix) override;
48
49
  void HandleMissingTarget(std::string& /* link_libs */,
50
                           cmGeneratorTarget const* /* depender */,
51
                           cmGeneratorTarget* /* dependee */) override;
52
53
  bool CheckInterfaceDirs(std::string const& /* prepro */,
54
                          cmGeneratorTarget const* /* target */,
55
                          std::string const& /* prop */) const override;
56
57
0
  char GetConfigFileNameSeparator() const override { return '@'; }
58
59
  std::string GenerateImportPrefix() const;
60
  std::string InstallNameDir(cmGeneratorTarget const* target,
61
                             std::string const& config) override;
62
63
  std::string GetCxxModulesDirectory() const override;
64
65
  cm::optional<std::string> GetFileSetDirectory(
66
    cmGeneratorTarget* gte, cmTargetExport const* te, cmFileSet* fileSet,
67
    cm::optional<std::string> const& config = {});
68
};