Create the command line for building the given target using the selected make
| 311 | // Create the command line for building the given target using the selected |
| 312 | // make |
| 313 | std::string cmExtraSublimeTextGenerator::BuildMakeCommand( |
| 314 | std::string const& make, std::string const& makefile, |
| 315 | std::string const& target) |
| 316 | { |
| 317 | std::string command = cmStrCat('"', make, '"'); |
| 318 | std::string generator = this->GlobalGenerator->GetName(); |
| 319 | if (generator == "NMake Makefiles") { |
| 320 | std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile); |
| 321 | command = cmStrCat(std::move(command), R"(, "/NOLOGO", "/f", ")", |
| 322 | std::move(makefileName), "\", \"", target, '"'); |
| 323 | } else if (generator == "Ninja") { |
| 324 | std::string makefileName = cmSystemTools::ConvertToOutputPath(makefile); |
| 325 | command = cmStrCat(std::move(command), R"(, "-f", ")", |
| 326 | std::move(makefileName), "\", \"", target, '"'); |
| 327 | } else { |
| 328 | std::string makefileName; |
| 329 | if (generator == "MinGW Makefiles") { |
| 330 | // no escaping of spaces in this case, see |
| 331 | // https://gitlab.kitware.com/cmake/cmake/-/issues/10014 |
| 332 | makefileName = makefile; |
| 333 | } else { |
| 334 | makefileName = cmSystemTools::ConvertToOutputPath(makefile); |
| 335 | } |
| 336 | command = cmStrCat(std::move(command), R"(, "-f", ")", |
| 337 | std::move(makefileName), "\", \"", target, '"'); |
| 338 | } |
| 339 | return command; |
| 340 | } |
| 341 | |
| 342 | // TODO: Most of the code is picked up from the Ninja generator, refactor it. |
| 343 | std::string cmExtraSublimeTextGenerator::ComputeFlagsForObject( |
no test coverage detected