Coverage Report

Created: 2026-07-14 07:09

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/CMake/Source/cmExportBuildPackageInfoGenerator.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 "cmExportBuildFileGenerator.h"
11
#include "cmExportPackageInfoGenerator.h"
12
13
namespace Json {
14
class Value;
15
}
16
17
class cmDiagnosticContext;
18
class cmGeneratorTarget;
19
class cmPackageInfoArguments;
20
21
/** \class cmExportBuildPackageInfoGenerator
22
 * \brief Generate a file exporting targets from a build tree.
23
 *
24
 * cmExportBuildCMakeConfigGenerator generates a file exporting targets from
25
 * a build tree.  This exports the targets to the Common Package Specification
26
 * (https://cps-org.github.io/cps/).
27
 *
28
 * This is used to implement the export() command.
29
 */
30
class cmExportBuildPackageInfoGenerator
31
  : public cmExportBuildFileGenerator
32
  , public cmExportPackageInfoGenerator
33
{
34
public:
35
  cmExportBuildPackageInfoGenerator(cmPackageInfoArguments arguments,
36
                                    cmDiagnosticContext context);
37
38
protected:
39
  // Implement virtual methods from the superclass.
40
  bool GenerateMainFile(std::ostream& os) override;
41
  void GenerateImportTargetsConfig(std::ostream&, std::string const&,
42
                                   std::string const&) override
43
0
  {
44
0
  }
45
46
  void GenerateInterfacePropertiesConfig(Json::Value& configurations,
47
                                         cmGeneratorTarget* target,
48
                                         std::string const& config);
49
50
  std::string GetCxxModulesDirectory() const override;
51
52
  using cmExportPackageInfoGenerator::GenerateTargetFileSets;
53
  void GenerateTargetFileSets(Json::Value& fileSets,
54
                              cmGeneratorTarget const* target,
55
                              cmGeneratorFileSet const* fileSet,
56
                              cmTargetExport const* targetExport,
57
                              std::string const& type) const override;
58
};