Coverage Report

Created: 2026-02-09 06:05

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/CMake/Source/cmInstallRuntimeDependencySetGenerator.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 <iosfwd>
6
#include <string>
7
#include <vector>
8
9
#include "cmInstallGenerator.h"
10
11
class cmInstallRuntimeDependencySet;
12
class cmListFileBacktrace;
13
class cmLocalGenerator;
14
15
class cmInstallRuntimeDependencySetGenerator : public cmInstallGenerator
16
{
17
public:
18
  enum class DependencyType
19
  {
20
    Library,
21
    Framework,
22
  };
23
24
  cmInstallRuntimeDependencySetGenerator(
25
    DependencyType type, cmInstallRuntimeDependencySet* dependencySet,
26
    std::vector<std::string> installRPaths, bool noInstallRPath,
27
    std::string installNameDir, bool noInstallName, char const* depsVar,
28
    char const* rpathPrefix, char const* tmpVarPrefix, std::string destination,
29
    std::vector<std::string> const& configurations, std::string component,
30
    std::string permissions, MessageLevel message, bool exclude_from_all,
31
    cmListFileBacktrace backtrace);
32
33
  bool Compute(cmLocalGenerator* lg) override;
34
35
0
  DependencyType GetDependencyType() const { return this->Type; }
36
37
  cmInstallRuntimeDependencySet* GetRuntimeDependencySet() const
38
0
  {
39
0
    return this->DependencySet;
40
0
  }
41
42
  std::string GetDestination(std::string const& config) const;
43
44
protected:
45
  void GenerateScriptForConfig(std::ostream& os, std::string const& config,
46
                               Indent indent) override;
47
48
private:
49
  DependencyType Type;
50
  cmInstallRuntimeDependencySet* DependencySet;
51
  std::vector<std::string> InstallRPaths;
52
  bool NoInstallRPath;
53
  std::string InstallNameDir;
54
  bool NoInstallName;
55
  std::string Permissions;
56
  char const* DepsVar;
57
  char const* RPathPrefix;
58
  char const* TmpVarPrefix;
59
  cmLocalGenerator* LocalGenerator = nullptr;
60
61
  void GenerateAppleLibraryScript(
62
    std::ostream& os, std::string const& config,
63
    std::vector<std::string> const& evaluatedRPaths, Indent indent);
64
  void GenerateAppleFrameworkScript(
65
    std::ostream& os, std::string const& config,
66
    std::vector<std::string> const& evaluatedRPaths, Indent indent);
67
  void GenerateInstallNameFixup(
68
    std::ostream& os, std::string const& config,
69
    std::vector<std::string> const& evaluatedRPaths,
70
    std::string const& filename, std::string const& depName, Indent indent);
71
  void GenerateStripFixup(std::ostream& os, std::string const& config,
72
                          std::string const& depName, Indent indent);
73
};