| 551 | } |
| 552 | |
| 553 | std::vector<std::string> cmState::GetCommandNames() const |
| 554 | { |
| 555 | std::vector<std::string> commandNames; |
| 556 | commandNames.reserve(this->BuiltinCommands.size() + |
| 557 | this->ScriptedCommands.size()); |
| 558 | for (auto const& bc : this->BuiltinCommands) { |
| 559 | commandNames.push_back(bc.first); |
| 560 | } |
| 561 | for (auto const& sc : this->ScriptedCommands) { |
| 562 | commandNames.push_back(sc.first); |
| 563 | } |
| 564 | std::sort(commandNames.begin(), commandNames.end()); |
| 565 | commandNames.erase(std::unique(commandNames.begin(), commandNames.end()), |
| 566 | commandNames.end()); |
| 567 | return commandNames; |
| 568 | } |
| 569 | |
| 570 | void cmState::RemoveBuiltinCommand(std::string const& name) |
| 571 | { |