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

Function kwsysProcess_SetCommand

Source/kwsys/ProcessUNIX.c:381–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381int kwsysProcess_SetCommand(kwsysProcess* cp, char const* const* command)
382{
383 int i;
384 if (!cp) {
385 return 0;
386 }
387 for (i = 0; i < cp->NumberOfCommands; ++i) {
388 char** c = cp->Commands[i];
389 while (*c) {
390 free(*c++);
391 }
392 free(cp->Commands[i]);
393 }
394 cp->NumberOfCommands = 0;
395 if (cp->Commands) {
396 free(cp->Commands);
397 cp->Commands = 0;
398 }
399 if (command) {
400 return kwsysProcess_AddCommand(cp, command);
401 }
402 return 1;
403}
404
405int kwsysProcess_AddCommand(kwsysProcess* cp, char const* const* command)
406{

Callers 3

runChild2Function · 0.70
kwsysProcess_DeleteFunction · 0.70
RunProcessMethod · 0.70

Calls 1

kwsysProcess_AddCommandFunction · 0.70

Tested by 1

runChild2Function · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…