| 21 | static std::string FindInstallSource(cmMakefile& makefile, char const* name); |
| 22 | |
| 23 | bool 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 | |
| 48 | static void FinalAction(cmMakefile& makefile, std::string const& dest, |
| 49 | std::vector<std::string> const& args) |
nothing calls this directly
no test coverage detected
searching dependent graphs…