MCPcopy Create free account
hub / github.com/Kitware/VTK / GetCommandToExecute

Method GetCommandToExecute

Common/System/vtkExecutableRunner.cxx:138–164  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

136
137//------------------------------------------------------------------------------
138std::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//------------------------------------------------------------------------------
167void vtkExecutableRunner::AddArgument(const std::string& arg)

Callers 1

ExecuteMethod · 0.95

Calls 3

reserveMethod · 0.45
emplace_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected