MCPcopy Create free account
hub / github.com/Kitware/CMake / AddInstallRuntimeDependenciesGenerator

Function AddInstallRuntimeDependenciesGenerator

Source/cmInstallCommand.cxx:214–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214void AddInstallRuntimeDependenciesGenerator(
215 Helper& helper, cmInstallRuntimeDependencySet* runtimeDependencySet,
216 cmInstallCommandArguments const& runtimeArgs,
217 cmInstallCommandArguments const& libraryArgs,
218 cmInstallCommandArguments const& frameworkArgs,
219 RuntimeDependenciesArgs runtimeDependenciesArgs, bool& installsRuntime,
220 bool& installsLibrary, bool& installsFramework)
221{
222 bool dllPlatform =
223 !helper.Makefile->GetSafeDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX").empty();
224 bool apple =
225 helper.Makefile->GetSafeDefinition("CMAKE_HOST_SYSTEM_NAME") == "Darwin";
226 auto const& runtimeDependenciesArgsRef =
227 dllPlatform ? runtimeArgs : libraryArgs;
228 std::vector<std::string> configurations =
229 runtimeDependenciesArgsRef.GetConfigurations();
230 if (apple) {
231 std::copy(frameworkArgs.GetConfigurations().begin(),
232 frameworkArgs.GetConfigurations().end(),
233 std::back_inserter(configurations));
234 }
235
236 // Create file(GET_RUNTIME_DEPENDENCIES) generator.
237 auto getRuntimeDependenciesGenerator =
238 cm::make_unique<cmInstallGetRuntimeDependenciesGenerator>(
239 runtimeDependencySet, std::move(runtimeDependenciesArgs.Directories),
240 std::move(runtimeDependenciesArgs.PreIncludeRegexes),
241 std::move(runtimeDependenciesArgs.PreExcludeRegexes),
242 std::move(runtimeDependenciesArgs.PostIncludeRegexes),
243 std::move(runtimeDependenciesArgs.PostExcludeRegexes),
244 std::move(runtimeDependenciesArgs.PostIncludeFiles),
245 std::move(runtimeDependenciesArgs.PostExcludeFiles),
246 runtimeDependenciesArgsRef.GetComponent(),
247 apple ? frameworkArgs.GetComponent() : "", true, "_CMAKE_DEPS",
248 "_CMAKE_RPATH", configurations,
249 cmInstallGenerator::SelectMessageLevel(helper.Makefile),
250 runtimeDependenciesArgsRef.GetExcludeFromAll() &&
251 (apple ? frameworkArgs.GetExcludeFromAll() : true),
252 helper.Makefile->GetBacktrace(),
253 helper.Makefile->GetPolicyStatus(cmPolicies::CMP0207));
254 helper.Makefile->AddInstallGenerator(
255 std::move(getRuntimeDependenciesGenerator));
256
257 // Create the library dependencies generator.
258 auto libraryRuntimeDependenciesGenerator =
259 cm::make_unique<cmInstallRuntimeDependencySetGenerator>(
260 cmInstallRuntimeDependencySetGenerator::DependencyType::Library,
261 runtimeDependencySet, std::vector<std::string>{}, true, std::string{},
262 true, "_CMAKE_DEPS", "_CMAKE_RPATH", "_CMAKE_TMP",
263 dllPlatform ? helper.GetRuntimeDestination(&runtimeArgs)
264 : helper.GetLibraryDestination(&libraryArgs),
265 runtimeDependenciesArgsRef.GetConfigurations(),
266 runtimeDependenciesArgsRef.GetComponent(),
267 runtimeDependenciesArgsRef.GetPermissions(),
268 cmInstallGenerator::SelectMessageLevel(helper.Makefile),
269 runtimeDependenciesArgsRef.GetExcludeFromAll(),
270 helper.Makefile->GetBacktrace());
271 helper.Makefile->AddInstallGenerator(

Callers 2

HandleTargetsModeFunction · 0.85

Calls 13

moveFunction · 0.85
GetRuntimeDestinationMethod · 0.80
GetLibraryDestinationMethod · 0.80
GetPermissionsMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
GetComponentMethod · 0.45
GetExcludeFromAllMethod · 0.45
GetBacktraceMethod · 0.45
GetPolicyStatusMethod · 0.45
AddInstallGeneratorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…