MCPcopy Index your code
hub / github.com/Kitware/CMake / cmAddCustomCommandCommand

Function cmAddCustomCommandCommand

Source/cmAddCustomCommandCommand.cxx:27–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#include "cmValue.h"
26
27bool cmAddCustomCommandCommand(std::vector<std::string> const& args,
28 cmExecutionStatus& status)
29{
30 /* Let's complain at the end of this function about the lack of a particular
31 arg. For the moment, let's say that COMMAND, and either TARGET or SOURCE
32 are required.
33 */
34 if (args.size() < 4) {
35 status.SetError("called with wrong number of arguments.");
36 return false;
37 }
38
39 cmMakefile& mf = status.GetMakefile();
40 std::string source;
41 std::string target;
42 std::string main_dependency;
43 std::string working;
44 std::string depfile;
45 std::string job_pool;
46 std::string job_server_aware;
47 std::string comment_buffer;
48 char const* comment = nullptr;
49 std::vector<std::string> depends;
50 std::vector<std::string> outputs;
51 std::vector<std::string> output;
52 std::vector<std::string> byproducts;
53 bool verbatim = false;
54 bool append = false;
55 bool uses_terminal = false;
56 bool command_expand_lists = false;
57 bool depends_explicit_only =
58 mf.IsOn("CMAKE_ADD_CUSTOM_COMMAND_DEPENDS_EXPLICIT_ONLY");
59 bool codegen = false;
60 std::string implicit_depends_lang;
61 cmImplicitDependsList implicit_depends;
62
63 // Accumulate one command line at a time.
64 cmCustomCommandLine currentLine;
65
66 // Save all command lines.
67 cmCustomCommandLines commandLines;
68
69 cmCustomCommandType cctype = cmCustomCommandType::POST_BUILD;
70
71 enum tdoing
72 {
73 doing_source,
74 doing_command,
75 doing_target,
76 doing_depends,
77 doing_implicit_depends_lang,
78 doing_implicit_depends_file,
79 doing_main_dependency,
80 doing_output,
81 doing_outputs,
82 doing_byproducts,
83 doing_comment,
84 doing_working_directory,

Callers

nothing calls this directly

Calls 15

cmIsOnFunction · 0.85
moveFunction · 0.85
push_backMethod · 0.80
emplace_backMethod · 0.80
c_strMethod · 0.80
SetByproductsMethod · 0.80
SetCommandLinesMethod · 0.80
SetEscapeOldStyleMethod · 0.80
SetUsesTerminalMethod · 0.80
SetDepfileMethod · 0.80
SetJobPoolMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…