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

Function cmInstallProgramsCommand

Source/cmInstallProgramsCommand.cxx:23–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21static std::string FindInstallSource(cmMakefile& makefile, char const* name);
22
23bool cmInstallProgramsCommand(std::vector<std::string> const& args,
24 cmExecutionStatus& status)
25{
26 if (args.size() < 2) {
27 status.SetError("called with incorrect number of arguments");
28 return false;
29 }
30
31 cmMakefile& mf = status.GetMakefile();
32
33 // Enable the install target.
34 mf.GetGlobalGenerator()->EnableInstallTarget();
35
36 mf.GetGlobalGenerator()->AddInstallComponent(
37 mf.GetSafeDefinition("CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"));
38
39 std::string const& dest = args[0];
40 std::vector<std::string> const finalArgs(args.begin() + 1, args.end());
41 mf.AddGeneratorAction(
42 [dest, finalArgs](cmLocalGenerator& lg, cmListFileBacktrace const&) {
43 FinalAction(*lg.GetMakefile(), dest, finalArgs);
44 });
45 return true;
46}
47
48static void FinalAction(cmMakefile& makefile, std::string const& dest,
49 std::vector<std::string> const& args)

Callers

nothing calls this directly

Calls 10

EnableInstallTargetMethod · 0.80
AddInstallComponentMethod · 0.80
FinalActionFunction · 0.70
sizeMethod · 0.45
SetErrorMethod · 0.45
GetMakefileMethod · 0.45
GetGlobalGeneratorMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
AddGeneratorActionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…