------------------------------------------------------------------------------
| 136 | |
| 137 | //------------------------------------------------------------------------------ |
| 138 | std::vector<std::string> vtkExecutableRunner::GetCommandToExecute() const |
| 139 | { |
| 140 | std::vector<std::string> result; |
| 141 | if (this->ExecuteInSystemShell) |
| 142 | { |
| 143 | result.reserve(3); |
| 144 | #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) |
| 145 | result.emplace_back("cmd.exe"); |
| 146 | result.emplace_back("/c"); |
| 147 | #else |
| 148 | result.emplace_back("sh"); |
| 149 | result.emplace_back("-c"); |
| 150 | #endif |
| 151 | result.emplace_back(this->Command); |
| 152 | } |
| 153 | else |
| 154 | { |
| 155 | result.reserve(this->Arguments.size() + 1); |
| 156 | result.emplace_back(this->Command); |
| 157 | for (const auto& arg : this->Arguments) |
| 158 | { |
| 159 | result.emplace_back(arg); |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | return result; |
| 164 | } |
| 165 | |
| 166 | //------------------------------------------------------------------------------ |
| 167 | void vtkExecutableRunner::AddArgument(const std::string& arg) |
no test coverage detected