1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
12 #include "cmsys/RegularExpression.hxx"
14 #include "cmBinUtilsLinker.h"
16 class cmExecutionStatus;
19 class cmRuntimeDependencyArchive
22 explicit cmRuntimeDependencyArchive(
23 cmExecutionStatus& status, std::vector<std::string> searchDirectories,
24 std::string bundleExecutable,
25 const std::vector<std::string>& preIncludeRegexes,
26 const std::vector<std::string>& preExcludeRegexes,
27 const std::vector<std::string>& postIncludeRegexes,
28 const std::vector<std::string>& postExcludeRegexes,
29 std::vector<std::string> postIncludeFiles,
30 std::vector<std::string> postExcludeFiles,
31 std::vector<std::string> postExcludeFilesStrict);
33 bool GetRuntimeDependencies(const std::vector<std::string>& executables,
34 const std::vector<std::string>& libraries,
35 const std::vector<std::string>& modules);
37 void SetError(const std::string& e);
39 const std::string& GetBundleExecutable() const;
40 const std::vector<std::string>& GetSearchDirectories() const;
41 const std::string& GetGetRuntimeDependenciesTool() const;
42 bool GetGetRuntimeDependenciesCommand(
43 const std::string& search, std::vector<std::string>& command) const;
44 bool IsPreExcluded(const std::string& name) const;
45 bool IsPostExcluded(const std::string& name) const;
47 void AddResolvedPath(const std::string& name, const std::string& path,
48 bool& unique, std::vector<std::string> rpaths = {});
49 void AddUnresolvedPath(const std::string& name);
51 cmMakefile* GetMakefile() const;
52 const std::map<std::string, std::set<std::string>>& GetResolvedPaths() const;
53 const std::set<std::string>& GetUnresolvedPaths() const;
54 const std::map<std::string, std::vector<std::string>>& GetRPaths() const;
56 static bool PlatformSupportsRuntimeDependencies(const std::string& platform);
59 cmExecutionStatus& Status;
60 std::unique_ptr<cmBinUtilsLinker> Linker;
62 std::string GetRuntimeDependenciesTool;
63 std::vector<std::string> GetRuntimeDependenciesCommand;
65 std::vector<std::string> SearchDirectories;
66 std::string BundleExecutable;
67 std::vector<cmsys::RegularExpression> PreIncludeRegexes;
68 std::vector<cmsys::RegularExpression> PreExcludeRegexes;
69 std::vector<cmsys::RegularExpression> PostIncludeRegexes;
70 std::vector<cmsys::RegularExpression> PostExcludeRegexes;
71 std::vector<std::string> PostIncludeFiles;
72 std::vector<std::string> PostExcludeFiles;
73 std::vector<std::string> PostExcludeFilesStrict;
74 std::map<std::string, std::set<std::string>> ResolvedPaths;
75 std::set<std::string> UnresolvedPaths;
76 std::map<std::string, std::vector<std::string>> RPaths;