| 622 | } |
| 623 | |
| 624 | std::string cmExtraCodeLiteGenerator::GetBuildCommand( |
| 625 | cmMakefile const* mf, std::string const& targetName) const |
| 626 | { |
| 627 | std::string const& generator = mf->GetSafeDefinition("CMAKE_GENERATOR"); |
| 628 | std::string const& make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); |
| 629 | std::string buildCommand = make; // Default |
| 630 | std::ostringstream ss; |
| 631 | if (generator == "NMake Makefiles" || generator == "Ninja") { |
| 632 | ss << make; |
| 633 | } else if (generator == "MinGW Makefiles" || generator == "Unix Makefiles") { |
| 634 | ss << make << " -f$(ProjectPath)/Makefile"; |
| 635 | if (this->CpuCount > 0) { |
| 636 | ss << " -j " << this->CpuCount; |
| 637 | } |
| 638 | } |
| 639 | if (!targetName.empty()) { |
| 640 | ss << " " << targetName; |
| 641 | } |
| 642 | buildCommand = ss.str(); |
| 643 | return buildCommand; |
| 644 | } |
| 645 | |
| 646 | std::string cmExtraCodeLiteGenerator::GetCleanCommand( |
| 647 | cmMakefile const* mf, std::string const& targetName) const |
no test coverage detected