| 350 | } |
| 351 | |
| 352 | bool HandleJoinCommand(std::vector<std::string> const& args, |
| 353 | cmExecutionStatus& status) |
| 354 | { |
| 355 | if (args.size() != 4) { |
| 356 | status.SetError(cmStrCat("sub-command JOIN requires three arguments (", |
| 357 | args.size() - 1, " found).")); |
| 358 | return false; |
| 359 | } |
| 360 | |
| 361 | std::string const& listName = args[1]; |
| 362 | std::string const& glue = args[2]; |
| 363 | std::string const& variableName = args[3]; |
| 364 | |
| 365 | // expand the variable |
| 366 | auto list = GetList(listName, status.GetMakefile()); |
| 367 | |
| 368 | if (!list) { |
| 369 | status.GetMakefile().AddDefinition(variableName, ""); |
| 370 | return true; |
| 371 | } |
| 372 | |
| 373 | status.GetMakefile().AddDefinition(variableName, list->join(glue)); |
| 374 | return true; |
| 375 | } |
| 376 | |
| 377 | bool HandleRemoveItemCommand(std::vector<std::string> const& args, |
| 378 | cmExecutionStatus& status) |
nothing calls this directly
no test coverage detected
searching dependent graphs…